Author: oxygene Date: Sat Mar 27 18:18:39 2010 New Revision: 5304 URL: https://tracker.coreboot.org/trac/coreboot/changeset/5304
Log: make only needs to read Makefile.incs once, thanks to the SECONDEXPANSION feature of GNU make (and we rely on GNU make for lots of things already)
File paths are relative to the root directory, which simplifies debugging (make V=1 gives shorter command lines) and helps ccache finding matches for checkouts in different directories (even though it should normalize paths itself)
Signed-off-by: Patrick Georgi patrick.georgi@coresystems.de Acked-by: Ronald G. Minnich rminnich@gmail.com
Modified: trunk/Makefile trunk/src/arch/i386/Makefile.bigbootblock.inc trunk/src/arch/i386/Makefile.bootblock.inc trunk/src/arch/i386/Makefile.inc trunk/src/arch/i386/lib/Makefile.inc trunk/src/cpu/x86/smm/Makefile.inc trunk/util/abuild/abuild trunk/util/cbfstool/Makefile.inc
Modified: trunk/Makefile ============================================================================== --- trunk/Makefile Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/Makefile Sat Mar 27 18:18:39 2010 (r5304) @@ -33,9 +33,9 @@ endif
export top := $(PWD) -export src := $(top)/src +export src := src export srck := $(top)/util/kconfig -export obj ?= $(top)/build +export obj ?= build export objk := $(obj)/util/kconfig export sconfig := $(top)/util/sconfig export yapps2_py := $(sconfig)/yapps2.py @@ -136,9 +136,12 @@ chmod +x .ccwrap scan-build $(CONFIG_SCANBUILD_REPORT_LOCATION) -analyze-headers --use-cc=$(top)/.ccwrap --use-c++=$(top)/.ccwrap $(MAKE) INNER_SCANBUILD=y else -all: $(obj)/config.h coreboot +all: $(obj)/config.h $(obj)/build.h coreboot endif
+# must come rather early +.SECONDEXPANSION: + $(obj)/config.h: $(MAKE) oldconfig
@@ -156,7 +159,7 @@ # Creation of these is architecture and mainboard independent $(obj)/mainboard/$(MAINBOARDDIR)/static.c: $(src)/mainboard/$(MAINBOARDDIR)/devicetree.cb $(obj)/mainboard/$(MAINBOARDDIR)/config.py mkdir -p $(obj)/mainboard/$(MAINBOARDDIR) - (cd $(obj)/mainboard/$(MAINBOARDDIR) ; PYTHONPATH=$(top)/util/sconfig export PYTHONPATH; python config.py $(MAINBOARDDIR) $(top) $(obj)/mainboard/$(MAINBOARDDIR)) + (PYTHONPATH=$(top)/util/sconfig python $(obj)/mainboard/$(MAINBOARDDIR)/config.py $(MAINBOARDDIR) $(top) $(obj)/mainboard/$(MAINBOARDDIR))
objs:=$(obj)/mainboard/$(MAINBOARDDIR)/static.o initobjs:= @@ -173,12 +176,12 @@ $(foreach type,$(2), $(eval $(type)-y:=)) \ $(eval subdirs-y:=) \ $(eval -include $(1)) \ - $(if $(strip $(3)), \ - $(foreach type,$(2), \ - $(eval $(type)s+= \ - $$(abspath $$(patsubst src/%, \ - $(obj)/%, \ - $$(addprefix $(dir $(1)),$$($(type)-y))))))) \ + $(foreach type,$(2), \ + $(eval $(type)s+= \ + $$(subst $(top)/,, \ + $$(abspath $$(patsubst src/%, \ + $(obj)/%, \ + $$(addprefix $(dir $(1)),$$($(type)-y))))))) \ $(eval subdirs+=$$(subst $(PWD)/,,$$(abspath $$(addprefix $(dir $(1)),$$(subdirs-y)))))
# For each path in $(subdirs) call includemakefiles, passing $(1) as $(3) @@ -187,12 +190,12 @@ $(eval cursubdirs:=$(subdirs)) \ $(eval subdirs:=) \ $(foreach dir,$(cursubdirs), \ - $(eval $(call includemakefiles,$(dir)/Makefile.inc,$(types),$(1)))) \ - $(if $(subdirs),$(eval $(call evaluate_subdirs, $(1)))) + $(eval $(call includemakefiles,$(dir)/Makefile.inc,$(types)))) \ + $(if $(subdirs),$(eval $(call evaluate_subdirs)))
# collect all object files eligible for building subdirs:=$(PLATFORM-y) $(BUILD-y) -$(eval $(call evaluate_subdirs, modify)) +$(eval $(call evaluate_subdirs))
initobjs:=$(addsuffix .initobj.o, $(basename $(initobjs))) drivers:=$(addsuffix .driver.o, $(basename $(drivers))) @@ -203,17 +206,10 @@ source_with_ext=$(patsubst $(obj)/%.o,src/%.$(1),$(allobjs)) allsrc=$(wildcard $(call source_with_ext,c) $(call source_with_ext,S))
-POST_EVALUATION:=y - -# fetch rules (protected in POST_EVALUATION) that rely on the variables filled above -subdirs:=$(PLATFORM-y) $(BUILD-y) -$(eval $(call evaluate_subdirs)) - - define objs_asl_template $(obj)/$(1)%.o: src/$(1)%.asl @printf " IASL $$(subst $(top)/,,$$(@))\n" - $(CPP) -D__ACPI__ -P -include $(obj)/config.h -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl + $(CPP) -D__ACPI__ -P -include $(abspath $(obj)/config.h) -I$(src) -I$(src)/mainboard/$(MAINBOARDDIR) $$< -o $$(basename $$@).asl iasl -p $$(basename $$@) -tc $$(basename $$@).asl mv $$(basename $$@).hex $$(basename $$@).c $(CC) $$(CFLAGS) $$(if $$(subst dsdt,,$$(basename $$(notdir $$@))), -DAmlCode=AmlCode_$$(basename $$(notdir $$@))) -c -o $$@ $$(basename $$@).c @@ -226,7 +222,7 @@ # $3 .o infix ("" ".initobj", ...) # $4 additional compiler flags de$(EMPTY)fine $(1)_$(2)_template -$(obj)/$$(1)%$(3).o: src/$$(1)%.$(2) $(obj)/config.h +$(obj)/$$(1)%$(3).o: src/$$(1)%.$(2) | $(obj)/build.h $(obj)/config.h printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n" $(CC) $(4) -MMD $$$$(CFLAGS) -c -o $$$$@ $$$$< en$(EMPTY)def @@ -270,9 +266,10 @@ @echo $(patsubst $(top)/%,%,$(crt0s))
OBJS := $(patsubst %,$(obj)/%,$(TARGETS-y)) -INCLUDES := -I$(top)/src -I$(top)/src/include -I$(obj) -I$(top)/src/arch/$(ARCHDIR-y)/include -INCLUDES += -I$(top)/src/devices/oprom/include -INCLUDES += -include $(obj)/config.h +INCLUDES := -Isrc -Isrc/include -I$(obj) -Isrc/arch/$(ARCHDIR-y)/include +INCLUDES += -Isrc/devices/oprom/include +# abspath is a workaround for romcc +INCLUDES += -include $(abspath $(obj)/config.h) -include $(abspath $(obj)/build.h)
CFLAGS = $(INCLUDES) -Os -nostdinc -pipe CFLAGS += -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes @@ -298,7 +295,7 @@ mkdir -p $(obj)/util/kconfig/lxdialog $(obj)/util/cbfstool test -n "$(alldirs)" && mkdir -p $(alldirs) || true
-$(obj)/build.h: .xcompile +$(obj)/build.h $(abspath $(obj)/build.h): .xcompile @printf " GEN build.h\n" rm -f $(obj)/build.h printf "/* build system definitions (autogenerated) */\n" > $(obj)/build.ht
Modified: trunk/src/arch/i386/Makefile.bigbootblock.inc ============================================================================== --- trunk/src/arch/i386/Makefile.bigbootblock.inc Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/src/arch/i386/Makefile.bigbootblock.inc Sat Mar 27 18:18:39 2010 (r5304) @@ -1,5 +1,3 @@ -ifdef POST_EVALUATION - ####################################################################### # Build the final rom image
@@ -14,11 +12,11 @@ @printf " OBJCOPY $(subst $(obj)/,,$(@))\n" $(OBJCOPY) -O binary $< $@
-$(obj)/ldscript.ld: $(ldscripts) $(obj)/ldoptions +$(obj)/ldscript.ld: $$(ldscripts) $(obj)/ldoptions printf 'INCLUDE "ldoptions"\n' > $@ printf '$(foreach ldscript,$(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' >> $@
-$(obj)/crt0_includes.h: $(crt0s) +$(obj)/crt0_includes.h: $$(crt0s) @printf " GEN $(subst $(obj)/,,$(@))\n" printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@
@@ -30,9 +28,8 @@ @printf " CC $(subst $(obj)/,,$(@))\n" $(CC) -MMD -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@
-$(obj)/coreboot: $(initobjs) $(obj)/ldscript.ld +$(obj)/coreboot: $$(initobjs) $(obj)/ldscript.ld @printf " LINK $(subst $(obj)/,,$(@))\n" $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(obj)/ldscript.ld $(initobjs) $(NM) -n $(obj)/coreboot | sort > $(obj)/coreboot.map
-endif
Modified: trunk/src/arch/i386/Makefile.bootblock.inc ============================================================================== --- trunk/src/arch/i386/Makefile.bootblock.inc Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/src/arch/i386/Makefile.bootblock.inc Sat Mar 27 18:18:39 2010 (r5304) @@ -1,5 +1,3 @@ -ifdef POST_EVALUATION - ####################################################################### # Build the final rom image
@@ -49,12 +47,12 @@ bootblock_romccflags := -mcpu=k7 -msse -O2 endif
-$(obj)/bootblock/ldscript.ld: $(bootblock_ldscripts) $(obj)/ldoptions +$(obj)/bootblock/ldscript.ld: $$(bootblock_lds) $(obj)/ldoptions @printf " GEN $(subst $(obj)/,,$(@))\n" mkdir -p $(obj)/bootblock printf '$(foreach ldscript,ldoptions $(bootblock_lds),INCLUDE "$(ldscript)"\n)' > $@
-$(obj)/bootblock/bootblock.c: $(bootblock_inc) +$(obj)/bootblock/bootblock.c: $$(bootblock_inc) @printf " GEN $(subst $(obj)/,,$(@))\n" mkdir -p $(obj)/bootblock printf '$(foreach crt0,config.h $(bootblock_inc),#include "$(crt0)"\n)' > $@ @@ -80,7 +78,7 @@
####################################################################### # Build the romstage -$(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $(initobjs) $(obj)/romstage/ldscript.ld +$(obj)/coreboot.romstage: $(obj)/coreboot.pre1 $$(initobjs) $(obj)/romstage/ldscript.ld @printf " LINK $(subst $(obj)/,,$(@))\n" printf "CONFIG_ROMBASE = 0x0;\nAUTO_XIP_ROM_BASE = 0x0;\n" > $(obj)/location.ld $(CC) -nostdlib -nostartfiles -static -o $(obj)/romstage.elf -L$(obj) -T $(obj)/romstage/ldscript.ld $(initobjs) @@ -93,12 +91,12 @@ $(NM) -n $(obj)/romstage.elf | sort > $(obj)/romstage.map $(OBJCOPY) -O binary $(obj)/romstage.elf $@
-$(obj)/romstage/ldscript.ld: $(ldscripts) $(obj)/ldoptions +$(obj)/romstage/ldscript.ld: $$(ldscripts) $(obj)/ldoptions @printf " GEN $(subst $(obj)/,,$(@))\n" mkdir -p $(obj)/romstage printf '$(foreach ldscript,ldoptions location.ld $(ldscripts),INCLUDE "$(ldscript:$(obj)/%=%)"\n)' > $@
-$(obj)/romstage/crt0_includes.h: $(crt0s) +$(obj)/romstage/crt0_includes.h: $$(crt0s) @printf " GEN $(subst $(obj)/,,$(@))\n" mkdir -p $(obj)/romstage printf '$(foreach crt0,config.h $(crt0s),#include "$(crt0:$(obj)/%=%)"\n)' > $@ @@ -111,4 +109,3 @@ @printf " CC $(subst $(obj)/,,$(@))\n" $(CC) -x assembler-with-cpp -DASSEMBLY -E -I$(src)/include -I$(src)/arch/i386/include -I$(obj) -I$(obj)/romstage -include $(obj)/config.h -I. -I$(src) $< > $@.new && mv $@.new $@
-endif
Modified: trunk/src/arch/i386/Makefile.inc ============================================================================== --- trunk/src/arch/i386/Makefile.inc Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/src/arch/i386/Makefile.inc Sat Mar 27 18:18:39 2010 (r5304) @@ -7,8 +7,6 @@
obj-$(CONFIG_HAVE_OPTION_TABLE) += ../../option_table.o
-ifdef POST_EVALUATION - ####################################################################### # Build the final rom image COREBOOT_ROM_DEPENDENCIES:= @@ -73,14 +71,14 @@ $(CC) -nostdlib -nostartfiles -static -o $@ -L$(obj) -T $(src)/arch/i386/coreboot_ram.ld $(obj)/coreboot_ram.o $(NM) -n $(obj)/coreboot_ram | sort > $(obj)/coreboot_ram.map
-$(obj)/coreboot_ram.o: $(obj)/arch/i386/lib/c_start.o $(drivers) $(obj)/coreboot.a $(LIBGCC_FILE_NAME) +$(obj)/coreboot_ram.o: $(obj)/arch/i386/lib/c_start.o $$(drivers) $(obj)/coreboot.a $(LIBGCC_FILE_NAME) @printf " CC $(subst $(obj)/,,$(@))\n" $(CC) -nostdlib -r -o $@ $(obj)/arch/i386/lib/c_start.o $(drivers) -Wl,--start-group $(obj)/coreboot.a $(LIBGCC_FILE_NAME) -Wl,--end-group
-$(obj)/coreboot.a: $(objs) +$(obj)/coreboot.a: $$(objs) @printf " AR $(subst $(obj)/,,$(@))\n" rm -f $(obj)/coreboot.a - $(AR) cr $(obj)/coreboot.a $(objs) + $(AR) cr $(obj)/coreboot.a $^
####################################################################### # done @@ -195,7 +193,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/romcc $(OPTION_TABLE_H) $(obj)/build.h printf " ROMCC romstage.inc\n" - $(ROMCC) -c -S $(ROMCCFLAGS) -include $(obj)/build.h -I. $(INCLUDES) $< -o $@ + $(ROMCC) -c -S $(ROMCCFLAGS) -I. $(INCLUDES) $< -o $@
else
@@ -205,7 +203,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h printf " CC romstage.inc\n" - $(CC) -MMD $(CFLAGS) -include $(obj)/build.h -I$(src) -I. -c -S $< -o $@ + $(CC) -MMD $(CFLAGS) -I$(src) -I. -c -S $< -o $@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc printf " POST romstage.inc\n" @@ -213,9 +211,6 @@ mv $@.tmp $@ endif
-else -# Only in first pass - # Things that appear in every board initobjs += $(obj)/mainboard/$(MAINBOARDDIR)/crt0.o objs += $(obj)/mainboard/$(MAINBOARDDIR)/mainboard.o @@ -249,8 +244,6 @@ objs += $(obj)/mainboard/$(MAINBOARDDIR)/get_bus_conf.o endif
-endif - ifeq ($(CONFIG_TINY_BOOTBLOCK),y) include $(src)/arch/i386/Makefile.bootblock.inc else
Modified: trunk/src/arch/i386/lib/Makefile.inc ============================================================================== --- trunk/src/arch/i386/lib/Makefile.inc Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/src/arch/i386/lib/Makefile.inc Sat Mar 27 18:18:39 2010 (r5304) @@ -8,8 +8,3 @@
initobj-y += printk_init.o initobj-y += cbfs_and_run.o - -ifdef POST_EVALUATION -$(obj)/arch/i386/lib/console.o :: $(obj)/build.h -endif -
Modified: trunk/src/cpu/x86/smm/Makefile.inc ============================================================================== --- trunk/src/cpu/x86/smm/Makefile.inc Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/src/cpu/x86/smm/Makefile.inc Sat Mar 27 18:18:39 2010 (r5304) @@ -25,9 +25,7 @@ smmobj-y += smihandler.o smmobj-y += smiutil.o
-ifdef POST_EVALUATION - -$(obj)/cpu/x86/smm/smm.o: $(smmobjs) +$(obj)/cpu/x86/smm/smm.o: $$(smmobjs) $(CC) $(LDFLAGS) -nostdlib -r -o $@ $^
$(obj)/cpu/x86/smm/smm: $(obj)/cpu/x86/smm/smm.o $(src)/cpu/x86/smm/smm.ld $(obj)/ldoptions @@ -42,5 +40,3 @@ @printf " CC $(subst $(obj)/,,$(@))\n" $(CC) $(CFLAGS) -c -o $@ $<
-endif -
Modified: trunk/util/abuild/abuild ============================================================================== --- trunk/util/abuild/abuild Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/util/abuild/abuild Sat Mar 27 18:18:39 2010 (r5304) @@ -18,7 +18,7 @@ ABUILD_VERSION="0.9"
# Where shall we place all the build trees? -TARGET=$( pwd )/coreboot-builds +TARGET=coreboot-builds XMLFILE=$( pwd )/abuild.xml
# path to payload. Should be more generic
Modified: trunk/util/cbfstool/Makefile.inc ============================================================================== --- trunk/util/cbfstool/Makefile.inc Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/util/cbfstool/Makefile.inc Sat Mar 27 18:18:39 2010 (r5304) @@ -1,6 +1,3 @@ - -ifdef POST_EVALUATION - cbfsobj := cbfsobj += common.o cbfsobj += compress.o @@ -53,5 +50,3 @@ printf " HOSTCXX $(subst $(obj)/,,$(@)) (link)\n" $(HOSTCXX) $(CBFSTOOLFLAGS) -o $@ $(addprefix $(obj)/util/cbfstool/,$(cbfsobj))
-endif -
While I think this patch is great and we definitely need it, there are some things I'd like to discuss and improve, or back out if possible...
On 3/27/10 6:18 PM, repository service wrote:
-all: $(obj)/config.h coreboot +all: $(obj)/config.h $(obj)/build.h coreboot endif
This will make $(obj)/build.h and coreboot in parallel I think... is that intended?
-$(obj)/$$(1)%$(3).o: src/$$(1)%.$(2) $(obj)/config.h +$(obj)/$$(1)%$(3).o: src/$$(1)%.$(2) | $(obj)/build.h $(obj)/config.h printf " CC $$$$(subst $$$$(obj)/,,$$$$(@))\n"
Uh what's that | $(obj)/build.h ?
OBJS := $(patsubst %,$(obj)/%,$(TARGETS-y)) -INCLUDES := -I$(top)/src -I$(top)/src/include -I$(obj) -I$(top)/src/arch/$(ARCHDIR-y)/include -INCLUDES += -I$(top)/src/devices/oprom/include -INCLUDES += -include $(obj)/config.h +INCLUDES := -Isrc -Isrc/include -I$(obj) -Isrc/arch/$(ARCHDIR-y)/include +INCLUDES += -Isrc/devices/oprom/include +# abspath is a workaround for romcc +INCLUDES += -include $(abspath $(obj)/config.h) -include $(abspath $(obj)/build.h)
Why is build.h added to INCLUDES? This basically renders the dependency system unusable because all of the C files are depending on build.h (which they are not) Only two files should depend on build.h and that's console.o and romstage.inc
@@ -195,7 +193,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(obj)/romcc $(OPTION_TABLE_H) $(obj)/build.h printf " ROMCC romstage.inc\n"
- $(ROMCC) -c -S $(ROMCCFLAGS) -include $(obj)/build.h -I. $(INCLUDES) $< -o $@
- $(ROMCC) -c -S $(ROMCCFLAGS) -I. $(INCLUDES) $< -o $@
Why is build.h dropped here?
@@ -205,7 +203,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h printf " CC romstage.inc\n"
- $(CC) -MMD $(CFLAGS) -include $(obj)/build.h -I$(src) -I. -c -S $< -o $@
- $(CC) -MMD $(CFLAGS) -I$(src) -I. -c -S $< -o $@
Why is build.h dropped here?
Modified: trunk/src/arch/i386/lib/Makefile.inc
--- trunk/src/arch/i386/lib/Makefile.inc Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/src/arch/i386/lib/Makefile.inc Sat Mar 27 18:18:39 2010 (r5304) @@ -8,8 +8,3 @@
initobj-y += printk_init.o initobj-y += cbfs_and_run.o
-ifdef POST_EVALUATION -$(obj)/arch/i386/lib/console.o :: $(obj)/build.h -endif
I don't think it's OK to drop this dependency, as it needs to be known before gcc is run on the binary.
Stefan
Am 28.03.2010 23:13, schrieb Stefan Reinauer:
While I think this patch is great and we definitely need it, there are some things I'd like to discuss and improve, or back out if possible...
That part of the change wasn't one of my brightest moments. Your patch (build.h handling, take 2) is much better.
On 3/27/10 6:18 PM, repository service wrote:
-all: $(obj)/config.h coreboot +all: $(obj)/config.h $(obj)/build.h coreboot endif
This will make $(obj)/build.h and coreboot in parallel I think... is that intended?
No.
OBJS := $(patsubst %,$(obj)/%,$(TARGETS-y)) -INCLUDES := -I$(top)/src -I$(top)/src/include -I$(obj) -I$(top)/src/arch/$(ARCHDIR-y)/include -INCLUDES += -I$(top)/src/devices/oprom/include -INCLUDES += -include $(obj)/config.h +INCLUDES := -Isrc -Isrc/include -I$(obj) -Isrc/arch/$(ARCHDIR-y)/include +INCLUDES += -Isrc/devices/oprom/include +# abspath is a workaround for romcc +INCLUDES += -include $(abspath $(obj)/config.h) -include $(abspath $(obj)/build.h)
Why is build.h added to INCLUDES? This basically renders the dependency system unusable because all of the C files are depending on build.h (which they are not) Only two files should depend on build.h and that's console.o and romstage.inc
The | $(obj)/build.h sort-of fixed this: dependencies after "|" are only used for maintaining build order, not for dependencies. That is, make ensures the file is there, but doesn't care if it's older or newer than the target file.
But I think it messes up the time stamp in our scenario.
Of course, the .d files messed up this band-aid again.
@@ -205,7 +203,7 @@
$(obj)/mainboard/$(MAINBOARDDIR)/romstage.pre.inc: $(src)/mainboard/$(MAINBOARDDIR)/romstage.c $(OPTION_TABLE_H) $(obj)/build.h printf " CC romstage.inc\n"
- $(CC) -MMD $(CFLAGS) -include $(obj)/build.h -I$(src) -I. -c -S $< -o $@
- $(CC) -MMD $(CFLAGS) -I$(src) -I. -c -S $< -o $@
Why is build.h dropped here?
As it's in CFLAGS (see above)
Modified: trunk/src/arch/i386/lib/Makefile.inc
--- trunk/src/arch/i386/lib/Makefile.inc Fri Mar 26 19:31:12 2010 (r5303) +++ trunk/src/arch/i386/lib/Makefile.inc Sat Mar 27 18:18:39 2010 (r5304) @@ -8,8 +8,3 @@
initobj-y += printk_init.o initobj-y += cbfs_and_run.o
-ifdef POST_EVALUATION -$(obj)/arch/i386/lib/console.o :: $(obj)/build.h -endif
I don't think it's OK to drop this dependency, as it needs to be known before gcc is run on the binary.
It's drawn in by the global build.h dependency (see above)
I'm sorry about that. Patrick