From 102a93bdca09742c99e110f144bf0c9267bbdd14 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Wed, 31 Aug 2011 23:35:06 +0200 Subject: support: move package/gnuconfig to support/gnuconfig The CONFIG_UPDATE macro is no longer defined in package/gnuconfig/gnuconfig.mk, but instead in package/Makefile.autotools.in. It it also changed a little bit to take the directory of the package sources as argument, and the AUTOTARGETS infrastructure is updated to use this macro. [Peter: drop echo in CONFIG_UPDATE] Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- package/Makefile.autotools.in | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'package/Makefile.autotools.in') diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in index 12c503827..13947873a 100644 --- a/package/Makefile.autotools.in +++ b/package/Makefile.autotools.in @@ -22,6 +22,22 @@ # ################################################################################ + +# +# Utility function to upgrade config.sub and config.guess files +# +# argument 1 : directory into which config.guess and config.sub need +# to be updated. Note that config.sub and config.guess are searched +# recursively in this directory. +# +define CONFIG_UPDATE + for file in config.guess config.sub; do \ + for i in $$(find $(1) -name $$file); do \ + cp support/gnuconfig/$$file $$i; \ + done; \ + done +endef + ################################################################################ # AUTOTARGETS_INNER -- defines how the configuration, compilation and # installation of an autotools package should be done, implements a @@ -132,11 +148,8 @@ endif # Hook to update config.sub and config.guess if needed # define UPDATE_CONFIG_HOOK - for file in config.guess config.sub; do \ - for i in $$$$(find $$(@D) -name $$$$file); do \ - cp package/gnuconfig/$$$$file $$$$i; \ - done; \ - done + @$$(call MESSAGE, "Updating config.sub and config.guess") + $$(call CONFIG_UPDATE,$$(@D)) endef $(2)_POST_PATCH_HOOKS += UPDATE_CONFIG_HOOK -- cgit v1.2.3