summaryrefslogtreecommitdiff
path: root/mk/host-bottom.mk
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2013-10-28 16:33:41 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2013-10-28 16:33:41 +0100
commit444176e8aa3a958f147f15542793678b619be262 (patch)
tree3bae8dc0b3fd98ebffc239c6f4d0bb2e7604d957 /mk/host-bottom.mk
parent05abc676e9272fdf933e0ea376bb12d8ec497467 (diff)
fix host build stuff and update-patches, convert cifs-utils and libaudiofile to new autotool infrastructure
Diffstat (limited to 'mk/host-bottom.mk')
-rw-r--r--mk/host-bottom.mk69
1 files changed, 41 insertions, 28 deletions
diff --git a/mk/host-bottom.mk b/mk/host-bottom.mk
index 072254087..327883a95 100644
--- a/mk/host-bottom.mk
+++ b/mk/host-bottom.mk
@@ -5,35 +5,39 @@ host-extract: ${_HOST_PATCH_COOKIE}
host-configure:
${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE}
- #@sed -e '/^#/d' ${REORDER_DEPENDENCIES} | \
- #tsort | while read f; do \
- # cd ${WRKSRC}; \
- # case $$f in \
- # /*) \
- # find . -name "$${f#/}" -print | while read i; do \
- # touch "$$i"; \
- # done;; \
- # *) \
- # if test -e "$$f" ; then \
- # touch "$$f"; \
- # fi;; \
- # esac; \
- #done
- @mkdir -p ${WRKBUILD}
- @$(CMD_TRACE) "configuring... "
- @cd ${WRKBUILD}; \
- for i in $$(find . -name config.sub);do \
- if [ -f $$i ]; then \
- ${CP} $$i $$i.bak; \
- ${CP} ${SCRIPT_DIR}/config.sub $$i; \
- fi; \
- done; \
- for i in $$(find . -name config.guess);do \
- if [ -f $$i ]; then \
+ @mkdir -p ${WRKBUILD}
+ @$(CMD_TRACE) "host configuring... "
+ @cd ${WRKBUILD}; \
+ for i in $$(find . -name config.sub);do \
+ if [ -f $$i ]; then \
${CP} $$i $$i.bak; \
- ${CP} ${SCRIPT_DIR}/config.guess $$i; \
+ ${CP} ${SCRIPT_DIR}/config.sub $$i; \
fi; \
+ done; \
+ for i in $$(find . -name config.guess);do \
+ if [ -f $$i ]; then \
+ ${CP} $$i $$i.bak; \
+ ${CP} ${SCRIPT_DIR}/config.guess $$i; \
+ fi; \
done;
+ifneq ($(filter auto,${HOST_STYLE}),)
+ cd ${WRKBUILD}; rm -f config.{cache,status}; \
+ env ${HOST_CONFIGURE_ENV} \
+ ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
+ --program-prefix= \
+ --program-suffix= \
+ --prefix=${STAGING_HOST_DIR}/usr \
+ --bindir=${STAGING_HOST_DIR}/usr/bin \
+ --datadir=${STAGING_HOST_DIR}/usr/share \
+ --mandir=${STAGING_HOST_DIR}/usr/share/man \
+ --libexecdir=${STAGING_HOST_DIR}/usr/libexec \
+ --sysconfdir=${STAGING_HOST_DIR}/etc \
+ --disable-dependency-tracking \
+ --disable-libtool-lock \
+ --disable-nls \
+ ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
+
+else
cd ${WRKBUILD}; rm -f config.{cache,status}; \
env ${HOST_CONFIGURE_ENV} \
${BASH} ${WRKSRC}/${CONFIGURE_PROG} \
@@ -50,11 +54,12 @@ ${_HOST_CONFIGURE_COOKIE}: ${_HOST_PATCH_COOKIE}
--disable-libtool-lock \
--disable-nls \
${HOST_CONFIGURE_ARGS} $(MAKE_TRACE)
+endif
touch $@
host-build:
${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
- @$(CMD_TRACE) "compiling... "
+ @$(CMD_TRACE) "host compiling... "
cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
${HOST_MAKE_FLAGS} ${HOST_ALL_TARGET} $(MAKE_TRACE)
touch $@
@@ -62,16 +67,24 @@ ${_HOST_BUILD_COOKIE}: ${_HOST_CONFIGURE_COOKIE}
hpkg-install: ${ALL_HOSTINST}
host-install:
${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE}
+ @$(CMD_TRACE) "host installing... "
+ifneq ($(filter auto,${HOST_STYLE}),)
+ cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+ DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
+else
cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
DESTDIR='${HOST_WRKINST}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE)
env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE)
+endif
rm -rf ${WRKBUILD} ${WRKDIST} ${WRKSRC}
exec ${MAKE} host-extract $(MAKE_TRACE)
+ mkdir -p ${HOST_WRKINST}
touch $@
+ # avoid rebuild
+ touch ${_HOST_BUILD_COOKIE} ${_HOST_CONFIGURE_COOKIE}
${_HOST_COOKIE}:
exec ${MAKE} hostpackage
hostpackage: ${ALL_HOSTDIRS}
touch ${_HOST_COOKIE}
-