summaryrefslogtreecommitdiffstats
path: root/src/Makefile.housekeeping
diff options
context:
space:
mode:
authorMichael Brown2005-04-17 17:57:34 +0200
committerMichael Brown2005-04-17 17:57:34 +0200
commitb79895c9d6c6c6cae6b9aa97f5d303e08d057fbe (patch)
treee38ceba622dff1bfece5ef4da348520952b52634 /src/Makefile.housekeeping
parentIf we end up with fragments that are older than config.h, set the (diff)
downloadipxe-b79895c9d6c6c6cae6b9aa97f5d303e08d057fbe.tar.gz
ipxe-b79895c9d6c6c6cae6b9aa97f5d303e08d057fbe.tar.xz
ipxe-b79895c9d6c6c6cae6b9aa97f5d303e08d057fbe.zip
Use mkconfig.pl to generate fragments from config.h
Don't use -MP to generate phony rules for included files, otherwise make won't use the pattern rule for config/%.h. :(
Diffstat (limited to 'src/Makefile.housekeeping')
-rw-r--r--src/Makefile.housekeeping8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping
index 92a5c528..1dfc34d1 100644
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -50,6 +50,11 @@ oldgas :
#
CFLAGS += -include compiler.h
+# config/%.h files are generated from config.h using mkconfig.pl
+config/%.h : config.h
+ $(MKCONFIG) $<
+CLEANUP += config/*.h
+
# SRCDIRS lists all directories containing source files.
srcdirs :
@echo $(SRCDIRS)
@@ -104,8 +109,7 @@ endef
define obj_template
@$(CPP) $(CFLAGS) $(CFLAGS_$(3)) $(CFLAGS_$(4)) \
- -M $(1) -MT "$(4)_DEPS" -MG -MP | \
- sed 's/$(4)_DEPS[[:space:]]*:/$(4)_DEPS =/' >> $(2)
+ -M $(1) -MT "$(4)_DEPS" -MG | tr : = >> $(2)
@echo -e '\n$$(BIN)/$(4).o : $(1) $$(MAKEDEPS) $$($(4)_DEPS)' \
'\n\t$$(RULE_$(3))\n' \
'\nBOBJS += $$(BIN)/$(4).o\n' \