[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XEN PATCH] build: fix auto defconfig rule


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Anthony PERARD <anthony.perard@xxxxxxxxxx>
  • Date: Fri, 25 Feb 2022 14:54:08 +0000
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Anthony PERARD <anthony.perard@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>, "Jan Beulich" <jbeulich@xxxxxxxx>, Julien Grall <julien@xxxxxxx>, "Stefano Stabellini" <sstabellini@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
  • Delivery-date: Fri, 25 Feb 2022 14:54:56 +0000
  • Ironport-data: A9a23:wpOJKqy3ZWvQLAgsSCp6t+cbxirEfRIJ4+MujC+fZmUNrF6WrkUAz DAXDWmBafeLZjDzetpwOtnj/UwE6JHXx4AyGwNrqSAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX9JZS5LwbZj2NYy24XhWWthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NpliIOfaAADOb31nacSXkQBPghVepFG9+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DNYUDunZm3HfBAOwvW5zrSKTW/95Imjw3g6iiGN6AO 5pJOWEzM3wsZTUfFEVQDZckv9vyi1TlVgVqsX6zgK4otj27IAtZj+G2bYu9lsaxbd5Ogk+Sq 2bC/mL4KhIXLtqSzXyC6H3ErvDLtTP2XsQVDrLQ3vx3hFyewEQDBRtQUkG0ydGph0j7V99BJ kg8/is1sbN05EGtVsP6XRCzvDiDpBF0c9haHvA+6QqN4rHJ+AvfDW8BJgOtc/R/6pVwH2Zzk AbUwZW5XlSDrYF5V1qg6Zi1qhm1KREQbmAPOHYpZCBC39ns9dRbYg30cv5vF6u8j9vQED72w iyXoCVWu4j/nfLnxI3gowmZ3mvESozhC1dsu16JBj7NAhZROdb9D7FE/2Q3+hqpwGyxalCa9 EYJlMGFhAzlJcHczXfdKAnh8VzA2hpkDNE+qQI+d3XC3270k5JGQWy2yGsvTKuOGpxZEQIFm GeJ5WtsCGZ7ZRNGl5NfbYOrENgNxqP9D9njXf28RoMQPsUuKFbboXk2PRb4M4XRfK4Ey/BX1 XCzK5vEMJrnIf4/kGreqxk1i9fHORzSNUuMHMumnnxLIJKVZWKPSKdtDbd9RrtR0U9wmy2Mq 4w3H5LTk313CbSiCgGKod97BQ1bdhATWMGpw/G7g8bee2KK7kl6UKSPqV7gEqQ495loehDgp SnsChcFkwOk3RUq62yiMxheVV8mZr4nxVpTAMDmFQ/AN6QLCWp30JoiSg==
  • Ironport-hdrordr: A9a23:Y7l/S6/BNp3+5YPZcABuk+DUI+orL9Y04lQ7vn2YSXRuHPBw8P re+MjztCWE7gr5N0tBpTntAsW9qBDnhPtICOsqTNSftWDd0QPCRuxfBOPZslrd8kbFl9K1u5 0OT0EHMqyTMWRH
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

We should only run "defconfig" if ".config" is missing. Commit
317c98cb91 have added a dependency on "tools/fixdep", so make would
start runnning "defconfig" also when "tools/fixdep" is newer than
".config" and thus overwrite any changes made by a developer.
Reintroduce intended behavior of the rule to only generate a default
Kconfig when ".config" is missing.

Fixes: 317c98cb91 ("build: hook kconfig into xen build system")
Reported-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>
---
 xen/Makefile | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/xen/Makefile b/xen/Makefile
index 133b382f86..ed4891daf1 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -243,15 +243,10 @@ ifeq ($(need-config),y)
 # changes are detected.
 -include include/config/auto.conf.cmd
 
-# This allows make to build fixdep before invoking defconfig. We can't use
-# "tools_fixdep" which is a .PHONY target and would force make to call
-# "defconfig" again to update $(KCONFIG_CONFIG).
-tools/fixdep:
-       $(Q)$(MAKE) $(build)=tools tools/fixdep
-
 # Allow people to just run `make` as before and not force them to configure
-$(KCONFIG_CONFIG): tools/fixdep
-       $(Q)$(MAKE) $(build)=tools/kconfig defconfig
+# Only run defconfig if $(KCONFIG_CONFIG) is missing
+$(KCONFIG_CONFIG): tools_fixdep
+       $(if $(wildcard $@), , $(Q)$(MAKE) $(build)=tools/kconfig defconfig)
 
 # The actual configuration files used during the build are stored in
 # include/generated/ and include/config/. Update them if .config is newer than
-- 
Anthony PERARD




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.