]> rtime.felk.cvut.cz Git - omk.git/blobdiff - snippets/config_h
Link command detection is done by make instead of shell. Should be faster.
[omk.git] / snippets / config_h
index 212ed9eefd5288fbffce063ec74f620928defbee..70f45479f9fab1566f39def5bb2e5d8e104e49cb 100644 (file)
@@ -22,7 +22,7 @@ $(1) : $(wildcard $(CONFIG_FILE)) $(wildcard $(CONFIG_FILE)-default)
                sed -n -e 's/^\([^.]*\)\.\(.*\)$$$$/#define \1 \2/p' \
                  >> "$(1).tmp"
        @echo "#endif /*$(3)*/" >> "$(1).tmp"
-       @if cmp --quiet "$(1).tmp" "$(1)" ; then rm "$(1).tmp" ; \
+       @if cmp --quiet "$(1).tmp" "$(1)" ; then rm "$(1).tmp"; touch "$(1)" ; \
        else mv "$(1).tmp" "$(1)" ; \
        echo Updated configuration "$(1)" ; fi
 
@@ -30,7 +30,9 @@ endef
 
 ifdef LOCAL_CONFIG_H
 
-CFLAGS += -I.
+# This must be declared after the default cflags are assigned!
+# Override is used to override command line assignemnt.
+override CFLAGS += -I.
 $(eval $(call BUILD_CONFIG_H_template,$(LOCAL_CONFIG_H),default_CONFIG,_LOCAL_CONFIG_H) )
 
 endif