]> git.droids-corp.org - dpdk.git/blobdiff - mk/rte.sdkinstall.mk
mk: allow updates to build config on make install
[dpdk.git] / mk / rte.sdkinstall.mk
index 24b60cf2de32a4cc748f1deb9b42326256ff398e..85711962debd8d838ecaf9302347081e5218a671 100644 (file)
@@ -58,6 +58,18 @@ install: $(INSTALL_TARGETS)
        @echo ================== Installing $*
        $(Q)if [ ! -f $(BUILD_DIR)/$*/.config ]; then \
                $(MAKE) config T=$* O=$(BUILD_DIR)/$*; \
+       elif cmp -s $(BUILD_DIR)/$*/.config.orig $(BUILD_DIR)/$*/.config; then \
+               $(MAKE) config T=$* O=$(BUILD_DIR)/$*; \
+       else \
+               if [ -f $(BUILD_DIR)/$*/.config.orig ] ; then \
+                       tmp_build=$(BUILD_DIR)/$*/.config.tmp; \
+                       $(MAKE) config T=$* O=$$tmp_build; \
+                       if ! cmp -s $(BUILD_DIR)/$*/.config.orig $$tmp_build/.config ; then \
+                               echo "Conflict: local config and template config have both changed"; \
+                               exit 1; \
+                       fi; \
+               fi; \
+               echo "Using local configuration"; \
        fi
        $(Q)$(MAKE) all O=$(BUILD_DIR)/$*