X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=mk%2Frte.sdkconfig.mk;h=5c94edf8342a570d912dc80c18a28954f765c6fd;hb=c2fc18cf6971291a7022bb97f221264cc5159219;hp=e93237fed0aca50f2ba03e0fc1e9bf8859fa1640;hpb=a41e6ff15809d40e0f9bbc9576bf8f7f80fbec1d;p=deb_dpdk.git 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 $(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 ; \