mk: always preprocess template config file

Signed-off-by: Intel
This commit is contained in:
Intel 2013-11-08 03:00:00 +01:00 committed by Thomas Monjalon
parent ac33030524
commit 63baec8781

View File

@ -54,12 +54,9 @@ else
$(RTE_OUTPUT)/.config: $(RTE_CONFIG_TEMPLATE) FORCE
@[ -d $(RTE_OUTPUT) ] || mkdir -p $(RTE_OUTPUT)
$(Q)if [ "$(RTE_CONFIG_TEMPLATE)" != "" -a -f "$(RTE_CONFIG_TEMPLATE)" ]; then \
if grep -q '#include' $(RTE_CONFIG_TEMPLATE) ; then \
$(CPP) -undef -C -P -x assembler-with-cpp -fdirectives-only \
-o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLATE) ; \
else \
cp $(RTE_CONFIG_TEMPLATE) $(RTE_OUTPUT)/.config_tmp ; \
fi ; \
$(CPP) -undef -P -x assembler-with-cpp \
-fdirectives-only -ffreestanding \
-o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLATE) ; \
if ! cmp -s $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config; then \
cp $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config ; \
fi ; \