From 0aabef127155575e8c8d660605f9401ab15356aa Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 24 Feb 2011 17:41:36 +0100 Subject: allow native build of a lot of packages STAGING_TARGET_DIR is used for package Makefile's for include and library search path's. STAGING_DIR is used for common code in mk/ or Makefile/rules.mk. STAGING_TARGET_DIR is /usr when native builds are used. --- mk/package.mk | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) (limited to 'mk/package.mk') diff --git a/mk/package.mk b/mk/package.mk index 9b2b77559..df05e98ae 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -18,12 +18,11 @@ CONFIGURE_ENV+= GCC_HONOUR_COPTS=s \ CPPFLAGS='$(strip ${TARGET_CPPFLAGS})' \ LDFLAGS='$(strip ${TARGET_LDFLAGS})' \ ${HOST_CONFIGURE_OPTS} \ - PKG_CONFIG_LIBDIR='${STAGING_TARGET_DIR}/usr/lib/pkgconfig' -ifeq ($(ADK_NATIVE),) -CONFIGURE_ENV+= ${TARGET_CONFIGURE_OPTS} \ - cross_compiling=yes \ + PKG_CONFIG_LIBDIR='${STAGING_TARGET_DIR}/usr/lib/pkgconfig' \ ac_cv_func_realloc_0_nonnull=yes \ ac_cv_func_malloc_0_nonnull=yes +ifeq ($(ADK_NATIVE),) +CONFIGURE_ENV+= ${TARGET_CONFIGURE_OPTS} cross_compiling=yes endif CONFIGURE_PROG?= configure @@ -172,10 +171,10 @@ ifeq (${ADK_INSTALL_PACKAGE_INIT_SCRIPTS},y) done endif @mkdir -p $${PACKAGE_DIR} '$${STAGING_PKG_DIR}' \ - '$${STAGING_TARGET_DIR}/scripts' + '$${STAGING_DIR}/scripts' ifeq (,$(filter noremove,$(7))) @if test -s '$${STAGING_PKG_DIR}/$(1)'; then \ - cd '$${STAGING_TARGET_DIR}'; \ + cd '$${STAGING_DIR}'; \ while read fn; do \ rm -f "$$$$fn"; \ done <'$${STAGING_PKG_DIR}/$(1)'; \ @@ -195,8 +194,8 @@ endif find usr ! -type d 2>/dev/null | \ grep -v -e '^usr/share' -e '^usr/man' -e '^usr/info' -e '^usr/lib/libc.so' | \ tee '$${STAGING_PKG_DIR}/$(1)' | \ - $(TOOLS_DIR)/cpio -padlmu '$${STAGING_TARGET_DIR}' - @cd '$${STAGING_TARGET_DIR}'; grep 'usr/lib/.*\.la$$$$' \ + $(TOOLS_DIR)/cpio -padlmu '$${STAGING_DIR}' + @cd '$${STAGING_DIR}'; grep 'usr/lib/.*\.la$$$$' \ '$${STAGING_PKG_DIR}/$(1)' | while read fn; do \ chmod u+w $$$$fn; \ $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_TARGET_DIR)/usr/lib,g" $$$$fn; \ @@ -223,7 +222,7 @@ clean-targets: clean-dev-$(1) clean-dev-$(1): ifeq (,$(filter noremove,$(7))) @if test -s '$${STAGING_PKG_DIR}/$(1)'; then \ - cd '$${STAGING_TARGET_DIR}'; \ + cd '$${STAGING_DIR}'; \ while read fn; do \ rm -f "$$$$fn"; \ done <'$${STAGING_PKG_DIR}/$(1)'; \ -- cgit v1.2.3