summaryrefslogtreecommitdiff
path: root/package/Makefile.autotools.in
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2011-08-31 23:35:06 +0200
committerPeter Korsgaard <jacmet@sunsite.dk>2011-09-17 08:22:12 +0200
commit102a93bdca09742c99e110f144bf0c9267bbdd14 (patch)
treee9f3cc83518b09e75177dc1d9994f24f21ca17b5 /package/Makefile.autotools.in
parent56da3859c770b83631ebae810dfb3024c1a9cbd2 (diff)
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 <thomas.petazzoni@free-electrons.com> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
Diffstat (limited to 'package/Makefile.autotools.in')
-rw-r--r--package/Makefile.autotools.in23
1 files changed, 18 insertions, 5 deletions
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