(1) New variable MAKE_ARGS: will be appended to build/install make argument

list.  The old MAKE_FLAGS was a little hard to use since it had a weird
    default ("-f").
Suggested by:	Shigeyuki FUKUSHIMA <shige@kuis.kyoto-u.ac.jp>

(2) Add new targets clean-restricted and clean-for-cdrom, which will
    delete RESTRICTED and NO_CDROM packages and distfiles from the top.
Reviewed by:	jkh

(3) Add depends to list of things to recurse on.  It will help people
    who are trying to fetch some ports plus their dependencies.

Requested by:	Chris Dillon <cdillon@wolves.k12.mo.us>
This commit is contained in:
Satoshi Asami 1998-11-08 10:29:53 +00:00
parent ba5e60d11c
commit 9fbb2e1c7b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=41001
2 changed files with 36 additions and 12 deletions

View File

@ -1,7 +1,7 @@
#-*- mode: Fundamental; tab-width: 4; -*-
# ex:ts=4
#
# $Id: bsd.port.mk,v 1.293 1998/10/09 01:27:21 asami Exp $
# $Id: bsd.port.mk,v 1.294 1998/10/30 08:28:02 asami Exp $
# $NetBSD: $
#
# bsd.port.mk - 940820 Jordan K. Hubbard.
@ -336,6 +336,8 @@ OpenBSD_MAINTAINER= imp@OpenBSD.ORG
#
# MAKE_ENV - Additional environment vars passed to sub-make in build
# and install stages (default: see below).
# MAKE_ARGS - Any extra arguments to sub-make in build and install
# stages (default: none).
#
# For install:
#
@ -1080,6 +1082,22 @@ package:
.endif
.endif
################################################################
# Clean directories for ftp or CDROM.
################################################################
.if defined(RESTRICTED)
clean-restricted: delete-distfiles delete-package
.else
clean-restricted:
.endif
.if defined(NO_CDROM)
clean-for-cdrom: delete-distfiles delete-package
.else
clean-for-cdrom:
.endif
.if defined(ALL_HOOK)
all:
@cd ${.CURDIR} && ${SETENV} CURDIR=${.CURDIR} DISTNAME=${DISTNAME} \
@ -1308,9 +1326,9 @@ do-configure:
.if !target(do-build)
do-build:
.if defined(USE_GMAKE)
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
.else defined(USE_GMAKE)
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${ALL_TARGET})
.endif
.endif
@ -1319,14 +1337,14 @@ do-build:
.if !target(do-install)
do-install:
.if defined(USE_GMAKE)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${GMAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install.man)
.endif
.else defined(USE_GMAKE)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${INSTALL_TARGET})
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} ${INSTALL_TARGET})
.if defined(USE_IMAKE) && !defined(NO_INSTALL_MANPAGES)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} install.man)
@(cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} install.man)
.endif
.endif
.endif
@ -1624,8 +1642,12 @@ pre-distclean:
.endif
.if !target(distclean)
distclean: pre-distclean clean
@${ECHO_MSG} "===> Dist cleaning for ${PKGNAME}"
distclean: pre-distclean clean delete-distfiles
.endif
.if !target(delete-distfiles)
delete-distfiles:
@${ECHO_MSG} "===> Deleting distfiles for ${PKGNAME}"
@(if [ "X${DISTFILES}${PATCHFILES}" != "X" -a -d ${_DISTDIR} ]; then \
cd ${_DISTDIR}; \
${RM} -f ${DISTFILES} ${PATCHFILES}; \

View File

@ -1,5 +1,5 @@
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
# $Id: bsd.port.subdir.mk,v 1.24 1998/08/26 23:46:13 asami Exp $
# $Id: bsd.port.subdir.mk,v 1.25 1998/10/30 08:28:02 asami Exp $
#
# The include file <bsd.port.subdir.mk> contains the default targets
# for building ports subdirectories.
@ -28,7 +28,8 @@
# Creating README.html for package.
#
# afterinstall, all, beforeinstall, build, checksum, clean,
# configure, deinstall, depend, describe, extract, fetch, fetch-list,
# clean-for-cdrom, clean-restricted, configure, deinstall,
# depend, depends, describe, extract, fetch, fetch-list,
# install, package, package-loop, readmes, realinstall, reinstall, tags
#
@ -79,7 +80,8 @@ ${SUBDIR}::
${MAKE} all
.for __target in all fetch fetch-list package package-loop extract configure \
build clean deinstall depend describe distclean \
build clean clean-for-cdrom clean-restricted \
deinstall depend depends describe distclean \
reinstall tags checksum
.if !target(${__target})
${__target}: _SUBDIRUSE