summaryrefslogtreecommitdiff
path: root/package/Makefile.in
diff options
context:
space:
mode:
authorDaniel Laird <danieljlaird@hotmail.com>2008-11-28 14:20:47 +0000
committerDaniel Laird <danieljlaird@hotmail.com>2008-11-28 14:20:47 +0000
commit5432f26f0e78fc74a599a596c90a3b8f02963c13 (patch)
treea2f18f774cc9afe12770bb3037e4c5b063e1b3fa /package/Makefile.in
parentb277d41ccc8cb46e3b1b01a9d854adeacb2e61fb (diff)
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 <daniel.j.laird@nxp.com>
Diffstat (limited to 'package/Makefile.in')
-rw-r--r--package/Makefile.in28
1 files changed, 27 insertions, 1 deletions
diff --git a/package/Makefile.in b/package/Makefile.in
index 431ca8e78..19c7c56b0 100644
--- a/package/Makefile.in
+++ b/package/Makefile.in
@@ -178,6 +178,8 @@ TARGET_STRIP=true -Not_stripping
STRIPCMD=$(TARGET_STRIP)
endif
INSTALL=/usr/bin/install
+FLEX:=$(shell $(CONFIG_SHELL) -c 'which flex || type -p flex')
+BISON:=$(shell $(CONFIG_SHELL) -c 'which bison || type -p bison')
HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
-e 's/sparc.*/sparc/' \
@@ -193,10 +195,23 @@ HOST_ARCH:=$(shell $(HOSTCC) -dumpmachine | sed -e s'/-.*//' \
)
GNU_HOST_NAME:=$(HOST_ARCH)-$(subst ",,$(BR2_GNU_BUILD_SUFFIX))
#")
+
+AUTO_CONFIGURE_TARGET=\
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ $(TARGET_CONFIGURE_ENV) \
+ $(if $(THIS_SRCDIR),$(THIS_SRCDIR)/,./)configure \
+ $(if $(BR2_CONFIG_CACHE),--cache-file="$(PROJECT_BUILD_DIR)/tgt-config.cache",) \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME)
+
TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
AR="$(TARGET_AR)" \
AS="$(TARGET_AS)" \
- LD="$(TARGET_LD) $(TARGET_LDFLAGS)" \
+ LD="$(TARGET_LD)" \
+ CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
NM="$(TARGET_NM)" \
CC="$(TARGET_CC) $(TARGET_CFLAGS)" \
GCC="$(TARGET_CC) $(TARGET_CFLAGS)" \
@@ -229,6 +244,12 @@ TARGET_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
PKG_CONFIG_PATH="$(STAGING_DIR)/usr/lib/pkgconfig:$(PKG_CONFIG_PATH)" \
STAGING_DIR="$(STAGING_DIR)"
+TARGET_CONFIGURE_ENV=\
+ CFLAGS="$(TARGET_CFLAGS)" \
+ CXXFLAGS="$(TARGET_CXXFLAGS)" \
+ LDFLAGS="$(TARGET_LDFLAGS)" \
+ FCFLAGS="$(TARGET_FCFLAGS)" \
+
HOST_CONFIGURE_OPTS=PATH=$(TARGET_PATH) \
AR="$(HOSTAR)" \
AS="$(HOSTAS)" \
@@ -310,6 +331,11 @@ TARGET_CONFIGURE_ARGS= \
$(BR2_AC_CV_TRAP_CHECK) \
ac_cv_func_mmap_fixed_mapped=yes \
ac_cv_func_memcmp_working=yes \
+ ac_cv_have_decl_malloc=yes \
+ gl_cv_func_malloc_0_nonnull=yes \
+ ac_cv_func_malloc_0_nonnull=yes \
+ ac_cv_func_calloc_0_nonnull=yes \
+ ac_cv_func_realloc_0_nonnull=yes \
$(BR2_AC_CV_C_BIGENDIAN)
#######################################################################