]> rtime.felk.cvut.cz Git - omk.git/blobdiff - snippets/config_h
Hide command of extra rules make invocation
[omk.git] / snippets / config_h
index 03b65bf216d1f6c420daf70daf72997d023644ab..0e25ad9e1b49deac7b02ee0d529e92ba1c3f3abc 100644 (file)
 # Syntax: $(call BUILD_CONFIG_H_template,<stamp_dir>,<header_file_path>,<list_of_options_to_export>,<header_barrier>)
 define BUILD_CONFIG_H_template
 
-$(addprefix $(1)/,$(notdir $(addsuffix .stamp,$(2)))) : $(wildcard $(CONFIG_FILE)) $(wildcard $(CONFIG_FILE)-default)
+$(addprefix $(1)/,$(notdir $(addsuffix .stamp,$(2)))) : $(CONFIG_FILES)
        @$(QUIET_CMD_ECHO) "  CONFGEN $$(@:%.stamp=%)"
        @if [ ! -d `dirname $(2).tmp` ] ; then \
                mkdir -p `dirname $(2).tmp` ; fi
        @echo "/* Automatically generated from */" > "$(2).tmp"
-       @echo "/* config file: $$< */" >> "$(2).tmp"
+       @echo "/* config files: $$(^:$(OUTPUT_DIR)/%=%) */" >> "$(2).tmp"
        $(if $(DOXYGEN),@echo "/** @file */" >> "$(2).tmp")
        @echo "#ifndef $(4)" >> "$(2).tmp"
        @echo "#define $(4)" >> "$(2).tmp"
-       @( $(foreach x, $(shell echo '$($(3))' | sed -e 's/[ \t]/\n/g' | sed -e 's/^\([^ =]*\)\(=[^ ]\+\|\)$$/\1/' ), \
+       @( $(foreach x, $(shell echo '$($(3))' | tr 'x\t ' 'x\n\n' | sed -e 's/^\([^ =]*\)\(=[^ ]\+\|\)$$/\1/' ), \
                echo '$(x).$($(x))' ; ) echo ; ) | \
                sed -e '/^[^.]*\.n$$$$/d' -e '/^[^.]*\.$$$$/d' -e 's/^\([^.]*\)\.[ym]$$$$/\1.1/' | \
                sed -n -e 's/^\([^.]*\)\.\(.*\)$$$$/#define \1 \2/p' \