Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

compile-lm32-rtems: 80 rule cleanup

  • Loading branch information...
commit 97b0aacd335169c507822f242e1c8b560ffde5f8 1 parent d4d964f
authored December 28, 2011

Showing 1 changed file with 38 additions and 35 deletions. Show diff stats Hide diff stats

  1. 73  compile-lm32-rtems/Makefile
73  compile-lm32-rtems/Makefile
@@ -50,52 +50,51 @@ DL=$(if $(wildcard ../dl/.),../dl,dl)
50 50
 RTEMS_PATCHES_DIR=rtems-patches
51 51
 MM1_PATCHES_DIR=milkymist-one-patches
52 52
 
53  
-.PHONY:	all clean
  53
+.PHONY: all clean
54 54
 
55 55
 all: .install.gdb.ok .install.gcc.ok
56 56
 
57 57
 .install.gcc.ok: .compile.gcc.ok
58  
-	cd b-gcc && make install
  58
+	(cd b-gcc && make install)
59 59
 	touch $@
60 60
 
61 61
 .compile.gcc.ok: .install.binutils.ok .patch.ok gcc-$(GCC_CORE_VERSION)/newlib
62 62
 	export PATH=$(RTEMS_PREFIX)/bin:$$PATH
63 63
 	mkdir -p b-gcc
64  
-	(cd b-gcc/;\
  64
+	(cd b-gcc/ && \
65 65
 	  ../gcc-$(GCC_CORE_VERSION)/configure --target=lm32-rtems4.11 \
66  
-	  --with-gnu-as --with-gnu-ld --with-newlib --verbose --enable-threads \
67  
-	  --enable-languages="c" --disable-shared --prefix=$(RTEMS_PREFIX); \
68  
-	 make all; \
69  
-	 make info; \
70  
-	)
  66
+	  --with-gnu-as --with-gnu-ld --with-newlib --verbose \
  67
+	  --enable-threads --enable-languages="c" --disable-shared \
  68
+	  --prefix=$(RTEMS_PREFIX) && \
  69
+	 make all info)
71 70
 	touch $@
72 71
 
73 72
 .install.binutils.ok: .compile.binutils.ok
74 73
 	mkdir -p $(RTEMS_PREFIX)
75  
-	cd b-binutils && make install
  74
+	(cd b-binutils && make install)
76 75
 	touch $@
77 76
 
78 77
 .compile.binutils.ok: .patch.ok
79 78
 	mkdir -p b-binutils
80  
-	(cd b-binutils; \
81  
-	 ../binutils-$(BINUTILS_VERSION)/configure --target=lm32-rtems4.11 --prefix=$(RTEMS_PREFIX); \
82  
-	 make all; \
83  
-	 make info; \
84  
-	)
  79
+	(cd b-binutils && \
  80
+	 ../binutils-$(BINUTILS_VERSION)/configure --target=lm32-rtems4.11 \
  81
+	 --prefix=$(RTEMS_PREFIX) && \
  82
+	 make all info)
85 83
 	touch $@
86 84
 
87 85
 gcc-$(GCC_CORE_VERSION)/newlib: .unzip.ok
88  
-	(cd gcc-$(GCC_CORE_VERSION); ln -s ../newlib-$(NEWLIB_VERSION)/newlib;)
  86
+	(cd gcc-$(GCC_CORE_VERSION) && \
  87
+	 ln -s ../newlib-$(NEWLIB_VERSION)/newlib)
89 88
 
90 89
 .patch.ok: .unzip.ok $(RTEMS_PATCHES_DIR)/.ok
91  
-	(cd binutils-$(BINUTILS_VERSION); cat ../$(RTEMS_PATCHES_DIR)/$(BINUTILS_PATCH) | patch -p1)
92  
-	(cd gcc-$(GCC_CORE_VERSION); \
93  
-	 cat ../$(RTEMS_PATCHES_DIR)/$(GCC_CORE_PATCH) | patch -p1; \
94  
-	)
95  
-	(cd newlib-$(NEWLIB_VERSION); cat ../$(RTEMS_PATCHES_DIR)/$(NEWLIB_PATCH) | patch -p1)
96  
-	(cd gdb-$(GDB_VERSION); \
97  
-	 cat ../$(RTEMS_PATCHES_DIR)/$(GDB_PATCH) | patch -p1; \
98  
-	)
  90
+	(cd binutils-$(BINUTILS_VERSION) && \
  91
+	 patch -p1 < ../$(RTEMS_PATCHES_DIR)/$(BINUTILS_PATCH))
  92
+	(cd gcc-$(GCC_CORE_VERSION) && \
  93
+	 patch -p1 < ../$(RTEMS_PATCHES_DIR)/$(GCC_CORE_PATCH))
  94
+	(cd newlib-$(NEWLIB_VERSION) && \
  95
+	 patch -p1 < ../$(RTEMS_PATCHES_DIR)/$(NEWLIB_PATCH))
  96
