diff options
author | jlam <jlam> | 2006-07-05 06:09:15 +0000 |
---|---|---|
committer | jlam <jlam> | 2006-07-05 06:09:15 +0000 |
commit | fb2264d773c37f606d8a4684e0599019bafbcdf7 (patch) | |
tree | 5cda57cdca85b18146d681fc321900e0b05b7666 /mk/build/bsd.build.mk | |
parent | 7a214e80a1d117a1dc986293ccb493d6eb35032e (diff) | |
download | pkgsrc-fb2264d773c37f606d8a4684e0599019bafbcdf7.tar.gz |
Refactor configure, build, test and wrapper phases out of bsd.pkg.mk
and into their own directories. Also do some cleanups with build/_build
and pkginstall -- we get rid of _build and simply run pkginstall as
part of the "build" target.
Introduce a new mechanism to handle varying directory depths under
${WRKSRC} in which we find files to override, e.g. configure, config.*,
libtool, etc. OVERRIDE_DIRDEPTH is a package-settable variable that
specifies how far under ${WRKSRC} the various targets should look,
and it defaults to "2". We preserve the
meaning of the various *_OVERRIDE variables, so if they are defined,
then their values supersede the OVERRIDE_DIRDEPTH mechanism.
devel/tla will need to specially set OVERRIDE_DIRDEPTH to 3 (see log
for revision 1.1857 for bsd.pkg.mk -- to be done in a separate commit.
Diffstat (limited to 'mk/build/bsd.build.mk')
-rw-r--r-- | mk/build/bsd.build.mk | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/mk/build/bsd.build.mk b/mk/build/bsd.build.mk new file mode 100644 index 00000000000..8b1e0aaf444 --- /dev/null +++ b/mk/build/bsd.build.mk @@ -0,0 +1,43 @@ +# $NetBSD: bsd.build.mk,v 1.1 2006/07/05 06:09:15 jlam Exp $ +# +# This Makefile fragment is included by bsd.pkg.mk and provides all +# variables and targets related to building sources for a package. +# +# The following are the "public" targets provided by this module: +# +# build, test +# +# The following targets may be overridden in a package Makefile: +# +# pre-build, do-build, post-build +# pre-test, do-test, post-test +# + +_BUILD_COOKIE= ${WRKDIR}/.build_done +_TEST_COOKIE= ${WRKDIR}/.test_done + +###################################################################### +### build (PUBLIC) +###################################################################### +### build is a public target to build the sources for the package. +### +.PHONY: build +.if defined(NO_BUILD) +. if !target(build) +build: configure build-cookie +. endif +.else +. include "${PKGSRCDIR}/mk/build/build.mk" +.endif + +.include "${PKGSRCDIR}/mk/build/test.mk" + +###################################################################### +### build-cookie (PRIVATE) +###################################################################### +### build-cookie creates the "build" cookie file. +### +.PHONY: build-cookie +build-cookie: + ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${_BUILD_COOKIE:H} + ${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} >> ${_BUILD_COOKIE} |