From bcd130f15376964f63bd9f88c24d30ae3cb14432 Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Wed, 19 Mar 2014 20:54:03 +0100 Subject: use separate WRKDIR for host packages to avoid rebuild problems in wrong order, findstring idea from tg --- mk/host-bottom.mk | 7 +------ mk/host.mk | 9 +++++++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'mk') diff --git a/mk/host-bottom.mk b/mk/host-bottom.mk index 23d5652ba..19b43b081 100644 --- a/mk/host-bottom.mk +++ b/mk/host-bottom.mk @@ -79,6 +79,7 @@ hpkg-install: ${ALL_HOSTINST} host-install: ${_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} \ @@ -92,12 +93,6 @@ else env ${HOST_MAKE_ENV} ${MAKE} hpkg-install $(MAKE_TRACE) endif env ${HOST_MAKE_ENV} ${MAKE} hostpost-install $(MAKE_TRACE) - rm -rf ${WRKBUILD} ${WRKDIST} ${WRKSRC} - exec ${MAKE} host-extract $(MAKE_TRACE) - mkdir -p ${HOST_WRKINST} - # avoid rebuild - @touch ${_HOST_CONFIGURE_COOKIE} - @touch ${_HOST_BUILD_COOKIE} @touch $@ ${_HOST_COOKIE}: diff --git a/mk/host.mk b/mk/host.mk index aa88bab44..ce41a7d7d 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -1,6 +1,11 @@ # This file is part of the OpenADK project. OpenADK is copyrighted # material, please see the LICENCE file in the top-level directory. +# This is where all package operation is done in +ifneq (,$(findstring hostpackage,$(MAKECMDGOALS))) +WRKDIR?= ${WRKDIR_BASE}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host +endif + HOST_CONFIGURE_ENV+= AUTOM4TE=${STAGING_HOST_DIR}/usr/bin/autom4te \ CONFIG_SHELL='$(strip ${SHELL})' \ PKG_CONFIG_LIBDIR='${STAGING_HOST_DIR}/usr/lib/pkgconfig' \ @@ -30,7 +35,7 @@ HOST_MAKE_ENV+= PATH='${HOST_PATH}' \ HOST_MAKE_FLAGS+= ${HOST_XAKE_FLAGS} V=1 HOST_FAKE_FLAGS+= ${HOST_XAKE_FLAGS} -HOST_WRKINST= ${WRKDIR}/host +HOST_WRKINST= ${WRKDIR}/fake _HOST_EXTRACT_COOKIE= ${WRKDIST}/.extract_done _HOST_PATCH_COOKIE= ${WRKDIST}/.prepared @@ -54,7 +59,7 @@ hostfake: ${_HOST_FAKE_COOKIE} define HOST_template ALL_PKGOPTS+= $(1) PKGNAME_$(1)= $(2) -HOSTDIR_$(1)= $(WRKDIR)/host +HOSTDIR_$(1)= $(WRKDIR)/fake ALL_HOSTDIRS+= $${HOSTDIR_$(1)} ALL_HOSTINST+= $(2)-hostinstall -- cgit v1.2.3 From 8d6de9990ea0098f0932f4bfe64c331b67a9a40e Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Thu, 20 Mar 2014 00:16:45 +0100 Subject: convert to HOST_STYLE auto, add hostclean target --- mk/host-bottom.mk | 4 ++++ mk/host.mk | 4 ++-- mk/package.mk | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) (limited to 'mk') diff --git a/mk/host-bottom.mk b/mk/host-bottom.mk index 19b43b081..43a622c0f 100644 --- a/mk/host-bottom.mk +++ b/mk/host-bottom.mk @@ -102,3 +102,7 @@ ifeq ($(HOST_LINUX_ONLY),) hostpackage: ${ALL_HOSTDIRS} @touch ${_HOST_COOKIE} endif + +hostclean: + @$(CMD_TRACE) "cleaning... " + rm -rf ${WRKDIR} ${STAGING_PKG_DIR}/stamps/${PKG_NAME}*-host diff --git a/mk/host.mk b/mk/host.mk index ce41a7d7d..5f9539aef 100644 --- a/mk/host.mk +++ b/mk/host.mk @@ -2,7 +2,7 @@ # material, please see the LICENCE file in the top-level directory. # This is where all package operation is done in -ifneq (,$(findstring hostpackage,$(MAKECMDGOALS))) +ifneq (,$(findstring host,$(MAKECMDGOALS))) WRKDIR?= ${WRKDIR_BASE}/w-${PKG_NAME}-${PKG_VERSION}-${PKG_RELEASE}-host endif @@ -68,4 +68,4 @@ $$(HOSTDIR_$(1)): ${_HOST_PATCH_COOKIE} ${_HOST_FAKE_COOKIE} endef .PHONY: all hostextract hostpatch hostconfigure \ - hostbuild hostpackage hostfake + hostbuild hostpackage hostfake hostclean diff --git a/mk/package.mk b/mk/package.mk index a70de9377..ed94e3539 100644 --- a/mk/package.mk +++ b/mk/package.mk @@ -314,7 +314,7 @@ clean-targets: clean: @$(CMD_TRACE) "cleaning... " @$(MAKE) clean-targets $(MAKE_TRACE) - rm -rf ${WRKDIR} ${ALL_IPKGS} ${STAGING_PKG_DIR}/stamps/${PKG_NAME}* + rm -rf ${WRKDIR} ${ALL_IPKGS} ${STAGING_PKG_DIR}/stamps/${PKG_NAME}${PKG_VERSION} distclean: clean rm -f ${FULLDISTFILES} -- cgit v1.2.3