+	(cd gdb-$(GDB_VERSION) && \
  97
+	 patch -p1 < ../$(RTEMS_PATCHES_DIR)/$(GDB_PATCH))
99 98
 	touch $@
100 99
 
101 100
 .unzip.ok: $(DL)/$(BINUTILS).ok $(DL)/$(GCC_CORE).ok $(DL)/$(NEWLIB).ok $(DL)/$(GDB).ok $(DL)/$(MPFR).ok $(DL)/$(MPC).ok $(DL)/$(GMP).ok
@@ -106,31 +105,35 @@ gcc-$(GCC_CORE_VERSION)/newlib: .unzip.ok
106 105
 	tar xf $(DL)/$(GMP)
107 106
 	tar xf $(DL)/$(MPC)
108 107
 	tar xf $(DL)/$(MPFR)
109  
-	rm -rf gcc-$(GCC_CORE_VERSION)/gmp gcc-$(GCC_CORE_VERSION)/mpc gcc-$(GCC_CORE_VERSION)/mpfr
  108
+	rm -rf gcc-$(GCC_CORE_VERSION)/gmp gcc-$(GCC_CORE_VERSION)/mpc \
  109
+	  gcc-$(GCC_CORE_VERSION)/mpfr
110 110
 	ln -s  ../gmp-$(GMP_VERSION) gcc-$(GCC_CORE_VERSION)/gmp
111 111
 	ln -s  ../mpc-$(MPC_VERSION) gcc-$(GCC_CORE_VERSION)/mpc
112 112
 	ln -s  ../mpfr-$(MPFR_VERSION) gcc-$(GCC_CORE_VERSION)/mpfr
113 113
 	touch $@
114 114
 
115 115
 .install.gdb.ok: .compile.gdb.ok
116  
-	cd b-gdb && make install
  116
+	(cd b-gdb && make install)
117 117
 	touch $@
118 118
 
119 119
 .compile.gdb.ok: .install.binutils.ok .patch.ok
120 120
 	export PATH=$(RTEMS_PREFIX)/bin:$$PATH
121 121
 	mkdir -p b-gdb
122  
-	(cd b-gdb/; \
123  
-	  ../gdb-$(GDB_VERSION)/configure --target=lm32-rtems4.11 --prefix=$(RTEMS_PREFIX); \
124  
-	 make all; \
125  
-	)
  122
+	(cd b-gdb/ && ../gdb-$(GDB_VERSION)/configure --target=lm32-rtems4.11 \
  123
+	  --prefix=$(RTEMS_PREFIX) && \
  124
+	 make all)
126 125
 	touch $@
127 126
 
128 127
 $(RTEMS_PATCHES_DIR)/.ok:
129 128
 	mkdir -p $(RTEMS_PATCHES_DIR)
130  
-	$(WGET) $(RTEMS_PATCHES_DIR)/$(BINUTILS_PATCH) $(RTEMS_SOURCES_URL)/$(BINUTILS_PATCH)
131  
-	$(WGET) $(RTEMS_PATCHES_DIR)/$(GCC_CORE_PATCH) $(RTEMS_SOURCES_URL)/$(GCC_CORE_PATCH)
132  
-	$(WGET) $(RTEMS_PATCHES_DIR)/$(NEWLIB_PATCH) $(RTEMS_SOURCES_URL)/$(NEWLIB_PATCH)
133  
-	$(WGET) $(RTEMS_PATCHES_DIR)/$(GDB_PATCH) $(RTEMS_SOURCES_URL)/$(GDB_PATCH)
  129
+	$(WGET) $(RTEMS_PATCHES_DIR)/$(BINUTILS_PATCH) \
  130
+	  $(RTEMS_SOURCES_URL)/$(BINUTILS_PATCH)
  131
+	$(WGET) $(RTEMS_PATCHES_DIR)/$(GCC_CORE_PATCH) \
  132
+	  $(RTEMS_SOURCES_URL)/$(GCC_CORE_PATCH)
  133
+	$(WGET) $(RTEMS_PATCHES_DIR)/$(NEWLIB_PATCH) \
  134
+	  $(RTEMS_SOURCES_URL)/$(NEWLIB_PATCH)
  135
+	$(WGET) $(RTEMS_PATCHES_DIR)/$(GDB_PATCH) \
  136
+	  $(RTEMS_SOURCES_URL)/$(GDB_PATCH)
134 137
 	touch $@
135 138
 
136 139
 $(DL)/$(BINUTILS).ok:
@@ -180,5 +183,5 @@ clean:
180 183
 	rm -rf gmp-$(GMP_VERSION)
181 184
 	rm -rf mpc-$(MPC_VERSION)
182 185
 	rm -rf mpfr-$(MPFR_VERSION)
183  
-	rm -rf .*.ok
184  
-	rm -rf .ok
  186
+	rm -f .*.ok
  187
+	rm -f .ok

0 notes on commit 97b0aac

Please sign in to comment.
Something went wrong with that request. Please try again.