aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'rules.mak')
-rw-r--r--rules.mak9
1 files changed, 9 insertions, 0 deletions
diff --git a/rules.mak b/rules.mak
index b38090332..ca95351d9 100644
--- a/rules.mak
+++ b/rules.mak
@@ -35,3 +35,12 @@ quiet-command = $(if $(V),$1,$(if $(2),@echo $2 && $1, @$1))
cc-option = $(if $(shell $(CC) $1 $2 -S -o /dev/null -xc /dev/null \
>/dev/null 2>&1 && echo OK), $2, $3)
+
+# Generate timestamp files for .h include files
+
+%.h: %.h-timestamp
+ @test -f $@ || cp $< $@
+
+%.h-timestamp: %.mak
+ $(call quiet-command, $(SRC_PATH)/create_config < $< > $@, " GEN $*.h")
+ @cmp $@ $*.h >/dev/null 2>&1 || cp $@ $*.h