From bf8903fa567e5c1b5d923c6f1c0aeb1d2fd1192a Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 15 Jun 2014 13:09:33 +0200 Subject: cleanup HOST_STYLE, use SYSROOT feature for pkgconf there are three HOST_STYLE's, not set mean fully automatic installation. auto means prefix is set to /usr and DESTDIR is set to STAGING_HOST_DIR. When using manual, you need to provide your own targets. Instead of using sed to modify *.pc files, use PKG_SYSROOT feature, which does work better and avoids pathcing some pc files. Idea from sh4rm via #musl. --- mk/host-bottom.mk | 54 ++++++++++++++++++++++++++---------------------------- 1 file changed, 26 insertions(+), 28 deletions(-) (limited to 'mk/host-bottom.mk') diff --git a/mk/host-bottom.mk b/mk/host-bottom.mk index 8ef4a868e..84998df38 100644 --- a/mk/host-bottom.mk +++ b/mk/host-bottom.mk @@ -16,54 +16,53 @@ endif @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 \ - ${CP} $$i $$i.bak; \ ${CP} ${SCRIPT_DIR}/config.guess $$i; \ fi; \ done; @${MAKE} hostpre-configure $(MAKE_TRACE) -ifneq (${HOST_STYLE},manual) -ifeq ($(strip ${HOST_STYLE}),) - cd ${WRKBUILD}; rm -f config.{cache,status}; \ +ifeq (${HOST_STYLE},) + cd ${WRKBUILD}; \ env ${HOST_CONFIGURE_ENV} \ ${BASH} ${WRKSRC}/${CONFIGURE_PROG} \ --program-prefix= \ --program-suffix= \ - --prefix=/usr \ - --bindir=/usr/bin \ - --datadir=/usr/share \ - --mandir=/usr/share/man \ - --libexecdir=/usr/libexec \ - --localstatedir=/var \ - --sysconfdir=/etc \ + --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}; \ +endif +ifeq (${HOST_STYLE},auto) + cd ${WRKBUILD}; \ 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 \ + --prefix=/usr \ + --bindir=/usr/bin \ + --datadir=/usr/share \ + --mandir=/usr/share/man \ + --libexecdir=/usr/libexec \ + --localstatedir=/var \ + --sysconfdir=/etc \ --disable-dependency-tracking \ --disable-libtool-lock \ --disable-nls \ ${HOST_CONFIGURE_ARGS} $(MAKE_TRACE) endif -endif +ifeq (${HOST_STYLE},manual) ${MAKE} host-configure $(MAKE_TRACE) +endif touch $@ host-build: @@ -81,16 +80,15 @@ host-install: ${ALL_HOSTINST} ${_HOST_FAKE_COOKIE}: ${_HOST_BUILD_COOKIE} @$(CMD_TRACE) "host installing... " @mkdir -p ${HOST_WRKINST} -ifneq (${HOST_STYLE},manual) -ifeq ($(strip ${HOST_STYLE}),) - 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} host-install $(MAKE_TRACE) -else +ifeq (${HOST_STYLE},) cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ DESTDIR='' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) endif -else +ifeq (${HOST_STYLE},auto) + cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \ + DESTDIR='${STAGING_HOST_DIR}' ${HOST_FAKE_FLAGS} ${HOST_INSTALL_TARGET} $(MAKE_TRACE) +endif +ifeq (${HOST_STYLE},manual) env ${HOST_MAKE_ENV} ${MAKE} host-install $(MAKE_TRACE) endif env ${HOST_MAKE_ENV} ${MAKE} hostpost-install $(MAKE_TRACE) -- cgit v1.2.3