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

[tyndur-devel] [PATCH 2/2] + Makefile: Target lbuilds-env



---
 Makefile                  |   16 +++++++++++++++-
 buildmk.sh                |   19 ++++++++++++++++++-
 config.sh                 |    2 +-
 src/include/lost/config.h |    2 +-
 4 files changed, 35 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 83ed21a..bc59f46 100644
--- a/Makefile
+++ b/Makefile
@@ -25,6 +25,20 @@ subdirs:
 	$(MAKE) --no-print-directory -sC doc
 	$(MAKE) --no-print-directory -sC src
 
+.PHONY: lbuilds-env
+
+lbuilds-env:
+	if [ -d lbuilds ]; then cd lbuilds && git pull; else git clone git://git.tyndur.org/lbuilds.git lbuilds; fi
+	echo "\$$(eval \$$(NOBUILD))" > 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:
+	rm -f src/modules/pas/.nobuild
+
+disable-pascal:
+	echo "\$$(eval \$$(NOBUILD))" > src/modules/pas/.nobuild
+
 clean_objs:
 	rm -f *.o *.a *.mod *.ppu link.res ppas.sh tyndur
 
@@ -35,7 +49,7 @@ 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 Makefile.local
 
-.SILENT: all makefiles subdirs obj clean softclean clean_objs clean_root updateroot image-floppy image-hd test-qemu test-qemu-hd
+.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 345e512..dad2bf3 100644
--- a/buildmk.sh
+++ b/buildmk.sh
@@ -227,6 +227,23 @@ 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
+	echo "\\\$\$(eval \\\$\$(NOBUILD))" > 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:
+	rm -f src/modules/pas/.nobuild
+
+disable-pascal:
+	echo "\\\$\$(eval \\\$\$(NOBUILD))" > src/modules/pas/.nobuild
+EOF
 
 # Code für make clean
 cat <<EOF >> Makefile
@@ -241,7 +258,7 @@ 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 Makefile.local
 
-.SILENT: all makefiles subdirs obj clean softclean clean_objs clean_root updateroot image-floppy image-hd test-qemu test-qemu-hd
+.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
 EOF
 
 if [ "$LOST_BUILDMK_ROOT" == "`pwd`" ]; then
diff --git a/config.sh b/config.sh
index 393e77f..8693bcb 100644
--- a/config.sh
+++ b/config.sh
@@ -1,7 +1,7 @@
 # Ab hier anpassen
 COMPILER_PREFIX_AMD64=
 COMPILER_PREFIX_I386=
-LOST_TOOLS_PPC=fpc
+LOST_TOOLS_PPC=$LOST_BUILDMK_ROOT/lbuilds/env/bin/fpc
 LOST_GRUB_STAGESDIR=/boot/grub
 LOST_GRUB2_MODULESDIR=/usr/lib/grub/i386-pc
 LOST_TOOLS_GRUB=grub
diff --git a/src/include/lost/config.h b/src/include/lost/config.h
index a4582b4..ad960c2 100644
--- a/src/include/lost/config.h
+++ b/src/include/lost/config.h
@@ -71,7 +71,7 @@
 
 //%desc "Stubs in der LibC nicht benutzen"
 //%type "yesno"
-#define CONFIG_LIBC_NO_STUBS
+#undef CONFIG_LIBC_NO_STUBS
 
 
 #define TYNDUR_VERSION "0.2.2"
-- 
1.7.1