summaryrefslogtreecommitdiff
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
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>
-rw-r--r--Makefile2
-rw-r--r--package/Makefile.autotools.in23
-rw-r--r--package/cups/cups.mk2
-rw-r--r--package/gettext/gettext.mk3
-rw-r--r--package/gnuconfig/README.buildroot20
-rw-r--r--package/gnuconfig/gnuconfig.mk3
-rw-r--r--package/lmbench/lmbench.mk2
-rw-r--r--support/gnuconfig/.cvsignore (renamed from package/gnuconfig/.cvsignore)0
-rw-r--r--support/gnuconfig/README.buildroot25
-rwxr-xr-xsupport/gnuconfig/config.guess (renamed from package/gnuconfig/config.guess)0
-rwxr-xr-xsupport/gnuconfig/config.sub (renamed from package/gnuconfig/config.sub)0
-rw-r--r--support/gnuconfig/patches/config.guess.uclibc.patch (renamed from package/gnuconfig/patches/config.guess.uclibc.patch)0
-rw-r--r--support/gnuconfig/patches/config.sub.ps2.patch (renamed from package/gnuconfig/patches/config.sub.ps2.patch)0
-rwxr-xr-xsupport/scripts/pkg-stats1
-rw-r--r--toolchain/elf2flt/elf2flt.mk2
-rw-r--r--toolchain/gcc/gcc-uclibc-4.x.mk2
-rw-r--r--toolchain/gdb/gdb.mk2
17 files changed, 50 insertions, 37 deletions
diff --git a/Makefile b/Makefile
index 9d8d16924..a20d3e2a8 100644
--- a/Makefile
+++ b/Makefile
@@ -193,7 +193,7 @@ unexport CFLAGS
unexport CXXFLAGS
unexport GREP_OPTIONS
-GNU_HOST_NAME:=$(shell package/gnuconfig/config.guess)
+GNU_HOST_NAME:=$(shell support/gnuconfig/config.guess)
#############################################################
#
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
diff --git a/package/cups/cups.mk b/package/cups/cups.mk
index 3b9f2e0d3..4e8db71aa 100644
--- a/package/cups/cups.mk
+++ b/package/cups/cups.mk
@@ -70,7 +70,7 @@ $(DL_DIR)/$(CUPS_SOURCE):
$(CUPS_DIR)/.unpacked: $(DL_DIR)/$(CUPS_SOURCE)
$(CUPS_CAT) $(DL_DIR)/$(CUPS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
support/scripts/apply-patches.sh $(CUPS_DIR) package/cups/ \*.patch
- $(CONFIG_UPDATE) $(CUPS_DIR)
+ $(call CONFIG_UPDATE,$(CUPS_DIR))
touch $@
$(CUPS_DIR)/.configured: $(CUPS_DIR)/.unpacked
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 332a2ca63..f4c8c7671 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -25,8 +25,7 @@ gettext-source: $(DL_DIR)/$(GETTEXT_SOURCE)
$(GETTEXT_DIR)/.unpacked: $(DL_DIR)/$(GETTEXT_SOURCE)
$(GETTEXT_CAT) $(DL_DIR)/$(GETTEXT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
support/scripts/apply-patches.sh $(GETTEXT_DIR) package/gettext/ gettext\*.patch
- $(CONFIG_UPDATE) $(@D)
- $(CONFIG_UPDATE) $(GETTEXT_DIR)/build-aux
+ $(call CONFIG_UPDATE,$(@D))
touch $@
ifneq ($(BR2_TOOLCHAIN_BUILDROOT),y)
diff --git a/package/gnuconfig/README.buildroot b/package/gnuconfig/README.buildroot
deleted file mode 100644
index fd43a68c8..000000000
--- a/package/gnuconfig/README.buildroot
+++ /dev/null
@@ -1,20 +0,0 @@
---- ABOUT ---
-This isnt a real package, it just exists to easily update the
-config.sub / config.guess files in packages to the latest version
-(since many bundled ones don't support the latest possible targets)
-
---- HOWTO ---
-To use, just add this to your unpack rule in the package.mk:
-$(CONFIG_UPDATE) $(PACKAGE_DIR)/
-
---- UPDATE ---
-GNU config is now managed in git, so to update:
-
-# git clone git://git.savannah.gnu.org/config.git
-# cp config/config.* .
-# for p in $(ls patches/*.patch); do patch -p0 < $p; done
-# rm -rf config
-
-A few local customizations are used to support uClibc so you may
-have to make sure they're still needed. The patches are broken
-out in the patches/ dir to keep things simple.
diff --git a/package/gnuconfig/gnuconfig.mk b/package/gnuconfig/gnuconfig.mk
deleted file mode 100644
index b6aa5fc7d..000000000
--- a/package/gnuconfig/gnuconfig.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-# See README.buildroot
-gnuconfig-source:
-CONFIG_UPDATE = cp -f package/gnuconfig/config.sub package/gnuconfig/config.guess
diff --git a/package/lmbench/lmbench.mk b/package/lmbench/lmbench.mk
index fefb34f06..535fc8c35 100644
--- a/package/lmbench/lmbench.mk
+++ b/package/lmbench/lmbench.mk
@@ -8,7 +8,7 @@ LMBENCH_SOURCE:=lmbench-$(LMBENCH_VERSION).tgz
LMBENCH_SITE:=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/project/lmbench/development/lmbench-3.0-a9/
define LMBENCH_CONFIGURE_CMDS
- $(CONFIG_UPDATE) $(@D)
+ $(call CONFIG_UPDATE,$(@D))
sed -i 's/CFLAGS=/CFLAGS+=/g' $(@D)/src/Makefile
sed -i '/cd .*doc/d' $(@D)/src/Makefile
sed -i '/include/d' $(@D)/src/Makefile
diff --git a/package/gnuconfig/.cvsignore b/support/gnuconfig/.cvsignore
index 669c89f53..669c89f53 100644
--- a/package/gnuconfig/.cvsignore
+++ b/support/gnuconfig/.cvsignore
diff --git a/support/gnuconfig/README.buildroot b/support/gnuconfig/README.buildroot
new file mode 100644
index 000000000..d655d6211
--- /dev/null
+++ b/support/gnuconfig/README.buildroot
@@ -0,0 +1,25 @@
+--- HOWTO ---
+If your package uses config.guess and/or config.sub, then it probably
+relies on the autotools as its build system. In this case, you should
+use the AUTOTARGETS infrastructure, which will take care of updating
+the config.guess and/or config.sub files appropriately. See the
+Buildroot documentation for details about the AUTOTARGETS
+infrastructure.
+
+If for some reason your package does not use the AUTOTARGETS
+infrastructure, you can request the config.guess and/or config.sub
+files of your package to be updated by using:
+
+ $(call CONFIG_UPDATE,directory-of-your-package-sources)
+
+--- UPDATE ---
+GNU config is now managed in git, so to update:
+
+# git clone git://git.savannah.gnu.org/config.git
+# cp config/config.* .
+# for p in $(ls patches/*.patch); do patch -p0 < $p; done
+# rm -rf config
+
+A few local customizations are used to support uClibc so you may
+have to make sure they're still needed. The patches are broken
+out in the patches/ dir to keep things simple.
diff --git a/package/gnuconfig/config.guess b/support/gnuconfig/config.guess
index 40cf0af79..40cf0af79 100755
--- a/package/gnuconfig/config.guess
+++ b/support/gnuconfig/config.guess
diff --git a/package/gnuconfig/config.sub b/support/gnuconfig/config.sub
index 8ad167cbc..8ad167cbc 100755
--- a/package/gnuconfig/config.sub
+++ b/support/gnuconfig/config.sub
diff --git a/package/gnuconfig/patches/config.guess.uclibc.patch b/support/gnuconfig/patches/config.guess.uclibc.patch
index 85f9b8966..85f9b8966 100644
--- a/package/gnuconfig/patches/config.guess.uclibc.patch
+++ b/support/gnuconfig/patches/config.guess.uclibc.patch
diff --git a/package/gnuconfig/patches/config.sub.ps2.patch b/support/gnuconfig/patches/config.sub.ps2.patch
index 57d09dcf2..57d09dcf2 100644
--- a/package/gnuconfig/patches/config.sub.ps2.patch
+++ b/support/gnuconfig/patches/config.sub.ps2.patch
diff --git a/support/scripts/pkg-stats b/support/scripts/pkg-stats
index 7bb292830..bb1c27d87 100755
--- a/support/scripts/pkg-stats
+++ b/support/scripts/pkg-stats
@@ -81,7 +81,6 @@ for i in $(find package/ -name '*.mk') ; do
$i = "package/games/games.mk" -o \
$i = "package/multimedia/multimedia.mk" -o \
$i = "package/customize/customize.mk" -o \
- $i = "package/gnuconfig/gnuconfig.mk" -o \
$i = "package/matchbox/matchbox.mk" -o \
$i = "package/x11r7/x11r7.mk" ; then
echo "skipping $i" 1>&2
diff --git a/toolchain/elf2flt/elf2flt.mk b/toolchain/elf2flt/elf2flt.mk
index 7fecf3ea8..e74a6553b 100644
--- a/toolchain/elf2flt/elf2flt.mk
+++ b/toolchain/elf2flt/elf2flt.mk
@@ -14,7 +14,7 @@ $(ELF2FLT_DIR)/.unpacked:
touch $@
$(ELF2FLT_DIR)/.patched: $(ELF2FLT_DIR)/.unpacked
- $(CONFIG_UPDATE) $(@D)
+ $(call CONFIG_UPDATE,$(@D))
touch $@
$(ELF2FLT_DIR)/.configured: $(ELF2FLT_DIR)/.patched
diff --git a/toolchain/gcc/gcc-uclibc-4.x.mk b/toolchain/gcc/gcc-uclibc-4.x.mk
index 923229099..a2253c9fa 100644
--- a/toolchain/gcc/gcc-uclibc-4.x.mk
+++ b/toolchain/gcc/gcc-uclibc-4.x.mk
@@ -200,7 +200,7 @@ $(GCC_DIR)/.unpacked: $(DL_DIR)/$(GCC_SOURCE)
mkdir -p $(TOOLCHAIN_DIR)
rm -rf $(GCC_DIR)
$(GCC_CAT) $(DL_DIR)/$(GCC_SOURCE) | tar -C $(TOOLCHAIN_DIR) $(TAR_OPTIONS) -
- $(CONFIG_UPDATE) $(@D)
+ $(call CONFIG_UPDATE,$(@D))
touch $@
gcc-patched: $(GCC_DIR)/.patched
diff --git a/toolchain/gdb/gdb.mk b/toolchain/gdb/gdb.mk
index db46b1286..462261678 100644
--- a/toolchain/gdb/gdb.mk
+++ b/toolchain/gdb/gdb.mk
@@ -38,7 +38,7 @@ endif
ifneq ($(wildcard $(GDB_PATCH_DIR)),)
support/scripts/apply-patches.sh $(GDB_DIR) $(GDB_PATCH_DIR) \*.patch $(GDB_PATCH_EXTRA)
endif
- $(CONFIG_UPDATE) $(@D)
+ $(call CONFIG_UPDATE,$(@D))
touch $@
gdb-patched: $(GDB_DIR)/.unpacked