diff options
author | jkh <jkh@FreeBSD.org> | 1994-08-24 14:49:33 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1994-08-24 14:49:33 +0000 |
commit | 8db48086f98c44f4a07365a81fa77c3d30a888fb (patch) | |
tree | 1306887cbafbf76826340d5afb7e9e94711f813b /Mk | |
parent | 1fb9b28852dae1dc7aeb12a12c48565003d57ec6 (diff) | |
download | FreeBSD-ports-8db48086f98c44f4a07365a81fa77c3d30a888fb.zip FreeBSD-ports-8db48086f98c44f4a07365a81fa77c3d30a888fb.tar.gz |
Some cosmetic changes.
Add pre-{build,extract,install,...} targets for Torsten, who apparently
needs them. Can't do effective post-* targets without major work, sorry.
Jordan
Reviewed by:
Submitted by:
Diffstat (limited to 'Mk')
-rw-r--r-- | Mk/bsd.port.mk | 63 |
1 files changed, 56 insertions, 7 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk index 4eb4fb7..ebe719b 100644 --- a/Mk/bsd.port.mk +++ b/Mk/bsd.port.mk @@ -1,7 +1,7 @@ # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. # -# $Id: bsd.port.mk,v 1.14 1994/08/22 13:11:32 jkh Exp $ +# $Id: bsd.port.mk,v 1.15 1994/08/22 13:25:33 jkh Exp $ # # Supported Variables and their behaviors: @@ -30,8 +30,9 @@ # Default targets and their behaviors: # # extract - Unpacks ${DISTDIR}/${DISTNAME}.tar.gz into ${WRKDIR}. -# configure - Applys patches, if any, and runs either GNU configure, a -# local configure or nothing, depending on settings. +# configure - Applys patches, if any, and runs either GNU configure, one +# or more local configure scripts or nothing, depending on +# what's available. # build - Actually compile the sources. # install - Install the results of a build. # package - Create a package from a build. @@ -71,7 +72,7 @@ BUNDLE_CMD?= tar BUNDLE_ARGS?= -C ${WRKDIR} -czf PKG_CMD?= pkg_create -PKG_ARGS?= -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST +PKG_ARGS?= -v -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST PKG_SUFX?= .tgz HOME_LOCATION?= <original site unknown> @@ -79,6 +80,14 @@ HOME_LOCATION?= <original site unknown> .MAIN: all all: extract configure build +# Try to make whomever's install target maintain the same semantics. +install:: pre-install + +.if !target(pre-install) +pre-install: + @echo -n +.endif + .if !target(install) install: @echo "===> Installing for ${DISTNAME}" @@ -89,21 +98,38 @@ install: .endif .endif +# Try to make whomever's package target maintain the same semantics. +package:: pre-package + +.if !target(pre-package) +pre-package: + @echo -n +.endif + .if !target(package) package: # Makes some gross assumptions about a fairly simple package with no # install, require or deinstall scripts. Override the arguments with # PKG_ARGS if your package is anything but run-of-the-mill. @if [ -d ${PKGDIR} ]; then \ - echo "===> Building package for ${DISTNAME}"; \ - @if [ -d ${PACKAGES} ]; then \ + if [ -d ${PACKAGES} ]; then \ + echo "===> Building package for ${DISTNAME} in ${PACKAGES}"; \ ${PKG_CMD} ${PKG_ARGS} ${PACKAGES}/${DISTNAME}${PKG_SUFX}; \ else \ + echo "===> Building package for ${DISTNAME} in ${.CURDIR}"; \ ${PKG_CMD} ${PKG_ARGS} ${DISTNAME}${PKG_SUFX}; \ fi; \ fi .endif +# Try to make whomever's build target maintain the same semantics. +build:: pre-build + +.if !target(pre-build) +pre-build: + @echo -n +.endif + .if !target(build) build: configure @echo "===> Building for ${DISTNAME}" @@ -126,6 +152,11 @@ build: configure .endif .endif +# No pre-configure stuff since that's handled differently. We wrap +# pre-configure and post-configure scripts around what is generally +# an originally-provided script file, and easier to pre/post install for +# than change. + .if !target(configure) # This is done with a .configure because configures are often expensive, # and you don't want it done again gratuitously when you're trying to get @@ -159,6 +190,14 @@ ${CONFIGURE_COOKIE}: @touch -f ${CONFIGURE_COOKIE} .endif +# Try to make whomever's bundle target maintain the same semantics. +bundle:: pre-bundle + +.if !target(pre-bundle) +pre-bundle: + @echo -n +.endif + .if !target(bundle) bundle: @echo "===> Bundling for ${DISTNAME}" @@ -168,13 +207,21 @@ bundle: exit 0; \ fi @if [ -f ${CONFIGURE_COOKIE} ]; then \ - echo ">> WARNING: This source has been configured and may be"; \ + echo ">> WARNING: This source has been configured and may"; \ echo ">> produce a tainted distfile!"; \ fi ${BUNDLE_CMD} ${BUNDLE_ARGS} ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \ ${DISTNAME} .endif +# Try to make whomever's extract target maintain the same semantics. +extract:: pre-extract + +.if !target(pre-extract) +pre-extract: + @echo -n +.endif + .if !target(extract) # We need to depend on .extract_done rather than the presence of ${WRKDIR} # because if the user interrupts the extract in the middle (and it's often @@ -197,6 +244,8 @@ ${EXTRACT_COOKIE}: @touch -f ${EXTRACT_COOKIE} .endif +# No pre-targets for clean, depend or tags. It would be silly. + .if !target(clean) clean: @echo "===> Cleaning for ${DISTNAME}" |