[tyndur-devel] [PATCH 2/2] Makefile: lbuilds-env und *-pascal targets nur im Hauptmakefile
Andreas Freimuth ·
* lbuilds-env, enable- und disable-pascal Targets werden in den Untermakefiles nicht gebraucht Signed-off-by: Andreas Freimuth <m.nemo at gmx.net> --- Makefile | 23 ++++++++++++----------- buildmk.sh | 33 +++++++++++++++------------------ 2 files changed, 27 insertions(+), 29 deletions(-) diff --git a/Makefile b/Makefile index 844814c..3b1972a 100644 --- 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 index fc030ce..1250301 100644 --- a/buildmk.sh +++ b/buildmk.sh @@ -243,24 +243,6 @@ for file in *.c *.cpp *.asm *.pas *.S; do 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: -- 1.7.3.4