pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk/bulk Add a new definition, _PRESERVE_WRKDIR, which ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/68dfb1648228
branches:  trunk
changeset: 467208:68dfb1648228
user:      agc <agc%pkgsrc.org@localhost>
date:      Mon Jan 26 21:24:41 2004 +0000

description:
Add a new definition, _PRESERVE_WRKDIR, which defaults to "no". This
definition is not intended to be set by the user, and so has a leading
'_', and is undocumented.

If set to "yes", then a "make clean" of the package will not be done,
thereby preserving the working directory.  This is useful for
debugging problems in bulk builds.

diffstat:

 mk/bulk/bsd.bulk-pkg.mk |  25 +++++++++++++++----------
 1 files changed, 15 insertions(+), 10 deletions(-)

diffs (46 lines):

diff -r eee80d726a96 -r 68dfb1648228 mk/bulk/bsd.bulk-pkg.mk
--- a/mk/bulk/bsd.bulk-pkg.mk   Mon Jan 26 21:10:31 2004 +0000
+++ b/mk/bulk/bsd.bulk-pkg.mk   Mon Jan 26 21:24:41 2004 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.bulk-pkg.mk,v 1.55 2004/01/26 21:10:32 heinz Exp $
+#      $NetBSD: bsd.bulk-pkg.mk,v 1.56 2004/01/26 21:24:41 agc Exp $
 
 #
 # Copyright (c) 1999, 2000 Hubert Feyrer <hubertf%netbsd.org@localhost>
@@ -111,6 +111,8 @@
 # and also for xpkgwedge.  Add pkgtools/xpkgwedge in /etc/mk.conf to do an xpkgwedged bulk build.
 BULK_PREREQ+=          pkgtools/digest
 
+# by default, clean up any broken packages
+_PRESERVE_WRKDIR?=     no
 
 # build the cache files used as part of a full bulk build
 # Note:  we have to install the BULK_PREREQ packages _before_
@@ -351,15 +353,18 @@
                        ${ECHO_MSG} " $$nerrors ${PKGPATH}/${BROKENFILE} $$nbrokenby " >> ${_PKGSRCDIR}/${BROKENFILE} \
                        ) 2>&1 | ${TEE} -a ${BROKENFILE}; \
                fi ; \
-               ${ECHO_MSG} "BULK> Cleaning packages and its depends" ;\
-               if [ "${USE_BULK_CACHE}" = "yes" ]; then \
-                       for pkgdir in ${PKGPATH} `${GREP} "^${PKGPATH} " ${DEPENDSFILE} | ${SED} -e 's;^.*:;;g'`; do \
-                               ${DO}       (cd ${_PKGSRCDIR}/$$pkgdir && ${MAKE} clean) ; \
-                       done ;\
-               else \
-                       ${ECHO_MSG} ${MAKE} clean CLEANDEPENDS=YES;\
-                       ${DO} ${MAKE} clean CLEANDEPENDS=YES;\
-               fi ;\
+               case ${_PRESERVE_WRKDIR} in                             \
+               yes|YES)        ;;                                      \
+               *)      ${ECHO_MSG} "BULK> Cleaning packages and its depends"; \
+                       if [ "${USE_BULK_CACHE}" = "yes" ]; then        \
+                               for pkgdir in ${PKGPATH} `${GREP} "^${PKGPATH} " ${DEPENDSFILE} | ${SED} -e 's;^.*:;;g'`; do \
+                                       ${DO}       (cd ${_PKGSRCDIR}/$$pkgdir && ${MAKE} clean) ; \
+                               done;                                   \
+                       else                                            \
+                               ${ECHO_MSG} ${MAKE} clean CLEANDEPENDS=YES;\
+                               ${DO} ${MAKE} clean CLEANDEPENDS=YES;   \
+                       fi ;;                                           \
+               esac;                                                   \
        fi
        @if [ ! -f ${PKGFILE} ]; then \
                ${ECHO_MSG} "BULK> Build for ${PKGNAME} was not successful, aborting." | ${TEE} -a ${BROKENFILE} ; \



Home | Main Index | Thread Index | Old Index