pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/mk "rebuild" and "retest" targets were added (by analo...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/02cf721ce5d3
branches:  trunk
changeset: 604248:02cf721ce5d3
user:      cheusov <cheusov%pkgsrc.org@localhost>
date:      Sun May 27 14:32:28 2012 +0000

description:
"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:

 mk/build/build.mk         |  22 +++++++++++++++++++++-
 mk/build/test.mk          |  21 ++++++++++++++++++++-
 mk/package/bsd.package.mk |  12 +++++++++++-
 mk/plist/plist.mk         |  12 +++++++++++-
 4 files changed, 63 insertions(+), 4 deletions(-)

diffs (124 lines):

diff -r 854b8bd9d93d -r 02cf721ce5d3 mk/build/build.mk
--- a/mk/build/build.mk Sun May 27 13:20:40 2012 +0000
+++ b/mk/build/build.mk Sun May 27 14:32:28 2012 +0000
@@ -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 @@
 .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 -r 854b8bd9d93d -r 02cf721ce5d3 mk/build/test.mk
--- a/mk/build/test.mk  Sun May 27 13:20:40 2012 +0000
+++ b/mk/build/test.mk  Sun May 27 14:32:28 2012 +0000
@@ -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 @@
 .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 @@
        ${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 -r 854b8bd9d93d -r 02cf721ce5d3 mk/package/bsd.package.mk
--- a/mk/package/bsd.package.mk Sun May 27 13:20:40 2012 +0000
+++ b/mk/package/bsd.package.mk Sun May 27 14:32:28 2012 +0000
@@ -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 @@
        ${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 -r 854b8bd9d93d -r 02cf721ce5d3 mk/plist/plist.mk
--- a/mk/plist/plist.mk Sun May 27 13:20:40 2012 +0000
+++ b/mk/plist/plist.mk Sun May 27 14:32:28 2012 +0000
@@ -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 @@
        ${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}



Home | Main Index | Thread Index | Old Index