define BUILD_CONFIG_H_template
$(addprefix $(1)/,$(notdir $(addsuffix .stamp,$(2)))) : $(CONFIG_FILES)
- @$(QUIET_CMD_ECHO) " CONFGEN $$(@:%.stamp=%)"
+ @$(QUIET_CMD_ECHO) " CONFGEN $(notdir $(2))"
@if [ ! -d `dirname $(2).tmp` ] ; then \
mkdir -p `dirname $(2).tmp` ; fi
@echo "/* Automatically generated from */" > "$(2).tmp"
$(if $(DOXYGEN),@echo "/** @file */" >> "$(2).tmp")
@echo "#ifndef $(4)" >> "$(2).tmp"
@echo "#define $(4)" >> "$(2).tmp"
- @( $(foreach x, $(shell echo '$($(3))' | tr 'x\t ' 'x\n\n' | sed -e 's/^\([^ =]*\)\(=[^ ]\+\|\)$$/\1/' ), \
+ @( $(foreach x, $(shell echo '$($(3))' | tr 'x\t ' 'x\n\n' | $(SED4OMK) -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' \
+ $(SED4OMK) -e '/^[^.]*\.n$$$$/d' -e '/^[^.]*\.$$$$/d' -e 's/^\([^.]*\)\.[ym]$$$$/\1.1/' | \
+ $(SED4OMK) -n -e 's/^\([^.]*\)\.\(.*\)$$$$/#define \1 \2/p' \
>> "$(2).tmp"
@echo "#endif /*$(4)*/" >> "$(2).tmp"
@touch "$$@"
- @if cmp --quiet "$(2).tmp" "$(2)" ; then rm "$(2).tmp"; \
+ @if cmp -s "$(2).tmp" "$(2)" ; then rm "$(2).tmp"; \
else mv "$(2).tmp" "$(2)" ; \
echo "Updated configuration $(2)" ; fi
endif
-clean-local: clean-local-config-h
-
-clean-local-config-h:
+clean-local::
@$(foreach confh,$(config_h_stamp_files) $(kern_config_h_stamp_files),\
if [ -e $(confh) ] ; then rm $(confh) ; fi ; \
)
-
-
-# Local Variables:
-# mode:makefile
-# End: