maintainer usability: some targets are usually not invoked recursively,
but they can (sometimes) be useful: add DANGEROUS knob to prevent running them accidentally, but allow people to run makesum/update-plist/update-patches recursively.
This commit is contained in:
parent
c4bd4bab15
commit
5552fa34d2
@ -1,6 +1,6 @@
|
|||||||
#-*- mode: Makefile; tab-width: 4; -*-
|
#-*- mode: Makefile; tab-width: 4; -*-
|
||||||
# ex:ts=4 sw=4 filetype=make:
|
# ex:ts=4 sw=4 filetype=make:
|
||||||
# $OpenBSD: bsd.port.mk,v 1.969 2009/07/15 23:44:36 espie Exp $
|
# $OpenBSD: bsd.port.mk,v 1.970 2009/07/26 12:14:05 espie Exp $
|
||||||
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
|
# $FreeBSD: bsd.port.mk,v 1.264 1996/12/25 02:27:44 imp Exp $
|
||||||
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
|
# $NetBSD: bsd.port.mk,v 1.62 1998/04/09 12:47:02 hubertf Exp $
|
||||||
#
|
#
|
||||||
@ -3071,7 +3071,8 @@ dump-vars:
|
|||||||
.endif
|
.endif
|
||||||
|
|
||||||
_all_phony = ${_recursive_depends_targets} ${_recursive_describe_targets} \
|
_all_phony = ${_recursive_depends_targets} ${_recursive_describe_targets} \
|
||||||
${_recursive_targets} _build-dir-depends _fetch-makefile _fetch-onefile \
|
${_recursive_targets} ${_dangerous_recursive_targets} \
|
||||||
|
_build-dir-depends _fetch-makefile _fetch-onefile \
|
||||||
_internal-all _internal-build _internal-build-depends \
|
_internal-all _internal-build _internal-build-depends \
|
||||||
_internal-buildlib-depends _internal-buildwantlib-depends \
|
_internal-buildlib-depends _internal-buildwantlib-depends \
|
||||||
_internal-checksum _internal-clean _internal-configure _internal-depends \
|
_internal-checksum _internal-clean _internal-configure _internal-depends \
|
||||||
@ -3089,14 +3090,14 @@ _all_phony = ${_recursive_depends_targets} ${_recursive_describe_targets} \
|
|||||||
build-depends build-depends-list checkpatch clean clean-depends \
|
build-depends build-depends-list checkpatch clean clean-depends \
|
||||||
delete-package depends distpatch do-build do-configure do-distpatch \
|
delete-package depends distpatch do-build do-configure do-distpatch \
|
||||||
do-extract do-fetch do-install do-package do-regress fetch-all \
|
do-extract do-fetch do-install do-package do-regress fetch-all \
|
||||||
install-all lib-depends lib-depends-list makesum \
|
install-all lib-depends lib-depends-list \
|
||||||
peek-ftp plist port-lib-depends-check post-build post-configure \
|
peek-ftp port-lib-depends-check post-build post-configure \
|
||||||
post-distpatch post-extract post-fetch post-install post-package \
|
post-distpatch post-extract post-fetch post-install post-package \
|
||||||
post-patch post-regress pre-build pre-configure pre-extract pre-fake \
|
post-patch post-regress pre-build pre-configure pre-extract pre-fake \
|
||||||
pre-fetch pre-install pre-package pre-patch pre-regress \
|
pre-fetch pre-install pre-package pre-patch pre-regress \
|
||||||
print-build-depends print-run-depends readme readmes rebuild \
|
print-build-depends print-run-depends readme readmes rebuild \
|
||||||
regress-depends repackage run-depends run-depends-list show-required-by \
|
regress-depends repackage run-depends run-depends-list show-required-by \
|
||||||
subpackage uninstall update-patches update-plist mirror-maker-fetch \
|
subpackage uninstall mirror-maker-fetch \
|
||||||
lock unlock
|
lock unlock
|
||||||
|
|
||||||
.if defined(_DEBUG_TARGETS)
|
.if defined(_DEBUG_TARGETS)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
#-*- mode: Makefile; tab-width: 4; -*-
|
#-*- mode: Makefile; tab-width: 4; -*-
|
||||||
# ex:ts=4 sw=4 filetype=make:
|
# ex:ts=4 sw=4 filetype=make:
|
||||||
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
|
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
|
||||||
# $OpenBSD: bsd.port.subdir.mk,v 1.91 2009/04/11 14:56:31 espie Exp $
|
# $OpenBSD: bsd.port.subdir.mk,v 1.92 2009/07/26 12:14:05 espie Exp $
|
||||||
# FreeBSD Id: bsd.port.subdir.mk,v 1.20 1997/08/22 11:16:15 asami Exp
|
# FreeBSD Id: bsd.port.subdir.mk,v 1.20 1997/08/22 11:16:15 asami Exp
|
||||||
#
|
#
|
||||||
# The include file <bsd.port.subdir.mk> contains the default targets
|
# The include file <bsd.port.subdir.mk> contains the default targets
|
||||||
@ -124,10 +124,23 @@ _subdir_fragment = \
|
|||||||
_STARTDIR_SEEN=true; \
|
_STARTDIR_SEEN=true; \
|
||||||
done
|
done
|
||||||
|
|
||||||
.for __target in ${_recursive_targets}
|
.if ${DANGEROUS:L} == "yes"
|
||||||
|
. for __target in ${_recursive_targets} ${_dangerous_recursive_targets}
|
||||||
${__target}:
|
${__target}:
|
||||||
@${_subdir_fragment}
|
@${_subdir_fragment}
|
||||||
.endfor
|
. endfor
|
||||||
|
.else
|
||||||
|
. for __target in ${_recursive_targets}
|
||||||
|
${__target}:
|
||||||
|
@${_subdir_fragment}
|
||||||
|
. endfor
|
||||||
|
|
||||||
|
${_dangerous_recursive_targets}:
|
||||||
|
@echo "Target $@ generally invoked in a single port dir"
|
||||||
|
@echo "If you really want to do it recursively"
|
||||||
|
@echo "make $@ DANGEROUS=Yes"
|
||||||
|
@exit 1
|
||||||
|
.endif
|
||||||
|
|
||||||
.for __target in ${_recursive_describe_targets}
|
.for __target in ${_recursive_describe_targets}
|
||||||
${__target}:
|
${__target}:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
# $OpenBSD: pkgpath.mk,v 1.20 2008/07/26 10:59:20 espie Exp $
|
# $OpenBSD: pkgpath.mk,v 1.21 2009/07/26 12:14:05 espie Exp $
|
||||||
# ex:ts=4 sw=4 filetype=make:
|
# ex:ts=4 sw=4 filetype=make:
|
||||||
# pkgpath.mk - 2003 Marc Espie
|
# pkgpath.mk - 2003 Marc Espie
|
||||||
# This file is in the public domain.
|
# This file is in the public domain.
|
||||||
@ -8,6 +8,7 @@
|
|||||||
PORTSDIR_PATH ?= ${PORTSDIR}:${PORTSDIR}/mystuff
|
PORTSDIR_PATH ?= ${PORTSDIR}:${PORTSDIR}/mystuff
|
||||||
TMPDIR ?= /tmp
|
TMPDIR ?= /tmp
|
||||||
READMES_TOP ?= ${PORTSDIR}
|
READMES_TOP ?= ${PORTSDIR}
|
||||||
|
DANGEROUS ?= No
|
||||||
|
|
||||||
|
|
||||||
.if !defined(PKGPATH)
|
.if !defined(PKGPATH)
|
||||||
@ -103,6 +104,9 @@ _recursive_targets = \
|
|||||||
port-lib-depends-check print-package-signature regress reinstall \
|
port-lib-depends-check print-package-signature regress reinstall \
|
||||||
unlink-categories update update-or-install update-or-install-all
|
unlink-categories update update-or-install update-or-install-all
|
||||||
|
|
||||||
|
_dangerous_recursive_targets = \
|
||||||
|
makesum plist update-patches update-plist
|
||||||
|
|
||||||
_recursive_describe_targets = \
|
_recursive_describe_targets = \
|
||||||
describe dump-vars homepage-links print-plist print-plist-all \
|
describe dump-vars homepage-links print-plist print-plist-all \
|
||||||
print-plist-all-with-depends print-plist-contents \
|
print-plist-all-with-depends print-plist-contents \
|
||||||
|
Loading…
Reference in New Issue
Block a user