summaryrefslogtreecommitdiff
path: root/mk/package.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/package.mk')
-rw-r--r--mk/package.mk17
1 files changed, 8 insertions, 9 deletions
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)'; \