reorganize to avoid repeating lists of targets:
classify stuff that is used in bsd.port.subdir.mk, name them in pkgpath.mk, and use them as .PHONY targets in both bsd.port.mk and bsd.port.subdir.mk.
This commit is contained in:
parent
d2fbe0a110
commit
1196a0d7f3
@ -1,6 +1,6 @@
|
||||
#-*- mode: Makefile; tab-width: 4; -*-
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
# $OpenBSD: bsd.port.mk,v 1.900 2007/06/03 11:06:41 espie Exp $
|
||||
# $OpenBSD: bsd.port.mk,v 1.901 2007/06/03 12:51:59 espie 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 $
|
||||
#
|
||||
@ -2899,58 +2899,31 @@ dump-vars:
|
||||
.endif
|
||||
|
||||
.PHONY: \
|
||||
_build-dir-depends _fetch-makefile _fetch-onefile \
|
||||
_print-packagename \
|
||||
_recurse-all-dir-depends \
|
||||
_recurse-run-dir-depends _refetch \
|
||||
addsum _print-package-args \
|
||||
all all-dir-depends build \
|
||||
build-depends build-depends-list build-dir-depends \
|
||||
checkpatch checksum clean \
|
||||
clean-depends configure deinstall \
|
||||
delete-package \
|
||||
depends \
|
||||
describe distclean distpatch \
|
||||
do-build do-configure do-distpatch \
|
||||
do-extract do-fetch do-install \
|
||||
do-package do-regress extract \
|
||||
fake fetch fetch-all \
|
||||
fetch-makefile full-all-depends full-build-depends \
|
||||
full-run-depends homepage-links install \
|
||||
lib-depends lib-depends-check lib-depends-list \
|
||||
link-categories makesum manpages-check \
|
||||
package patch \
|
||||
plist post-build post-configure \
|
||||
post-distpatch post-extract post-fetch \
|
||||
post-install post-package post-patch \
|
||||
post-regress pre-build pre-configure \
|
||||
pre-extract pre-fake pre-fetch \
|
||||
pre-install pre-package pre-patch \
|
||||
pre-regress print-build-depends print-package-signature \
|
||||
print-run-depends \
|
||||
readmes readme rebuild \
|
||||
regress regress-depends \
|
||||
reinstall repackage run-depends \
|
||||
run-depends-list run-dir-depends show verbose-show dump-vars \
|
||||
uninstall unlink-categories update-patches \
|
||||
update-plist port-lib-depends-check \
|
||||
license-check _license-check \
|
||||
_internal-extract _internal-distpatch _internal-configure \
|
||||
_internal-build _internal-all _internal_install _internal-fake \
|
||||
_internal-package _internal-package-only \
|
||||
_internal-fetch _internal-checksum \
|
||||
_internal-depends _internal-lib-depends _internal-buildwantlib-depends \
|
||||
_internal-runwantlib-depends \
|
||||
_internal-buildlib-depends _internal_runlib-depends \
|
||||
_internal-build-depends \
|
||||
_internal-run-depends _internal-regress-depends \
|
||||
_internal-regress _internal-clean \
|
||||
_internal-manpages-check _internal-plist _internal-update-plist \
|
||||
_internal-update update print-plist print-plist-contents \
|
||||
_list-port-libs _print-package-signature-lib _print-package-signature-run \
|
||||
show-required-by peek-ftp _internal-subpackage \
|
||||
_internal-install-all install-all \
|
||||
subpackage _internal-subupdate _internal-update \
|
||||
regress-dir-depends _recurse-regress-dir-depends \
|
||||
full-regress-depends print-plist-all \
|
||||
print-plist-with-depends print-plist-all-with-depends
|
||||
${_recursive_targets} ${_recursive_describe_targets} \
|
||||
${_recursive_depends_targets} \
|
||||
_build-dir-depends _fetch-makefile _fetch-onefile _internal-all \
|
||||
_internal-build _internal-build-depends _internal-buildlib-depends \
|
||||
_internal-buildwantlib-depends _internal-checksum _internal-clean \
|
||||
_internal-configure _internal-depends _internal-distpatch \
|
||||
_internal-extract _internal-fake _internal-fetch _internal-install-all \
|
||||
_internal-lib-depends _internal-manpages-check _internal-package \
|
||||
_internal-package-only _internal-plist _internal-regress \
|
||||
_internal-regress-depends _internal-run-depends \
|
||||
_internal-runwantlib-depends _internal-subpackage _internal-subupdate \
|
||||
_internal-update _internal-update _internal-update-plist \
|
||||
_internal_install _internal_runlib-depends _license-check \
|
||||
_list-port-libs _print-package-args _print-package-signature-lib \
|
||||
_print-package-signature-run _print-packagename _recurse-all-dir-depends \
|
||||
_recurse-regress-dir-depends _recurse-run-dir-depends _refetch addsum \
|
||||
build-depends build-depends-list checkpatch clean clean-depends \
|
||||
delete-package depends distpatch do-build do-configure do-distpatch \
|
||||
do-extract do-fetch do-install do-package do-regress fetch-all \
|
||||
full-all-depends full-build-depends full-regress-depends \
|
||||
full-run-depends install-all lib-depends lib-depends-list makesum \
|
||||
peek-ftp plist port-lib-depends-check post-build post-configure \
|
||||
post-distpatch post-extract post-fetch post-install post-package \
|
||||
post-patch post-regress pre-build pre-configure pre-extract pre-fake \
|
||||
pre-fetch pre-install pre-package pre-patch pre-regress \
|
||||
print-build-depends print-run-depends readme readmes rebuild \
|
||||
regress-depends repackage run-depends run-depends-list show-required-by \
|
||||
subpackage uninstall update-patches update-plist
|
||||
|
@ -1,7 +1,7 @@
|
||||
#-*- mode: Makefile; tab-width: 4; -*-
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
|
||||
# $OpenBSD: bsd.port.subdir.mk,v 1.84 2007/04/28 10:19:41 espie Exp $
|
||||
# $OpenBSD: bsd.port.subdir.mk,v 1.85 2007/06/03 12:51:59 espie 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
|
||||
@ -115,25 +115,20 @@ _subdir_fragment = \
|
||||
_STARTDIR_SEEN=true; \
|
||||
done
|
||||
|
||||
.for __target in all fetch package fake extract patch configure \
|
||||
build distclean deinstall install update \
|
||||
reinstall checksum fetch-makefile \
|
||||
link-categories unlink-categories regress lib-depends-check \
|
||||
newlib-depends-check manpages-check license-check \
|
||||
print-package-signature
|
||||
.for __target in ${_recursive_targets}
|
||||
|
||||
${__target}:
|
||||
@${_subdir_fragment}
|
||||
.endfor
|
||||
|
||||
.for __target in describe show verbose-show dump-vars \
|
||||
.for __target in ${_recursive_describe_targets}
|
||||
homepage-links print-plist print-plist-contents \
|
||||
print-plist-all print-plist-with-depends print-plist-all-with-depends
|
||||
${__target}:
|
||||
@DESCRIBE_TARGET=Yes; export DESCRIBE_TARGET; ${_subdir_fragment}
|
||||
.endfor
|
||||
|
||||
.for __target in all-dir-depends build-dir-depends run-dir-depends regress-dir-depends
|
||||
.for __target in ${_recursive_depends_targets}
|
||||
|
||||
${__target}:
|
||||
@${_depfile_fragment}; echo_msg=:; ${_subdir_fragment}
|
||||
@ -181,11 +176,5 @@ ${READMES_TOP}/${PKGPATH}/README.html:
|
||||
${README} > $@
|
||||
@rm ${TMPDIR}/subdirs
|
||||
|
||||
.PHONY: all fetch package fake extract configure \
|
||||
build describe distclean deinstall install update \
|
||||
reinstall checksum show verbose-show dump-vars fetch-makefile \
|
||||
link-categories unlink-categories regress lib-depends-check \
|
||||
newlib-depends-check \
|
||||
homepage-links manpages-check license-check \
|
||||
all-dir-depends build-dir-depends run-dir-depends regress-dir-depends \
|
||||
clean readmes print-package-signature
|
||||
.PHONY: ${_recursive_targets} ${_recursive_describe_targets} \
|
||||
${_recursive_depends_targets} clean readmes
|
||||
|
@ -1,4 +1,4 @@
|
||||
# $OpenBSD: pkgpath.mk,v 1.12 2006/12/26 15:00:24 espie Exp $
|
||||
# $OpenBSD: pkgpath.mk,v 1.13 2007/06/03 12:51:59 espie Exp $
|
||||
# ex:ts=4 sw=4 filetype=make:
|
||||
# pkgpath.mk - 2003 Marc Espie
|
||||
# This file is in the public domain.
|
||||
@ -90,3 +90,17 @@ REPORT_PROBLEM ?= echo "$$subdir ($@)">>${REPORT_PROBLEM_LOGFILE}
|
||||
REPORT_PROBLEM ?= exit 1
|
||||
.endif
|
||||
|
||||
_recursive_targets = \
|
||||
all build checksum configure deinstall distclean extract fake fetch \
|
||||
fetch-makefile install lib-depends-check license-check link-categories \
|
||||
manpages-check package patch print-package-signature regress reinstall \
|
||||
unlink-categories update
|
||||
|
||||
_recursive_describe_targets = \
|
||||
describe dump-vars homepage-links print-plist print-plist-all \
|
||||
print-plist-all-with-depends print-plist-contents \
|
||||
print-plist-with-depends show verbose-show
|
||||
|
||||
_recursive_depends_targets = \
|
||||
all-dir-depends build-dir-depends regress-dir-depends run-dir-depends
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user