aboutsummaryrefslogtreecommitdiffstats
path: root/mk/rte.sdkconfig.mk
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo.salveti@linaro.org>2016-07-25 13:22:22 -0300
committerRicardo Salveti <ricardo.salveti@linaro.org>2016-07-25 13:23:50 -0300
commit7b53c036e6bf56623b8273018ff1c8cc62847857 (patch)
tree4af0da8c150bbebd7d1d252d6ac801a7efef0d23 /mk/rte.sdkconfig.mk
parent5d4e5dcd8a186778b3d78e27c81550d07a288fd2 (diff)
Imported Upstream version 16.07-rc4
Change-Id: Ic57f6a3726f2dbd1682223648d91310f45705327 Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Diffstat (limited to 'mk/rte.sdkconfig.mk')
-rw-r--r--mk/rte.sdkconfig.mk12
1 files changed, 7 insertions, 5 deletions
diff --git a/mk/rte.sdkconfig.mk b/mk/rte.sdkconfig.mk
index e93237fe..5c94edf8 100644
--- a/mk/rte.sdkconfig.mk
+++ b/mk/rte.sdkconfig.mk
@@ -88,11 +88,13 @@ $(RTE_OUTPUT)/.config: $(RTE_CONFIG_TEMPLATE) FORCE | $(RTE_OUTPUT)
$(CPP) -undef -P -x assembler-with-cpp \
-ffreestanding \
-o $(RTE_OUTPUT)/.config_tmp $(RTE_CONFIG_TEMPLATE) ; \
- for config in $$(grep -v "^#" $(RTE_OUTPUT)/.config_tmp | cut -d"=" -f1 | sort | uniq -d); do \
- while [ $$(grep "^$${config}=" $(RTE_OUTPUT)/.config_tmp -c ) -gt 1 ]; do \
- sed -i "0,/^$${config}=/{//d}" $(RTE_OUTPUT)/.config_tmp; \
- done; \
- done; \
+ config=$$(cat $(RTE_OUTPUT)/.config_tmp) ; \
+ echo "$$config" | awk -F '=' 'BEGIN {i=1} \
+ /^#/ {pos[i++]=$$0} \
+ !/^#/ {if (!s[$$1]) {pos[i]=$$0; s[$$1]=i++} \
+ else {pos[s[$$1]]=$$0}} END \
+ {for (j=1; j<i; j++) print pos[j]}' \
+ > $(RTE_OUTPUT)/.config_tmp ; \
if ! cmp -s $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config; then \
cp $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config ; \
cp $(RTE_OUTPUT)/.config_tmp $(RTE_OUTPUT)/.config.orig ; \