Date: Wed, 21 Feb 2007 00:47:40 -0500 From: Adam Martin <adam@fsl.cs.sunysb.edu> To: freebsd-ports@freebsd.org Subject: Patch to add package-smart target Message-ID: <130A582E-0AAE-4BEB-A00A-C7E485AA1711@fsl.cs.sunysb.edu>
next in thread | raw e-mail | index | archive | help
--Apple-Mail-1-456132600 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hello, I wasn't sure who to send this to, but Benno Rice suggested ports@ and kris@, so I've done both. I've created a patch for a target that I've added to bsd.ports.mk (in /usr/ports/Mk/) a while back, to fix what I consider a "problem" in package-recursive. package-recursive always re-builds a tarball for every package in the dependancy chain, even if said tarball exists. package-smart will skip that step for all tarballs that already exist. (It's not perfect, but I thought somebody should look at it, and see what they can do with it.) The patch is attached. Regards, -- ADAM David Alan Martin --Apple-Mail-1-456132600 Content-Transfer-Encoding: 7bit Content-Type: application/octet-stream; x-unix-mode=0644; name=adam.patch Content-Disposition: attachment; filename=adam.patch --- bsd.port.orig Wed Feb 21 00:37:56 2007 +++ bsd.port.mk Fri Jan 26 19:58:07 2007 @@ -5199,6 +5211,23 @@ (cd $$dir; ${MAKE} package-noinstall); \ done +#Changes to add the package-smart target by ADAM David Alan Martin, +#2006.10.17 +.if exists(${PACKAGES}) +package-smart: package + @for dir in $$(${ALL-DEPENDS-LIST}); do \ + (cd $$dir; ${MAKE} package-smart-dependancy); \ + done + +package-smart-dependancy: + @if [ ! -e ${PKGFILE} ]; then \ + ${MAKE} package-noinstall; \ + else\ + ${ECHO} "Package ${PKGFILE} exists... skipping.";\ + fi;\ + +.endif + --Apple-Mail-1-456132600--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?130A582E-0AAE-4BEB-A00A-C7E485AA1711>