pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Move more "patch"-related variables and targets out...
details: https://anonhg.NetBSD.org/pkgsrc/rev/c30fe33d4cb9
branches: trunk
changeset: 506602:c30fe33d4cb9
user: jlam <jlam%pkgsrc.org@localhost>
date: Thu Jan 19 20:32:17 2006 +0000
description:
Move more "patch"-related variables and targets out of bsd.pkg.mk and into
bsd.pkg.patch.mk.
diffstat:
mk/bsd.pkg.mk | 32 +++++---------------------
mk/bsd.pkg.patch.mk | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 68 insertions(+), 27 deletions(-)
diffs (194 lines):
diff -r 32f4e397aa71 -r c30fe33d4cb9 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Thu Jan 19 20:25:07 2006 +0000
+++ b/mk/bsd.pkg.mk Thu Jan 19 20:32:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1793 2006/01/19 19:35:25 jlam Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1794 2006/01/19 20:32:17 jlam Exp $
#
# This file is in the public domain.
#
@@ -391,7 +391,6 @@
_TOOLS_COOKIE= ${WRKDIR}/.tools_done
_WRAPPER_COOKIE= ${WRKDIR}/.wrapper_done
-_PATCH_COOKIE= ${WRKDIR}/.patch_done
_CONFIGURE_COOKIE= ${WRKDIR}/.configure_done
_BUILD_COOKIE= ${WRKDIR}/.build_done
_TEST_COOKIE= ${WRKDIR}/.test_done
@@ -2453,11 +2452,9 @@
.endif
.endif # !_USE_PLIST_MODULE
-.PHONY: acquire-patch-lock acquire-tools-lock
+.PHONY: acquire-tools-lock
.PHONY: acquire-wrapper-lock acquire-configure-lock acquire-build-lock
.PHONY: acquire-install-lock acquire-package-lock
-acquire-patch-lock:
- ${_ACQUIRE_LOCK}
acquire-tools-lock:
${_ACQUIRE_LOCK}
acquire-wrapper-lock:
@@ -2471,11 +2468,9 @@
acquire-package-lock:
${_ACQUIRE_LOCK}
-.PHONY: release-patch-lock release-tools-lock
+.PHONY: release-tools-lock
.PHONY: release-wrapper-lock release-configure-lock release-build-lock
.PHONY: release-install-lock release-package-lock
-release-patch-lock:
- ${_RELEASE_LOCK}
release-tools-lock:
${_RELEASE_LOCK}
release-wrapper-lock:
@@ -2504,11 +2499,6 @@
@cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-fetch PKG_PHASE=fetch
.endif
-.PHONY: patch
-.if !target(patch)
-patch: extract acquire-patch-lock ${_PATCH_COOKIE} release-patch-lock
-.endif
-
.PHONY: tools
.if !target(tools)
tools: patch acquire-tools-lock ${_TOOLS_COOKIE} release-tools-lock
@@ -2554,9 +2544,6 @@
undo-replace: real-undo-replace
.endif
-${_PATCH_COOKIE}:
- ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-patch PKG_PHASE=patch
-
${_TOOLS_COOKIE}:
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-tools PKG_PHASE=tools
@@ -2633,10 +2620,8 @@
${_PACKAGE_COOKIE}:
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${SETENV} ${BUILD_ENV} ${MAKE} ${MAKEFLAGS} real-package PKG_PHASE=package
-.PHONY: patch-message tools-message wrapper-message
+.PHONY: tools-message wrapper-message
.PHONY: configure-message build-message test-message
-patch-message:
- @${ECHO_MSG} "${_PKGSRC_IN}> Patching for ${PKGNAME}"
tools-message:
@${ECHO_MSG} "${_PKGSRC_IN}> Overriding tools for ${PKGNAME}"
wrapper-message:
@@ -2648,10 +2633,8 @@
test-message:
@${ECHO_MSG} "${_PKGSRC_IN}> Testing for ${PKGNAME}"
-.PHONY: patch-cookie tools-cookie wrapper-cookie
+.PHONY: tools-cookie wrapper-cookie
.PHONY: configure-cookie build-cookie test-cookie
-patch-cookie:
- ${_PKG_SILENT}${_PKG_DEBUG}${_GENERATE_PATCH_COOKIE}
tools-cookie:
${_PKG_SILENT}${_PKG_DEBUG} ${TOUCH} ${TOUCH_FLAGS} ${_TOOLS_COOKIE}
wrapper-cookie:
@@ -2673,12 +2656,11 @@
# Please note that the order of the following targets is important, and
# should not be modified (.ORDER is not recognised by make(1) in a serial
# make i.e. without -j n)
-.PHONY: real-fetch real-patch
+.PHONY: real-fetch
.PHONY: real-tools real-wrapper
.PHONY: real-configure real-build real-test real-install real-package
.PHONY: real-replace real-undo-replace
real-fetch: pre-fetch do-fetch post-fetch
-real-patch: patch-message patch-vars pre-patch do-patch post-patch patch-cookie
real-tools: tools-message tools-vars pre-tools do-tools post-tools tools-cookie
real-wrapper: wrapper-message wrapper-vars pre-wrapper do-wrapper post-wrapper wrapper-cookie
real-configure: configure-message configure-vars pre-configure pre-configure-override do-configure post-configure configure-cookie
@@ -2756,7 +2738,7 @@
# Empty pre-* and post-* targets
-.for name in fetch patch tools wrapper configure build test install-script install package
+.for name in fetch tools wrapper configure build test install-script install package
. if !target(pre-${name})
pre-${name}:
diff -r 32f4e397aa71 -r c30fe33d4cb9 mk/bsd.pkg.patch.mk
--- a/mk/bsd.pkg.patch.mk Thu Jan 19 20:25:07 2006 +0000
+++ b/mk/bsd.pkg.patch.mk Thu Jan 19 20:32:17 2006 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.patch.mk,v 1.20 2005/09/28 10:09:33 rillig Exp $
+# $NetBSD: bsd.pkg.patch.mk,v 1.21 2006/01/19 20:32:17 jlam Exp $
#
# This Makefile fragment is included by bsd.pkg.mk and defines the
# relevant variables and targets for the "patch" phase.
@@ -56,8 +56,15 @@
#
# The following targets are defined by bsd.pkg.patch.mk:
#
+# patch is the target that is invoked by the user to perform the
+# "patch" action.
+#
# do-patch is the target that causes the actual patching of the
-# extracted sources to occur during the "patch" phase.
+# extracted sources to occur during the "patch" phase. This
+# target may be overridden in a package Makefile.
+#
+# {pre,post}-patch are the targets that are invoked before and after
+# do-patch, and may be overridden in a package Makefile.
#
.if (defined(PATCHFILES) && !empty(PATCHFILES)) || \
@@ -271,3 +278,55 @@
${_PKGSRC_PATCH_FAIL}; \
fi
.endif
+
+_PATCH_COOKIE= ${WRKDIR}/.patch_done
+
+_PATCH_TARGETS+= extract
+_PATCH_TARGETS+= acquire-patch-lock
+_PATCH_TARGETS+= ${_PATCH_COOKIE}
+_PATCH_TARGETS+= release-patch-lock
+
+.ORDER: ${_PATCH_TARGETS}
+
+.PHONY: patch
+patch: ${_PATCH_TARGETS}
+
+.PHONY: acquire-patch-lock release-patch-lock
+acquire-patch-lock:
+ ${_ACQUIRE_LOCK}
+release-patch-lock:
+ ${_RELEASE_LOCK}
+
+${_PATCH_COOKIE}:
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-patch PKG_PHASE=patch
+
+_REAL_PATCH_TARGETS+= patch-message
+_REAL_PATCH_TARGETS+= patch-vars
+_REAL_PATCH_TARGETS+= pre-patch
+_REAL_PATCH_TARGETS+= do-patch
+_REAL_PATCH_TARGETS+= post-patch
+_REAL_PATCH_TARGETS+= patch-cookie
+
+.ORDER: ${_REAL_PATCH_TARGETS}
+
+.PHONY: patch-message
+patch-message:
+ @${ECHO_MSG} "${_PKGSRC_IN}> Patching for ${PKGNAME}"
+
+.PHONY: patch-cookie
+patch-cookie:
+ ${_PKG_SILENT}${_PKG_DEBUG}${_GENERATE_PATCH_COOKIE}
+
+.PHONY: real-patch
+
+real-patch: ${_REAL_PATCH_TARGETS}
+
+.PHONY: pre-patch post-patch
+.if !target(pre-patch)
+pre-patch:
+ @${DO_NADA}
+.endif
+.if !target(post-patch)
+post-patch:
+ @${DO_NADA}
+.endif
Home |
Main Index |
Thread Index |
Old Index