From 5432f26f0e78fc74a599a596c90a3b8f02963c13 Mon Sep 17 00:00:00 2001 From: Daniel Laird Date: Fri, 28 Nov 2008 14:20:47 +0000 Subject: Adding Central config.cache options The following changes allow for use of a central configure cache file. This speeds up configuration of packages. Its use is configurable at the top level (BR2_CONFIG_CACHE - default n). Old style makefiles can use it if they use the following MACRO in makefiles: $(AUTO_CONFIGURE_TARGET) see my change to directfb.mk. New style Autotools.in will use it if you set the global option. However you can enable the global option and on a per package overrule it by doing the following: $(PKGNAME)_USE_CONFIG_CACHE = NO see fontconfig.mk for an example of this. Finally I have removed a few config variable settings which indicated no CXX compiler as this is wrong and breaks the build when using this central cache. Config.in | 8 ++++++++ package/Makefile.autotools.in | 5 ++++- package/Makefile.in | 28 +++++++++++++++++++++++++++- package/atk/atk.mk | 2 +- package/directfb/directfb.mk | 7 +------ package/fontconfig/fontconfig.mk | 3 +++ package/libglib2/libglib2.mk | 2 +- package/libgtk2/libgtk2.mk | 1 - 8 files changed, 45 insertions(+), 11 deletions(-) I would appreciate feedback on this change (I have been testing for 2-3 weeks) But I can never test all cases! If you enable the BR2_CONFIG_CACHE option some Makefile.autotools.in based packages may now break - I cannot build them all. In this case you may need to remove config options that are being hardcoded all over the place (like gtk saying we have 2 CXX compiler) or disable the use of CONFIG CACHE file like I have done in fontconfig. I can build all packages required to get WebKit on DirectFB up and running and it runs fine. I will try to resolve any issues this creates as fast as I can. Signed-off-by: Daniel Laird --- package/Makefile.autotools.in | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'package/Makefile.autotools.in') diff --git a/package/Makefile.autotools.in b/package/Makefile.autotools.in index 2e5d16606..25eae8f83 100644 --- a/package/Makefile.autotools.in +++ b/package/Makefile.autotools.in @@ -32,6 +32,8 @@ # run before # FOO_LIBTOOL_PATCH [YES/NO, default YES] # Do you want the standard buildroot patch applied to ltmain.sh? (libtool) +# FOO_USE_CONFIG_CACHE [YES/NO default $(BR2_CONFIG_CACHE)] +# Do you wany to use the central configure cache file? See BR2_CONFIG_CACHE. # FOO_CONF_ENV [default empty] # environment passed to the script # FOO_CONF_OPT [default empty] @@ -217,8 +219,10 @@ $(BUILD_DIR)/%/.stamp_configured: cd $(@D)/$($(PKG)_SUBDIR) && rm -f config.cache && \ $(TARGET_CONFIGURE_OPTS) \ $(TARGET_CONFIGURE_ARGS) \ + $(TARGET_CONFIGURE_ENV) \ $($(PKG)_CONF_ENV) \ - ./configure \ + $(if $(THIS_SRCDIR),$(THIS_SRCDIR)/,./)configure \ + $(if $(filter YES,$($(PKG)_USE_CONFIG_CACHE)),--cache-file="$(PROJECT_BUILD_DIR)/tgt-config.cache",) \ --target=$(GNU_TARGET_NAME) \ --host=$(GNU_TARGET_NAME) \ --build=$(GNU_HOST_NAME) \ @@ -302,6 +306,7 @@ $(2)_SITE ?= \ $(2)_DEPENDENCIES ?= $(2)_AUTORECONF ?= NO $(2)_LIBTOOL_PATCH ?= YES +$(2)_USE_CONFIG_CACHE ?= $(if $(BR2_CONFIG_CACHE),YES,NO) $(2)_CONF_ENV ?= $(2)_CONF_OPT ?= $(2)_MAKE_ENV ?= -- cgit v1.2.3