On Mon, Sep 26, 2005 at 10:58:47PM -0400, Brad Ely wrote:
> The way bsd.port.mk is written makes it fairly easy to implement
> the following for-{all,build,run}-depends target(s) to do ad-hoc
> operations with the ports infrastructure.  Just pass in a statement
> to be executed within the context of the makefile target.
> 
> For example:
> 
> (cd to port dir)
> make for-all-depends='make fetch || true'
> make for-all-depends='make checksum'
> make for-all-depends='make clean=packages'
> 
> make for-all-depends='make show="PKGNAME MULTI_PACKAGES FLAVORS"'
> make for-all-depends='make show="FULLPKGNAME MAINTAINER"' | xargs -L2
> make for-all-depends='make print-package-signature'
> 
> find `make for-all-depends=pwd` ! -path '*CVS*' -type f -mtime -10
> make for-all-depends='printf "%s\t%s\t%s\n" $$dir $$multi $$flavor'
> 
> Any good?
> Brad Ely

Not really. You can use the output of the *-dir-depends inside shell scripts
that would do more or less what you propose.

There's not any real need to add more infrastructure, this is what we
usually do.

e.g.,
make all-dir-depends|tsort|while read i; do cd /usr/ports; SUBDIR=$i make 
show=PKGNAME; done

Reply via email to