[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tyndur-devel] Makefile Patches



Version 2 von Patch 2
jetzt weiß ich auch wieder wieso mir rm `basename \`pwd\`` aufgefallen
ist *g*
Makefile: lbuilds-env und *-pascal targets nur im Hauptmakefile

* lbuilds-env, enable- und disable-pascal Targets werden in den
  Untermakefiles nicht gebraucht

Signed-off-by: Andreas Freimuth <m.nemo@xxxxxxx>

diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,20 @@ subdirs:
 	$(MAKE) --no-print-directory -sC doc
 	$(MAKE) --no-print-directory -sC src
 
+clean_objs:
+	rm -f *.o *.a *.mod *.ppu link.res ppas.sh tyndur
+
+softclean: clean_objs
+	for file in *; do if [ -f "$$file/Makefile" -a \( ! -f "$$file/.nobuild" -o -f "$$file/.ignorenobuild" \) ]; then $(MAKE) -sC "$$file" softclean; fi done
+
+clean: clean_objs
+	for file in *; do if [ -f "$$file/Makefile" -a \( ! -f "$$file/.nobuild" -o -f "$$file/.ignorenobuild" \) ]; then $(MAKE) -sC "$$file" clean; rm "$$file/Makefile"; fi done
+	rm -f Makefile.local
+
+.SILENT: all makefiles subdirs obj lbuilds-env enable-pascal disable-pascal clean softclean clean_objs clean_root updateroot image-floppy image-hd test-qemu test-qemu-hd
 .PHONY: lbuilds-env
 
+# Code für lbuilds
 lbuilds-env:
 	if [ -d lbuilds ]; then cd lbuilds && git pull; else git clone git://git.tyndur.org/lbuilds.git lbuilds; fi
 	touch lbuilds/.nobuild
@@ -39,17 +51,6 @@ enable-pascal:
 disable-pascal:
 	rm -f src/modules/pas/.ignorenobuild
 
-clean_objs:
-	rm -f *.o *.a *.mod *.ppu link.res ppas.sh tyndur
-
-softclean: clean_objs
-	for file in *; do if [ -f "$$file/Makefile" -a \( ! -f "$$file/.nobuild" -o -f "$$file/.ignorenobuild" \) ]; then $(MAKE) -sC "$$file" softclean; fi done
-
-clean: clean_objs
-	for file in *; do if [ -f "$$file/Makefile" -a \( ! -f "$$file/.nobuild" -o -f "$$file/.ignorenobuild" \) ]; then $(MAKE) -sC "$$file" clean; rm "$$file/Makefile"; fi done
-	rm -f Makefile.local
-
-.SILENT: all makefiles subdirs obj lbuilds-env enable-pascal disable-pascal clean softclean clean_objs clean_root updateroot image-floppy image-hd test-qemu test-qemu-hd
 clean: clean_root
 
 clean_root:
diff --git a/buildmk.sh b/buildmk.sh
--- a/buildmk.sh
+++ b/buildmk.sh
@@ -243,24 +243,6 @@ for file in *.c *.cpp *.asm *.pas *.S; d
   fi
 done
 
-# Code für lbuilds
-cat <<EOF >> Makefile
-
-.PHONY: lbuilds-env
-
-lbuilds-env:
-	if [ -d lbuilds ]; then cd lbuilds && git pull; else git clone git://git.tyndur.org/lbuilds.git lbuilds; fi
-	touch lbuilds/.nobuild
-	cd lbuilds && scripts/build_crosstools && scripts/update_env \`dirname \\\`pwd\\\`\` && ln -sf \`pwd\`/tmp/cross-fpc/fpc-2.4.0/rtl/ \`dirname \\\`pwd\\\`\`/src/modules/pas/lib/rtl/include
-	make enable-pascal
-
-enable-pascal:
-	touch src/modules/pas/.ignorenobuild
-
-disable-pascal:
-	rm -f src/modules/pas/.ignorenobuild
-EOF
-
 # Code für make clean
 cat <<EOF >> Makefile
 
@@ -279,6 +261,21 @@ EOF
 
 if [ "$LOST_BUILDMK_ROOT" == "`pwd`" ]; then
 cat <<EOF >> Makefile
+.PHONY: lbuilds-env
+
+# Code für lbuilds
+lbuilds-env:
+	if [ -d lbuilds ]; then cd lbuilds && git pull; else git clone git://git.tyndur.org/lbuilds.git lbuilds; fi
+	touch lbuilds/.nobuild
+	cd lbuilds && scripts/build_crosstools && scripts/update_env \`dirname \\\`pwd\\\`\` && ln -sf \`pwd\`/tmp/cross-fpc/fpc-2.4.0/rtl/ \`dirname \\\`pwd\\\`\`/src/modules/pas/lib/rtl/include
+	make enable-pascal
+
+enable-pascal:
+	touch src/modules/pas/.ignorenobuild
+
+disable-pascal:
+	rm -f src/modules/pas/.ignorenobuild
+
 clean: clean_root
 
 clean_root: