diff options
author | cheusov <cheusov@pkgsrc.org> | 2012-05-27 14:32:28 +0000 |
---|---|---|
committer | cheusov <cheusov@pkgsrc.org> | 2012-05-27 14:32:28 +0000 |
commit | 9422663f92d31f536cb5824b360c71a0878eb038 (patch) | |
tree | 2d5ac1dcc597b56b5a2acf31f3dea1459d4c88bb /mk | |
parent | daf38d8b1f8bd176868e839bd7bfd6bb14b0fee0 (diff) | |
download | pkgsrc-9422663f92d31f536cb5824b360c71a0878eb038.tar.gz |
"rebuild" and "retest" targets were added (by analogy with "reinstall").
rebuild is a special target to re-run the build target.
retest is a special target to re-run the test target.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/build/build.mk | 22 | ||||
-rw-r--r-- | mk/build/test.mk | 21 | ||||
-rw-r--r-- | mk/package/bsd.package.mk | 12 | ||||
-rw-r--r-- | mk/plist/plist.mk | 12 |
4 files changed, 63 insertions, 4 deletions
diff --git a/mk/build/build.mk b/mk/build/build.mk index ce530f8a904..5366b97c3bc 100644 --- a/mk/build/build.mk +++ b/mk/build/build.mk @@ -1,4 +1,4 @@ -# $NetBSD: build.mk,v 1.20 2011/09/08 20:17:15 abs Exp $ +# $NetBSD: build.mk,v 1.21 2012/05/27 14:32:29 cheusov Exp $ # # This file defines what happens in the build phase, excluding the # self-test, which is defined in test.mk. @@ -93,6 +93,26 @@ ${_COOKIE.build}: real-build .endif ###################################################################### +### rebuild (PUBLIC) +###################################################################### +### rebuild is a special target to re-run the build target. +### + +.PHONY: rebuild +rebuild: build-clean + ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} build + +###################################################################### +### build-clean (PRIVATE) +###################################################################### +### build-clean removes the state files for the "build" and +### later phases so that the "build" target may be re-invoked. +### +.PHONY: build-clean +build-clean: install-clean _package-clean + ${RUN} ${RM} -f ${_COOKIE.build} + +###################################################################### ### real-build (PRIVATE) ###################################################################### ### real-build is a helper target onto which one can hook all of the diff --git a/mk/build/test.mk b/mk/build/test.mk index 4855c75bbc3..5263b61b185 100644 --- a/mk/build/test.mk +++ b/mk/build/test.mk @@ -1,4 +1,4 @@ -# $NetBSD: test.mk,v 1.17 2012/05/02 13:44:27 obache Exp $ +# $NetBSD: test.mk,v 1.18 2012/05/27 14:32:29 cheusov Exp $ # # After the "build" phase, many packages provide some sort of self-test # that can be run on the not-yet installed package. To enable these @@ -86,6 +86,15 @@ ${_COOKIE.test}: real-test .endif ###################################################################### +### retest (PUBLIC) +###################################################################### +### retest is a special target to re-run the test target. +### +.PHONY: retest +retest: test-clean + ${RUN} ${RECURSIVE_MAKE} ${MAKEFLAGS} test + +###################################################################### ### real-test (PRIVATE) ###################################################################### ### real-test is a helper target onto which one can hook all of the @@ -164,3 +173,13 @@ test-cookie: ${RUN}${TEST} ! -f ${_COOKIE.test} || ${FALSE} ${RUN}${MKDIR} ${_COOKIE.test:H} ${RUN}${ECHO} ${PKGNAME} > ${_COOKIE.test} + +###################################################################### +### test-clean (PRIVATE) +###################################################################### +### test-clean removes the state files for the "test" and +### later phases so that the "test" target may be re-invoked. +### +.PHONY: test-clean +test-clean: + ${RUN} ${RM} -f ${_COOKIE.test} diff --git a/mk/package/bsd.package.mk b/mk/package/bsd.package.mk index 57b7868cdeb..27a7de50166 100644 --- a/mk/package/bsd.package.mk +++ b/mk/package/bsd.package.mk @@ -1,4 +1,4 @@ -# $NetBSD: bsd.package.mk,v 1.14 2010/03/08 13:51:24 joerg Exp $ +# $NetBSD: bsd.package.mk,v 1.15 2012/05/27 14:32:28 cheusov Exp $ # # This Makefile fragment is included by bsd.pkg.mk and provides all # variables and targets related to binary packages. @@ -40,6 +40,16 @@ package-clean: package-eat-cookie ${RUN} ${RM} -f ${PKGFILE} ###################################################################### +### _package-clean (PRIVATE) +###################################################################### +### _package-clean removes the state files for the "_package-clean" and +### later phases so that the "test" target may be re-invoked. +### +.PHONY: _package-clean +_package-clean: package-eat-cookie plist-clean check-files-clean + ${RUN} ${RM} -rf ${DESTDIR} + +###################################################################### ### package-eat-cookie (PRIVATE) ###################################################################### ### package-eat-cookie removes the state files associated with the "package" diff --git a/mk/plist/plist.mk b/mk/plist/plist.mk index db9a5adf255..ff0417fa580 100644 --- a/mk/plist/plist.mk +++ b/mk/plist/plist.mk @@ -1,4 +1,4 @@ -# $NetBSD: plist.mk,v 1.42 2012/05/13 12:39:47 obache Exp $ +# $NetBSD: plist.mk,v 1.43 2012/05/27 14:32:28 cheusov Exp $ # # This Makefile fragment handles the creation of PLISTs for use by # pkg_create(8). @@ -292,3 +292,13 @@ INFO_FILES_cmd= \ ${PKGSRC_SETENV} ${_PLIST_AWK_ENV} ${AWK} ${_PLIST_INFO_AWK} | \ ${AWK} '($$0 !~ "-[0-9]*(\\.gz)?$$") { print }' .endif + +###################################################################### +### plist-clean (PRIVATE) +###################################################################### +### plist-clean removes the files for the "plist" +### so that the "plist" target may be re-invoked. +### +.PHONY: plist-clean +plist-clean: + ${RUN} ${RM} -f ${PLIST} ${_PLIST_NOKEYWORDS} ${_DEPENDS_PLIST} |