Author: blueswirl Date: 2009-01-23 21:09:26 +0100 (Fri, 23 Jan 2009) New Revision: 420
Modified: openbios-devel/Makefile openbios-devel/arch/ppc/build.xml openbios-devel/arch/sparc32/build.xml openbios-devel/arch/sparc64/build.xml openbios-devel/arch/x86/build.xml openbios-devel/config/examples/amd64_rules.xml openbios-devel/config/examples/cross-ppc_rules.xml openbios-devel/config/examples/cross-sparc32_rules.xml openbios-devel/config/examples/cross-sparc64_rules.xml openbios-devel/config/examples/cross-x86_rules.xml openbios-devel/config/examples/ppc_rules.xml openbios-devel/config/examples/sparc32_rules.xml openbios-devel/config/examples/sparc64_rules.xml openbios-devel/config/examples/x86_rules.xml openbios-devel/config/scripts/switch-arch openbios-devel/config/xml/dictionary.xsl openbios-devel/config/xml/makefile.xsl openbios-devel/config/xml/object.xsl openbios-devel/config/xml/util.xsl openbios-devel/fs/hfs/build.xml openbios-devel/fs/hfsplus/build.xml Log: Add support for configuring for multiple targets
Modified: openbios-devel/Makefile =================================================================== --- openbios-devel/Makefile 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/Makefile 2009-01-23 20:09:26 UTC (rev 420) @@ -1,96 +1,36 @@ -ARCH= $(shell test -r rules.xml && cat rules.xml |grep "^ARCH" |cut -d= -f2|tr -d \ ) HOSTARCH=$(shell config/scripts/archname) -CROSSCFLAGS=$(shell config/scripts/crosscflags $(HOSTARCH) $(ARCH)) -ODIR=obj-$(ARCH) +ODIRS=$(wildcard obj-*) +TARGETS=$(subst obj-,,$(ODIRS))
-all: requirements archtest info build +all: requirements info build
-archtest: prepare - @test -r config.xml -a -r rules.xml || \ - ( echo ; echo "Please run the following command first:"; echo ; \ - echo " $$ config/scripts/switch-arch <arch>"; \ - echo; echo "<arch> can be one out of x86, amd64, cross-ppc, ppc"; \ - echo " cross-sparc32, sparc32, cross-sparc64, sparc64"; \ - echo; exit 1 ) - requirements: - @which toke &>/dev/null || ( echo ; echo "Please install the OpenBIOS fcode utilities."; \ - echo; echo "Download with :"; \ - echo " $$ svn co svn://openbios.org/openbios/fcode-utils"; \ - echo; exit 1 ) @which xsltproc &>/dev/null || ( echo ; echo "Please install libxslt2"; \ echo; exit 1 )
info: - @echo "Building OpenBIOS on $(HOSTARCH) for $(ARCH)" + @echo "Building OpenBIOS on $(HOSTARCH) for $(TARGETS)"
clean: @printf "Cleaning up..." - @rm -rf $(ODIR) forth.dict.core + @rm -rf $(ODIRS) forth.dict.core @find . -type f -name "*~" -exec rm {} ; @echo " ok"
-directories: clean - @printf "Initializing build tree..." - @mkdir $(ODIR) - @mkdir -p $(ODIR)/target - @mkdir -p $(ODIR)/target/include - @mkdir -p $(ODIR)/target/arch - @mkdir -p $(ODIR)/target/arch/unix - @mkdir -p $(ODIR)/target/arch/$(ARCH) - @mkdir -p $(ODIR)/target/arch/ppc - @mkdir -p $(ODIR)/target/arch/ppc/briq # no autodetection of those.. - @mkdir -p $(ODIR)/target/arch/ppc/pearpc - @mkdir -p $(ODIR)/target/arch/ppc/qemu - @mkdir -p $(ODIR)/target/arch/ppc/mol - @mkdir -p $(ODIR)/target/arch/x86 - @mkdir -p $(ODIR)/target/arch/x86/xbox - @mkdir -p $(ODIR)/target/libgcc - @mkdir -p $(ODIR)/target/kernel - @mkdir -p $(ODIR)/target/modules - @mkdir -p $(ODIR)/target/fs - @mkdir -p $(ODIR)/target/fs/grubfs - @mkdir -p $(ODIR)/target/fs/hfs - @mkdir -p $(ODIR)/target/fs/hfsplus - @mkdir -p $(ODIR)/target/drivers - @mkdir -p $(ODIR)/target/libc - @mkdir -p $(ODIR)/host/include - @mkdir -p $(ODIR)/host/kernel - @mkdir -p $(ODIR)/forth - @ln -s $(PWD)/include/$(ARCH) $(ODIR)/target/include/asm - @#compile the host binary with target settings instead - @#ln -s $(PWD)/include/$(HOSTARCH) $(ODIR)/host/include/asm - @echo "ok." - -# This is needed because viewvc messes with the permissions of executables: -prepare: - @chmod 755 utils/dist/debian/rules - @chmod 755 config/scripts/switch-arch - @chmod 755 config/scripts/archname - @chmod 755 config/scripts/reldir - @chmod 755 config/scripts/crosscflags - -xml: directories - @printf "Creating target Makefile..." - @xsltproc config/xml/xinclude.xsl build.xml > $(ODIR)/build-full.xml - @xsltproc config/xml/makefile.xsl $(ODIR)/build-full.xml > $(ODIR)/Makefile - @echo "ok." - @printf "Creating config files..." - @xsltproc config/xml/config-c.xsl config.xml > $(ODIR)/host/include/autoconf.h - @xsltproc config/xml/config-c.xsl config.xml > $(ODIR)/target/include/autoconf.h - @xsltproc config/xml/config-forth.xsl config.xml > $(ODIR)/forth/config.fs - @echo "ok." - -build: xml +build: @printf "Building..." - @( $(MAKE) -f $(ODIR)/Makefile "CROSSCFLAGS=$(CROSSCFLAGS)" > $(ODIR)/build.log 2>&1 && echo "ok." ) || \ - ( echo "error:"; tail -15 $(ODIR)/build.log ) + @for dir in $(ODIRS); do \ + $(MAKE) -C $$dir > $$dir/build.log 2>&1 && echo "ok." || \ + ( echo "error:"; tail -15 $$$dir/build.log; exit 1 ) \ + done
build-verbose: @echo "Building..." - $(MAKE) -f $(ODIR)/Makefile "CROSSCFLAGS=$(CROSSCFLAGS)" + @for dir in $(ODIRS); do \ + $(MAKE) -C $$dir || exit 1; \ + done
-run: +run: @echo "Running..." @$(ODIR)/openbios-unix $(ODIR)/openbios-unix.dict
Modified: openbios-devel/arch/ppc/build.xml =================================================================== --- openbios-devel/arch/ppc/build.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/arch/ppc/build.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -39,7 +39,7 @@
<executable name="target/arch/ppc/briq/kernel.o" target="target" condition="BRIQ"> <rule><![CDATA[ - $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ arch/ppc/briq/kernel.c + $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/briq/kernel.c ]]></rule> <external-object source="target/include/briq-dict.h"/> </executable> @@ -57,7 +57,7 @@
<executable name="target/arch/ppc/pearpc/kernel.o" target="target" condition="PEARPC"> <rule><![CDATA[ - $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ arch/ppc/pearpc/kernel.c + $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/pearpc/kernel.c ]]></rule> <external-object source="target/include/pearpc-dict.h"/> </executable> @@ -74,7 +74,7 @@
<executable name="target/arch/ppc/qemu/kernel.o" target="target" condition="QEMU"> <rule><![CDATA[ - $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ arch/ppc/qemu/kernel.c + $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/qemu/kernel.c ]]></rule> <external-object source="target/include/qemu-dict.h"/> </executable> @@ -92,7 +92,7 @@
<executable name="target/arch/ppc/mol/kernel.o" target="target" condition="MOL"> <rule><![CDATA[ - $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ arch/ppc/mol/kernel.c + $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/ppc/mol/kernel.c ]]></rule> <external-object source="target/include/mol-dict.h"/> </executable> @@ -105,13 +105,13 @@ $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule> </object> <object source="ofmem.c"/> - <object source="briq/briq.c" flags="-Iarch/ppc"/> - <object source="briq/init.c" flags="-Iarch/ppc"/> + <object source="briq/briq.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="briq/init.c" flags="-I$(SRCDIR)/arch/ppc"/> <external-object source="target/arch/ppc/briq/kernel.o"/> - <object source="briq/main.c" flags="-Iarch/ppc"/> - <object source="briq/methods.c" flags="-Iarch/ppc"/> - <object source="briq/tree.c" flags="-Iarch/ppc"/> - <object source="briq/vfd.c" flags="-Iarch/ppc"/> + <object source="briq/main.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="briq/methods.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="briq/tree.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="briq/vfd.c" flags="-I$(SRCDIR)/arch/ppc"/> </library>
<library name="pearpc" target="target" type="static" condition="PEARPC"> @@ -120,15 +120,15 @@ $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule> </object> <object source="ofmem.c"/> - <object source="pearpc/pearpc.c" flags="-Iarch/ppc"/> - <object source="pearpc/init.c" flags="-Iarch/ppc"/> + <object source="pearpc/pearpc.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="pearpc/init.c" flags="-I$(SRCDIR)/arch/ppc"/> <external-object source="target/arch/ppc/pearpc/kernel.o"/> - <object source="pearpc/main.c" flags="-Iarch/ppc"/> - <object source="pearpc/methods.c" flags="-Iarch/ppc"/> - <object source="pearpc/tree.c" flags="-Iarch/ppc"/> - <object source="pearpc/vfd.c" flags="-Iarch/ppc"/> + <object source="pearpc/main.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="pearpc/methods.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="pearpc/tree.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="pearpc/vfd.c" flags="-I$(SRCDIR)/arch/ppc"/> <!-- taken from mol: generalize --> - <object source="pearpc/console.c" flags="-Iarch/ppc"/> + <object source="pearpc/console.c" flags="-I$(SRCDIR)/arch/ppc"/> </library>
<library name="qemu" target="target" type="static" condition="QEMU"> @@ -137,13 +137,13 @@ $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule> </object> <object source="qemu/ofmem.c"/> - <object source="qemu/qemu.c" flags="-Iarch/ppc"/> - <object source="qemu/init.c" flags="-Iarch/ppc"/> + <object source="qemu/qemu.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="qemu/init.c" flags="-I$(SRCDIR)/arch/ppc"/> <external-object source="target/arch/ppc/qemu/kernel.o"/> - <object source="qemu/main.c" flags="-Iarch/ppc"/> - <object source="qemu/methods.c" flags="-Iarch/ppc"/> - <object source="qemu/vfd.c" flags="-Iarch/ppc"/> - <object source="qemu/console.c" flags="-Iarch/ppc"/> + <object source="qemu/main.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="qemu/methods.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="qemu/vfd.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="qemu/console.c" flags="-I$(SRCDIR)/arch/ppc"/> </library>
@@ -153,16 +153,16 @@ $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule> </object> <object source="ofmem.c"/> - <object source="mol/init.c" flags="-Iarch/ppc"/> - <object source="mol/main.c" flags="-Iarch/ppc"/> - <object source="mol/mol.c" flags="-Iarch/ppc"/> - <object source="mol/console.c" flags="-Iarch/ppc"/> - <object source="mol/osi-blk.c" flags="-Iarch/ppc"/> - <object source="mol/osi-scsi.c" flags="-Iarch/ppc"/> - <object source="mol/pseudodisk.c" flags="-Iarch/ppc"/> - <object source="mol/methods.c" flags="-Iarch/ppc"/> - <object source="mol/prom.c" flags="-Iarch/ppc"/> - <object source="mol/tree.c" flags="-Iarch/ppc"/> + <object source="mol/init.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/main.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/mol.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/console.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/osi-blk.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/osi-scsi.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/pseudodisk.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/methods.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/prom.c" flags="-I$(SRCDIR)/arch/ppc"/> + <object source="mol/tree.c" flags="-I$(SRCDIR)/arch/ppc"/> <external-object source="target/arch/ppc/mol/kernel.o"/> </library>
@@ -215,7 +215,7 @@
<executable name="openbios-qemu.elf" target="target" condition="QEMU"> <rule> - $(LD) --warn-common -N -T arch/ppc/qemu/ldscript $^ -o $@ + $(LD) --warn-common -N -T $(SRCDIR)/arch/ppc/qemu/ldscript $^ -o $@ $(NM) $@ | sort > $(ODIR)/openbios-qemu.syms cp $@ $@.nostrip $(STRIP) $@
Modified: openbios-devel/arch/sparc32/build.xml =================================================================== --- openbios-devel/arch/sparc32/build.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/arch/sparc32/build.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -23,17 +23,17 @@ </library>
<executable name="target/arch/sparc32/entry.o" target="target"> - <rule><![CDATA[ arch/sparc32/entry.S + <rule><![CDATA[ $(SRCDIR)/arch/sparc32/entry.S $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule> </executable> <executable name="target/arch/sparc32/vectors.o" target="target"> - <rule><![CDATA[ arch/sparc32/vectors.S arch/sparc32/wof.S arch/sparc32/wuf.S - $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ arch/sparc32/vectors.S]]></rule> + <rule><![CDATA[ $(SRCDIR)/arch/sparc32/vectors.S $(SRCDIR)/arch/sparc32/wof.S $(SRCDIR)/arch/sparc32/wuf.S + $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc32/vectors.S]]></rule> </executable>
<executable name="openbios-plain.elf" target="target" condition="IMAGE_ELF"> <rule> - $(LD) --warn-common -N -T arch/sparc32/ldscript -o $@.nostrip $^ + $(LD) --warn-common -N -T $(SRCDIR)/arch/sparc32/ldscript -o $@.nostrip $^ $(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms cp $@.nostrip $@ $(STRIP) $@</rule> @@ -61,15 +61,15 @@ </executable>
<executable name="target/arch/sparc32/builtin.o" target="target" condition="IMAGE_ELF_EMBEDDED"> - <rule><![CDATA[ arch/sparc32/builtin.c $(ODIR)/target/include/static-dict.h - $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ arch/sparc32/builtin.c]]></rule> + <rule><![CDATA[ $(SRCDIR)/arch/sparc32/builtin.c $(ODIR)/target/include/static-dict.h + $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc32/builtin.c]]></rule> </executable>
<!-- END OF HACK ALERT -->
<executable name="openbios-builtin.elf" target="target" condition="IMAGE_ELF_EMBEDDED"> <rule> - $(LD) --warn-common -N -T arch/sparc32/ldscript -o $@.nostrip $^ + $(LD) --warn-common -N -T $(SRCDIR)/arch/sparc32/ldscript -o $@.nostrip $^ $(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms cp $@.nostrip $@ $(STRIP) $@</rule>
Modified: openbios-devel/arch/sparc64/build.xml =================================================================== --- openbios-devel/arch/sparc64/build.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/arch/sparc64/build.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -22,17 +22,17 @@ </library>
<executable name="target/arch/sparc64/entry.o" target="target"> - <rule><![CDATA[ arch/sparc64/entry.S + <rule><![CDATA[ $(SRCDIR)/arch/sparc64/entry.S $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule> </executable> <executable name="target/arch/sparc64/vectors.o" target="target"> - <rule><![CDATA[ arch/sparc64/vectors.S + <rule><![CDATA[ $(SRCDIR)/arch/sparc64/vectors.S $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule> </executable>
<executable name="openbios-plain.elf" target="target" condition="IMAGE_ELF"> <rule> - $(LD) --warn-common -T arch/sparc64/ldscript -o $@.nostrip $^ + $(LD) --warn-common -T $(SRCDIR)/arch/sparc64/ldscript -o $@.nostrip $^ $(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms cp $@.nostrip $@ $(STRIP) $@</rule> @@ -61,8 +61,8 @@ </executable>
<executable name="target/arch/sparc64/builtin.o" target="target" condition="IMAGE_ELF_EMBEDDED"> - <rule><![CDATA[ arch/sparc64/builtin.c $(ODIR)/target/include/static-dict.h - $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ arch/sparc64/builtin.c]]></rule> + <rule><![CDATA[ $(SRCDIR)/arch/sparc64/builtin.c $(ODIR)/target/include/static-dict.h + $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/sparc64/builtin.c]]></rule> </executable>
<!-- END OF HACK ALERT --> @@ -70,7 +70,7 @@ <executable name="openbios-builtin.elf" target="target" condition="IMAGE_ELF_EMBEDDED"> <!-- We use -N to reduce the file size by 1M --> <rule> - $(LD) --warn-common -N -T arch/sparc64/ldscript -o $@.nostrip $^ + $(LD) --warn-common -N -T $(SRCDIR)/arch/sparc64/ldscript -o $@.nostrip $^ $(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms cp $@.nostrip $@ $(STRIP) $@</rule>
Modified: openbios-devel/arch/x86/build.xml =================================================================== --- openbios-devel/arch/x86/build.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/arch/x86/build.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -22,13 +22,13 @@ </library>
<executable name="target/arch/x86/entry.o" target="target"> - <rule><![CDATA[ arch/x86/entry.S + <rule><![CDATA[ $(SRCDIR)/arch/x86/entry.S $(CC) $$EXTRACFLAGS $(AS_FLAGS) $(CFLAGS) $(INCLUDES) -c -o $@ $^]]></rule> </executable>
<executable name="openbios.multiboot" target="target" condition="IMAGE_ELF_MULTIBOOT"> <rule> - $(LD) --warn-common -N -T arch/x86/ldscript -o $@.nostrip $^ + $(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip $^ $(NM) $@.nostrip | sort > $(ODIR)/openbios-multiboot.syms cp $@.nostrip $@ $(STRIP) $@ @@ -47,7 +47,7 @@
<executable name="openbios-plain.elf" target="target" condition="IMAGE_ELF"> <rule> - $(LD) --warn-common -N -T arch/x86/ldscript -o $@.nostrip $^ + $(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip $^ $(NM) $@.nostrip | sort > $(ODIR)/openbios-plain.syms cp $@.nostrip $@ $(STRIP) $@ @@ -78,7 +78,7 @@
<executable name="target/arch/x86/builtin.o" target="target" condition="IMAGE_ELF_EMBEDDED"> <rule><![CDATA[ - $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ arch/x86/builtin.c + $(CC) $$EXTRACFLAGS $(CFLAGS) $(INCLUDES) -c -o $@ $(SRCDIR)/arch/x86/builtin.c ]]></rule> <external-object source="target/include/static-dict.h"/> </executable> @@ -87,7 +87,7 @@
<executable name="openbios-builtin.elf" target="target" condition="IMAGE_ELF_EMBEDDED"> <rule> - $(LD) --warn-common -N -T arch/x86/ldscript -o $@.nostrip $^ + $(LD) --warn-common -N -T $(SRCDIR)/arch/x86/ldscript -o $@.nostrip $^ $(NM) $@.nostrip | sort > $(ODIR)/openbios-builtin.syms cp $@.nostrip $@ $(STRIP) $@</rule>
Modified: openbios-devel/config/examples/amd64_rules.xml =================================================================== --- openbios-devel/config/examples/amd64_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/amd64_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,12 +7,15 @@ #
ARCH := amd64 -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
CC := gcc AS := as @@ -26,7 +29,7 @@ CFLAGS := -Os -Wall -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin -g CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
# # pre rules
Modified: openbios-devel/config/examples/cross-ppc_rules.xml =================================================================== --- openbios-devel/config/examples/cross-ppc_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/cross-ppc_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,12 +7,15 @@ #
ARCH := ppc -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -Os -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include # # MOLPATH is needed if you want to build openbios-mol.elf # @@ -29,7 +32,7 @@ CFLAGS := -Os -Wall -msoft-float -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin-bcopy -fno-builtin-log2 CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Werror CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
M4 := m4
Modified: openbios-devel/config/examples/cross-sparc32_rules.xml =================================================================== --- openbios-devel/config/examples/cross-sparc32_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/cross-sparc32_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,12 +7,15 @@ #
ARCH := sparc32 -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
TARGET=sparc-elf- CC := $(TARGET)gcc @@ -26,7 +29,7 @@ CFLAGS+= -Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include AS_FLAGS := -Wa,-xarch=v8 -Wa,-32 -g
#
Modified: openbios-devel/config/examples/cross-sparc64_rules.xml =================================================================== --- openbios-devel/config/examples/cross-sparc64_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/cross-sparc64_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,12 +7,15 @@ #
ARCH := sparc64 -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
TARGET=sparc64-elf- CC := $(TARGET)gcc @@ -27,7 +30,7 @@ CFLAGS+= -fno-builtin -nostdlib -ffreestanding CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include AS_FLAGS := -Wa,-xarch=v9b -Wa,-64 -g
#
Modified: openbios-devel/config/examples/cross-x86_rules.xml =================================================================== --- openbios-devel/config/examples/cross-x86_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/cross-x86_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,12 +7,15 @@ #
ARCH := x86 -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
#TARGET=i386-elf- TARGET= @@ -27,7 +30,7 @@ CFLAGS+= -m32 CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include AS_FLAGS := -Wa,-32 -g
#
Modified: openbios-devel/config/examples/ppc_rules.xml =================================================================== --- openbios-devel/config/examples/ppc_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/ppc_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,12 +7,15 @@ #
ARCH := ppc -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -Os -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include # # MOLPATH is needed if you want to build openbios-mol.elf # @@ -28,7 +31,7 @@ CFLAGS := -Os -Wall -msoft-float -DNATIVE_BITWIDTH_EQUALS_HOST_BITWIDTH -USWAP_ENDIANNESS -fno-builtin-bcopy -fno-builtin-log2 CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -Werror -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
M4 := m4
Modified: openbios-devel/config/examples/sparc32_rules.xml =================================================================== --- openbios-devel/config/examples/sparc32_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/sparc32_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,12 +7,15 @@ #
ARCH := sparc32 -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
CC := gcc AS := as @@ -31,7 +34,7 @@ CFLAGS+= -Wa,-xarch=v8 -Wa,-32 -m32 -mcpu=supersparc CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include AS_FLAGS := -Wa,-xarch=v8 -Wa,-32 -g
#
Modified: openbios-devel/config/examples/sparc64_rules.xml =================================================================== --- openbios-devel/config/examples/sparc64_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/sparc64_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,13 +7,16 @@ #
ARCH := sparc64 -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wa,-xarch=v9 -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
CC := gcc AS := as @@ -32,7 +35,7 @@ CFLAGS+= -Wa,-xarch=v9b -Wa,-64 -m64 -mcpu=ultrasparc -mcmodel=medany CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include AS_FLAGS := -Wa,-xarch=v9b -Wa,-64 -g
ifeq ($(shell uname), OpenBSD)
Modified: openbios-devel/config/examples/x86_rules.xml =================================================================== --- openbios-devel/config/examples/x86_rules.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/examples/x86_rules.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -7,12 +7,15 @@ #
ARCH := x86 -ODIR := obj-$(ARCH) +ODIR := . +SRCDIR := .. HOSTCC := gcc +HOSTARCH=$(shell $(SRCDIR)/config/scripts/archname) +CROSSCFLAGS=$(shell $(SRCDIR)/config/scripts/crosscflags $(HOSTARCH) $(ARCH)) HOSTCFLAGS := -O2 -g -Wall -W -DFCOMPILER -DBOOTSTRAP $(CROSSCFLAGS) HOSTCFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations HOSTCFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -HOSTINCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +HOSTINCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include
CC := gcc AR := ar @@ -29,7 +32,7 @@ CFLAGS+= -m32 CFLAGS+= -Wredundant-decls -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations CFLAGS+= -Wundef -Wendif-labels -Wstrict-aliasing -Wwrite-strings -Wmissing-prototypes -INCLUDES := -Iinclude -Ikernel/include -I$(ODIR)/target/include +INCLUDES := -I$(SRCDIR)/include -I$(SRCDIR)/kernel/include -I$(ODIR)/target/include AS_FLAGS := -Wa,-32 -g
#
Modified: openbios-devel/config/scripts/switch-arch =================================================================== --- openbios-devel/config/scripts/switch-arch 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/scripts/switch-arch 2009-01-23 20:09:26 UTC (rev 420) @@ -1,7 +1,7 @@ #!/bin/sh
if [ x"$1" = x ]; then - printf "Usage:\n $0 [arch-config]\n" + printf "Usage:\n $0 [arch-config]...\n" printf "arch-config values supported for native builds:\n" printf " amd64, ppc, sparc32, sparc64, x86\n" printf "arch-config values supported for cross compiled builds:\n" @@ -9,9 +9,64 @@ exit 0 fi
-ARCH=$1 +# This is needed because viewvc messes with the permissions of executables: +chmod 755 utils/dist/debian/rules +chmod 755 config/scripts/switch-arch +chmod 755 config/scripts/archname +chmod 755 config/scripts/reldir +chmod 755 config/scripts/crosscflags +HOSTARCH=`config/scripts/archname`
-rm -f rules.xml -rm -f config.xml -ln -s config/examples/${ARCH}_rules.xml rules.xml -ln -s config/examples/${ARCH}_config.xml config.xml +echo "Configuring OpenBIOS on $HOSTARCH for $*" +for RULES_ARCH in $*; do + ARCH=`cat config/examples/${RULES_ARCH}_rules.xml |grep "^ARCH" |cut -d= -f2|tr -d \ ` + OBJDIR=obj-$ARCH + printf "Initializing build tree $OBJDIR..." + rm -rf "$OBJDIR" + mkdir "$OBJDIR" + mkdir -p $OBJDIR/target + mkdir -p $OBJDIR/target/include + mkdir -p $OBJDIR/target/arch + mkdir -p $OBJDIR/target/arch/unix + mkdir -p $OBJDIR/target/arch/$ARCH + mkdir -p $OBJDIR/target/arch/ppc + mkdir -p $OBJDIR/target/arch/ppc/briq # no autodetection of those.. + mkdir -p $OBJDIR/target/arch/ppc/pearpc + mkdir -p $OBJDIR/target/arch/ppc/qemu + mkdir -p $OBJDIR/target/arch/ppc/mol + mkdir -p $OBJDIR/target/arch/x86 + mkdir -p $OBJDIR/target/arch/x86/xbox + mkdir -p $OBJDIR/target/libgcc + mkdir -p $OBJDIR/target/kernel + mkdir -p $OBJDIR/target/modules + mkdir -p $OBJDIR/target/fs + mkdir -p $OBJDIR/target/fs/grubfs + mkdir -p $OBJDIR/target/fs/hfs + mkdir -p $OBJDIR/target/fs/hfsplus + mkdir -p $OBJDIR/target/drivers + mkdir -p $OBJDIR/target/libc + mkdir -p $OBJDIR/host/include + mkdir -p $OBJDIR/host/kernel + mkdir -p $OBJDIR/forth + ln -s ../../../include/$ARCH $OBJDIR/target/include/asm + #compile the host binary with target settings instead + #ln -s ../../../include/$HOSTARCH $OBJDIR/host/include/asm + echo "ok." + + cd $OBJDIR + SRCDIR=.. + ODIR=. + + printf "Creating target Makefile..." + ln -s $SRCDIR/config/examples/${RULES_ARCH}_rules.xml $ODIR/rules.xml + ln -s $SRCDIR/config/examples/${RULES_ARCH}_config.xml $ODIR/config.xml + xsltproc $SRCDIR/config/xml/xinclude.xsl $SRCDIR/build.xml > $ODIR/build-full.xml + xsltproc $SRCDIR/config/xml/makefile.xsl $ODIR/build-full.xml > $ODIR/Makefile + echo "ok." + printf "Creating config files..." + xsltproc $SRCDIR/config/xml/config-c.xsl $SRCDIR/config/examples/${RULES_ARCH}_config.xml > $ODIR/host/include/autoconf.h + xsltproc $SRCDIR/config/xml/config-c.xsl $SRCDIR/config/examples/${RULES_ARCH}_config.xml > $ODIR/target/include/autoconf.h + xsltproc $SRCDIR/config/xml/config-forth.xsl $SRCDIR/config/examples/${RULES_ARCH}_config.xml > $ODIR/forth/config.fs + echo "ok." + cd $SRCDIR +done
Modified: openbios-devel/config/xml/dictionary.xsl =================================================================== --- openbios-devel/config/xml/dictionary.xsl 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/xml/dictionary.xsl 2009-01-23 20:09:26 UTC (rev 420) @@ -56,6 +56,7 @@ <xsl:value-of select="$dictname"/>xsl:text-DICTIONARY:=$(</xsl:text> <xsl:value-of select="$dictname"/>xsl:text-DICTIONARY) </xsl:text>
+ xsl:text$(SRCDIR)/</xsl:text> <xsl:value-of select="$path"/> <xsl:value-of select="@source"/> xsl:text </xsl:text> @@ -116,6 +117,7 @@
<xsl:if test="$conditions = 0"> xsl:text -I</xsl:text> + xsl:text$(SRCDIR)/</xsl:text> <xsl:value-of select="$path"/> </xsl:if> </xsl:for-each>
Modified: openbios-devel/config/xml/makefile.xsl =================================================================== --- openbios-devel/config/xml/makefile.xsl 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/xml/makefile.xsl 2009-01-23 20:09:26 UTC (rev 420) @@ -7,7 +7,7 @@ <xsl:include href="object.xsl"/>
<xsl:template match="/"> - <xsl:value-of select="document('../../rules.xml')/rules/pre"/> + <xsl:value-of select="document('rules.xml',.)/rules/pre"/> <xsl:apply-templates select="." mode="dictionaries"/> <xsl:apply-templates select="." mode="objects"/> </xsl:template>
Modified: openbios-devel/config/xml/object.xsl =================================================================== --- openbios-devel/config/xml/object.xsl 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/xml/object.xsl 2009-01-23 20:09:26 UTC (rev 420) @@ -52,6 +52,7 @@ xsl:text.o: </xsl:text>
<!-- path of source file --> + xsl:text$(SRCDIR)/</xsl:text> <xsl:value-of select="$path"/> <xsl:value-of select="@source"/>
@@ -68,7 +69,7 @@ xsl:text" ;</xsl:text> </xsl:if> <!-- FIXME this requires strict spaces in rules.xml --> - <xsl:value-of select="document('../../rules.xml')//rule[@target=$target][@entity='object']"/> + <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='object']"/> </xsl:otherwise> </xsl:choose>
@@ -154,7 +155,7 @@ </xsl:when> xsl:otherwise <!-- FIXME this requires strict spaces in rules.xml --> - <xsl:value-of select="document('../../rules.xml')//rule[@target=$target][@entity='executable']"/> + <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='executable']"/> </xsl:otherwise> </xsl:choose>
@@ -252,7 +253,7 @@
<!-- FIXME this requires strict spaces in rules.xml --> - <xsl:value-of select="document('../../rules.xml')//rule[@target=$target][@entity='library']"/> + <xsl:value-of select="document('rules.xml',.)//rule[@target=$target][@entity='library']"/>
</xsl:if> </xsl:if>
Modified: openbios-devel/config/xml/util.xsl =================================================================== --- openbios-devel/config/xml/util.xsl 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/config/xml/util.xsl 2009-01-23 20:09:26 UTC (rev 420) @@ -44,8 +44,8 @@
xsl:choose <xsl:when test="$expression!=''"> - <xsl:variable name="value"><xsl:value-of select="document('../../config.xml')//option[@name=$confexpr]/attribute::value"/></xsl:variable> - <xsl:variable name="type"><xsl:value-of select="document('../../config.xml')//option[@name=$confexpr]/attribute::type"/></xsl:variable> + <xsl:variable name="value"><xsl:value-of select="document('config.xml',.)//option[@name=$confexpr]/attribute::value"/></xsl:variable> + <xsl:variable name="type"><xsl:value-of select="document('config.xml',.)//option[@name=$confexpr]/attribute::type"/></xsl:variable> xsl:choose <xsl:when test="$type='boolean'"> xsl:choose
Modified: openbios-devel/fs/hfs/build.xml =================================================================== --- openbios-devel/fs/hfs/build.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/fs/hfs/build.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -1,15 +1,15 @@ <build> <library name="fs" type="static" target="target"> - <object source="block.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="btree.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="data.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="file.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="hfs.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="low.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="medium.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="node.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="record.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="volume.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> - <object source="hfs_fs.c" flags="-Ifs/hfs/include -Ifs/ -fno-strict-aliasing" condition="HFS"/> + <object source="block.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="btree.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="data.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="file.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="hfs.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="low.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="medium.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="node.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="record.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="volume.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> + <object source="hfs_fs.c" flags="-I$(SRCDIR)/fs/hfs/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFS"/> </library> </build>
Modified: openbios-devel/fs/hfsplus/build.xml =================================================================== --- openbios-devel/fs/hfsplus/build.xml 2009-01-18 10:14:58 UTC (rev 419) +++ openbios-devel/fs/hfsplus/build.xml 2009-01-23 20:09:26 UTC (rev 420) @@ -1,11 +1,11 @@ <build> <library name="fs" type="static" target="target"> - <object source="blockiter.c" flags="-Ifs/hfsplus/include -Ifs/ -fno-strict-aliasing" condition="HFSP"/> - <object source="btree.c" flags="-Ifs/hfsplus/include -Ifs/ -fno-strict-aliasing" condition="HFSP"/> - <object source="libhfsp.c" flags="-Ifs/hfsplus/include -Ifs/ -fno-strict-aliasing" condition="HFSP"/> - <object source="record.c" flags="-Ifs/hfsplus/include -Ifs/ -fno-strict-aliasing" condition="HFSP"/> - <object source="unicode.c" flags="-Ifs/hfsplus/include -Ifs/ -fno-strict-aliasing" condition="HFSP"/> - <object source="volume.c" flags="-Ifs/hfsplus/include -Ifs/ -fno-strict-aliasing" condition="HFSP"/> - <object source="hfsp_fs.c" flags="-Ifs/hfsplus/include -Ifs/ -fno-strict-aliasing" condition="HFSP"/> + <object source="blockiter.c" flags="-I$(SRCDIR)/fs/hfsplus/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFSP"/> + <object source="btree.c" flags="-I$(SRCDIR)/fs/hfsplus/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFSP"/> + <object source="libhfsp.c" flags="-I$(SRCDIR)/fs/hfsplus/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFSP"/> + <object source="record.c" flags="-I$(SRCDIR)/fs/hfsplus/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFSP"/> + <object source="unicode.c" flags="-I$(SRCDIR)/fs/hfsplus/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFSP"/> + <object source="volume.c" flags="-I$(SRCDIR)/fs/hfsplus/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFSP"/> + <object source="hfsp_fs.c" flags="-I$(SRCDIR)/fs/hfsplus/include -I$(SRCDIR)/fs/ -fno-strict-aliasing" condition="HFSP"/> </library> </build>