diff options
Diffstat (limited to 'mk')
-rw-r--r-- | mk/build.mk | 18 | ||||
-rw-r--r-- | mk/package.mk | 17 | ||||
-rw-r--r-- | mk/pkg-bottom.mk | 12 | ||||
-rw-r--r-- | mk/vars.mk | 1 |
4 files changed, 24 insertions, 24 deletions
diff --git a/mk/build.mk b/mk/build.mk index d324d6579..553d90f9b 100644 --- a/mk/build.mk +++ b/mk/build.mk @@ -134,23 +134,23 @@ ifeq ($(ADK_TARGET_PACKAGE_IPKG),y) ${BASH} ${TOPDIR}/scripts/ipkg-make-index.sh . >Packages endif -${STAGING_TARGET_DIR} ${STAGING_TARGET_DIR}/etc ${STAGING_HOST_DIR}: - mkdir -p ${STAGING_TARGET_DIR}/{bin,etc,lib,usr/include,usr/lib} \ +${STAGING_DIR} ${STAGING_DIR}/etc ${STAGING_HOST_DIR}: + mkdir -p ${STAGING_DIR}/{bin,etc,lib,usr/include,usr/lib} \ ${STAGING_HOST_DIR}/{bin,lib,usr/bin,usr/lib} -${STAGING_TARGET_DIR}/etc/ipkg.conf: ${STAGING_TARGET_DIR}/etc +${STAGING_DIR}/etc/ipkg.conf: ${STAGING_DIR}/etc ifeq ($(ADK_TARGET_PACKAGE_IPKG),y) - echo "dest root /" >${STAGING_TARGET_DIR}/etc/ipkg.conf - echo "option offline_root ${TARGET_DIR}" >>$(STAGING_TARGET_DIR)/etc/ipkg.conf + echo "dest root /" >${STAGING_DIR}/etc/ipkg.conf + echo "option offline_root ${TARGET_DIR}" >>$(STAGING_DIR)/etc/ipkg.conf endif -package/%: ${STAGING_TARGET_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk +package/%: ${STAGING_DIR}/etc/ipkg.conf ${TOPDIR}/package/Depends.mk $(MAKE) -C package $(patsubst package/%,%,$@) target/%: $(MAKE) -C target $(patsubst target/%,%,$@) -toolchain/%: ${STAGING_TARGET_DIR} +toolchain/%: ${STAGING_DIR} $(MAKE) -C toolchain $(patsubst toolchain/%,%,$@) tools/%: @@ -211,7 +211,7 @@ clean: for d in ${STAGING_PKG_DIR}; do \ for f in $$(ls $$d/[a-z]* 2>/dev/null); do \ while read file ; do \ - rm ${STAGING_TARGET_DIR}/$$file 2>/dev/null;\ + rm ${STAGING_DIR}/$$file 2>/dev/null;\ done < $$f ; \ rm $$f ; \ done \ @@ -237,7 +237,7 @@ cleantarget: @$(TRACE) cleantarget @$(MAKE) -C $(CONFIG) clean $(MAKE_TRACE) rm -rf $(BUILD_DIR) $(BIN_DIR) $(TARGET_DIR) - rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_HOST_DIR) $(STAGING_TARGET_DIR) $(STAGING_PKG_DIR) + rm -rf $(TOOLCHAIN_BUILD_DIR) $(STAGING_HOST_DIR) $(STAGING_DIR) $(STAGING_PKG_DIR) rm -f .tmpconfig.h all.config .defconfig distclean: 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)'; \ diff --git a/mk/pkg-bottom.mk b/mk/pkg-bottom.mk index f91e1bb45..436a0cbee 100644 --- a/mk/pkg-bottom.mk +++ b/mk/pkg-bottom.mk @@ -130,7 +130,7 @@ post-install: spkg-install: ${ALL_POSTINST} ${_FAKE_COOKIE}: ${_BUILD_COOKIE} -rm -f ${_ALL_CONTROLS} - @mkdir -p '${STAGING_PKG_DIR}' ${WRKINST} '${STAGING_TARGET_DIR}/scripts' + @mkdir -p '${STAGING_PKG_DIR}' ${WRKINST} '${STAGING_DIR}/scripts' @mkdir -p ${WRKINST}/{sbin,bin,etc,lib} ${WRKINST}/usr/{sbin,bin,lib} @${MAKE} ${_ALL_CONTROLS} $(MAKE_TRACE) @env ${MAKE_ENV} ${MAKE} pre-install $(MAKE_TRACE) @@ -155,7 +155,7 @@ ifeq ($(ADK_NATIVE),) endif ifeq (,$(filter noremove,${PKG_OPTS})) @if test -s '${STAGING_PKG_DIR}/${PKG_NAME}'; then \ - cd '${STAGING_TARGET_DIR}'; \ + cd '${STAGING_DIR}'; \ while read fn; do \ rm -f "$$fn"; \ done <'${STAGING_PKG_DIR}/${PKG_NAME}'; \ @@ -170,14 +170,14 @@ 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}/${PKG_NAME}' | \ - $(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}/${PKG_NAME}' | while read fn; do \ chmod u+w $$fn; \ $(SED) "s,\(^libdir='\| \|-L\|^dependency_libs='\)/usr/lib,\1$(STAGING_TARGET_DIR)/usr/lib,g" $$fn; \ done ifeq (,$(filter noscripts,${PKG_OPTS})) - @cd '${STAGING_TARGET_DIR}'; grep 'usr/s*bin/' \ + @cd '${STAGING_DIR}'; grep 'usr/s*bin/' \ '${STAGING_PKG_DIR}/${PKG_NAME}' | \ while read fn; do \ b="$$(dd if="$$fn" bs=2 count=1 2>/dev/null)"; \ @@ -240,7 +240,7 @@ clean-targets: clean-dev-generic clean-dev-generic: ifeq (,$(filter noremove,${PKG_OPTS})) @if test -s '${STAGING_PKG_DIR}/${PKG_NAME}'; then \ - cd '${STAGING_TARGET_DIR}'; \ + cd '${STAGING_DIR}'; \ while read fn; do \ rm -f "$$fn"; \ done <'${STAGING_PKG_DIR}/${PKG_NAME}'; \ diff --git a/mk/vars.mk b/mk/vars.mk index 61e71de1d..d83f7eca8 100644 --- a/mk/vars.mk +++ b/mk/vars.mk @@ -26,6 +26,7 @@ else STAGING_TARGET_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC} SCRIPT_TARGET_DIR:= ${STAGING_TARGET_DIR}/scripts endif +STAGING_DIR:= ${BASE_DIR}/target_${CPU_ARCH}_${ADK_TARGET_LIBC} STAGING_TARGET_DIR_PFX:=${BASE_DIR}/target_* # relation from STAGING_HOST_DIR to STAGING_TARGET_DIR (for gcc to find # its sysroot while staying relocatable) |