aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1994-09-02 00:01:34 +0800
committerjkh <jkh@FreeBSD.org>1994-09-02 00:01:34 +0800
commit7d77d290c3b7ca8ae639ba2d898898888d7f8014 (patch)
tree3fdbd3e0adeae65fe9fa25e7d9ed31a1ca0de935 /Mk
parent5e340e58f2cabd5cc8889745d2c20ad19f8a568a (diff)
downloadfreebsd-ports-gnome-7d77d290c3b7ca8ae639ba2d898898888d7f8014.tar.gz
freebsd-ports-gnome-7d77d290c3b7ca8ae639ba2d898898888d7f8014.tar.zst
freebsd-ports-gnome-7d77d290c3b7ca8ae639ba2d898898888d7f8014.zip
Geeze, what was I thinking again? Replace all references to:
${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} With simply `${DISTFILE}' which defaults to the above. This lets you easily name distribution files that don't cooperate with any rational naming syntax. Similarly, make a variable called ${PKGFILE} which fills the same purpose for packages. Just trying to make this thing really really general to suit every need. Now I need somebody to figure out how to make the extract target auto-fetch things from ${HOME_LOCATION} with ncftp *if* ncftp is installed and it looks possible to reach the foreign site. That will take some fancy footwork, but would be slick. I've changed this too so that HOME_LOCATION is no longer set by default, allowing you to do an .if defined(..) check for it. The extract rule now does this too. Submitted by: jkh
Diffstat (limited to 'Mk')
-rw-r--r--Mk/bsd.port.mk22
1 files changed, 15 insertions, 7 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 9d144a582c2c..8e2e8cb85f31 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.21 1994/08/28 14:41:34 jkh Exp $
+# $Id: bsd.port.mk,v 1.22 1994/08/30 16:39:27 adam Exp $
#
# Supported Variables and their behaviors:
@@ -96,7 +96,12 @@ PKG_CMD?= pkg_create
PKG_ARGS?= -v -c ${PKGDIR}/COMMENT -d ${PKGDIR}/DESCR -f ${PKGDIR}/PLIST
PKG_SUFX?= .tgz
-HOME_LOCATION?= <original site unknown>
+# Set no default value for this so we can easily detect its absence.
+#HOME_LOCATION?= <original site unknown>
+
+# Derived names so that they're easily overridable.
+DISTFILE?= ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}
+PKGFILE?= ${PACKAGES}/${DISTNAME}${PKG_SUFX}
.MAIN: all
all: extract configure build
@@ -254,8 +259,7 @@ bundle: pre-bundle
echo ">> WARNING: This source has been configured and may"; \
echo ">> produce a tainted distfile!"; \
fi
- ${BUNDLE_CMD} ${BUNDLE_ARGS} ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} \
- ${DISTNAME}
+ ${BUNDLE_CMD} ${BUNDLE_ARGS} ${DISTFILE} ${DISTNAME}
.endif
.if !target(pre-extract)
@@ -274,14 +278,18 @@ ${EXTRACT_COOKIE}:
@echo "===> Extracting for ${DISTNAME}"
@rm -rf ${WRKDIR}
@mkdir -p ${WRKDIR}
- @if [ ! -f ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX} ]; then \
- echo ">> Sorry, can't find: ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}"; \
+ @if [ ! -f ${DISTFILE} ]; then \
+ echo ">> Sorry, can't find: ${DISTFILE}"; \
echo ">> Please obtain this file from:"; \
+.if defined(HOME_LOCATION)
echo ">> ${HOME_LOCATION}"; \
+.else
+ echo ">> <original site unknown>"; \
+.endif
echo ">>before proceeding."; \
exit 1; \
fi
- @${EXTRACT_CMD} ${EXTRACT_ARGS} ${DISTDIR}/${DISTNAME}${EXTRACT_SUFX}
+ @${EXTRACT_CMD} ${EXTRACT_ARGS} ${DISTFILE}
@touch -f ${EXTRACT_COOKIE}
.endif