aboutsummaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorSatoshi Asami <asami@FreeBSD.org>1995-04-30 12:28:43 +0000
committerSatoshi Asami <asami@FreeBSD.org>1995-04-30 12:28:43 +0000
commitafed0bc70edcd919f2c19a9b7e2fbe7397fffa8a (patch)
treef10465a2549c561f8a259244b3cf1152b767ea0a /Mk/bsd.port.mk
parent82374aa9e3f6e4cb41c6809cc0cf6b3a9136867c (diff)
downloadports-afed0bc70edcd919f2c19a9b7e2fbe7397fffa8a.tar.gz
ports-afed0bc70edcd919f2c19a9b7e2fbe7397fffa8a.zip
A bunch of new targets in the package area. Relevent targets are:
package: check installation, build package, create links, touch cookie repackage: ditto but don't check cookie package-noinstall: just build package from installed stuff, no cookies involved at all package-links create the symbolic links only delete-package: delete package and symbolic links delete-package-links: delete links only These should make the management of the spaghetti of package links a little friendlier. :)
Notes
Notes: svn path=/head/; revision=1558
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk58
1 files changed, 44 insertions, 14 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 2ce52f269d35..b0daf9e63ced 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.150 1995/04/24 10:41:51 asami Exp $
+# $Id: bsd.port.mk,v 1.151 1995/04/28 15:40:37 jkh Exp $
#
# Please view me with 4 column tabs!
@@ -193,6 +193,7 @@ CONFIGURE_COOKIE?= ${WRKDIR}/.configure_done
INSTALL_COOKIE?= ${WRKDIR}/.install_done
BUILD_COOKIE?= ${WRKDIR}/.build_done
PATCH_COOKIE?= ${WRKDIR}/.patch_done
+PACKAGE_COOKIE?= ${WRKDIR}/.package_done
# How to do nothing. Override if you, for some strange reason, would rather
# do something.
@@ -882,17 +883,30 @@ package-depends:
# Build a package
.if !target(package)
-package: install
+package: install ${PACKAGE_COOKIE}
+
+${PACKAGE_COOKIE}:
.if target(pre-package)
@${MAKE} ${.MAKEFLAGS} pre-package
.endif
@${MAKE} ${.MAKEFLAGS} do-package
+ @${TOUCH} ${TOUCH_FLAGS} ${PACKAGE_COOKIE}
.endif
-# Build a package but don't check the cookie for installation
+# Build a package but don't check the package cookie
.if !target(repackage)
-repackage:
+repackage: pre-repackage package
+
+pre-repackage:
+ @rm -f ${PACKAGE_COOKIE}
+.endif
+
+# Build a package but don't check the cookie for installation, also don't
+# install package cookie
+
+.if !target(package-noinstall)
+package-noinstall:
.if target(pre-package)
@${MAKE} ${.MAKEFLAGS} pre-package
.endif
@@ -915,20 +929,36 @@ do-package:
fi; \
${PKG_CMD} ${PKG_ARGS} ${PKGFILE}; \
if [ -d ${PACKAGES} ]; then \
- rm -f ${PACKAGES}/*/${PKGNAME}${PKG_SUFX}; \
- for cat in ${CATEGORIES}; do \
- if [ ! -d ${PACKAGES}/$$cat ]; then \
- if ! mkdir -p ${PACKAGES}/$$cat; then \
- ${ECHO_MSG} ">> Can't create directory ${PACKAGES}/$$cat."; \
- exit 1; \
- fi; \
- fi; \
- ln -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \
- done; \
+ ${MAKE} ${.MAKEFLAGS} package-links; \
fi; \
fi
.endif
+.if !target(package-links)
+package-links:
+ @${MAKE} ${.MAKEFLAGS} delete-package-links
+ @for cat in ${CATEGORIES}; do \
+ if [ ! -d ${PACKAGES}/$$cat ]; then \
+ if ! mkdir -p ${PACKAGES}/$$cat; then \
+ ${ECHO_MSG} ">> Can't create directory ${PACKAGES}/$$cat."; \
+ exit 1; \
+ fi; \
+ fi; \
+ ln -s ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PACKAGES}/$$cat; \
+ done;
+.endif
+
+.if !target(delete-package-links)
+delete-package-links:
+ @rm -f ${PACKAGES}/*/${PKGNAME}${PKG_SUFX};
+.endif
+
+.if !target(delete-package)
+delete-package:
+ @${MAKE} ${.MAKEFLAGS} delete-package-links
+ @rm -f ${PKGFILE}
+.endif
+
################################################################
# Dependency checking
################################################################