diff options
author | kris <kris@FreeBSD.org> | 2003-01-24 12:43:42 +0800 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2003-01-24 12:43:42 +0800 |
commit | ee7bf69a143609d00840f3023cd27689bddd099c (patch) | |
tree | 49097f5dd48af36998edce336a1408c46f45dc44 /Tools | |
parent | 9369940d9d2882826fee433705dba34e7d05b01f (diff) | |
download | freebsd-ports-gnome-ee7bf69a143609d00840f3023cd27689bddd099c.tar.gz freebsd-ports-gnome-ee7bf69a143609d00840f3023cd27689bddd099c.tar.zst freebsd-ports-gnome-ee7bf69a143609d00840f3023cd27689bddd099c.zip |
Add makeparallel script, an improved version of the 'parallel' target
in ports/Makefile. It uses the buildenv framework to obtain the correct
PKGSUFFIX and INDEXFILE variables.
Diffstat (limited to 'Tools')
-rwxr-xr-x | Tools/portbuild/scripts/makeparallel | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Tools/portbuild/scripts/makeparallel b/Tools/portbuild/scripts/makeparallel new file mode 100755 index 000000000000..a454cb95bf63 --- /dev/null +++ b/Tools/portbuild/scripts/makeparallel @@ -0,0 +1,30 @@ +#!/bin/sh + +pb=/var/portbuild + +if [ $# -ne 2 ]; then + echo "usage: makeparallel arch branch" + exit 1 +fi + +arch=$1 +branch=$2 + +. ${pb}/${arch}/portbuild.conf +. ${pb}/scripts/buildenv + +buildenv ${pb} ${arch} ${branch} + +cd ${PORTSDIR} +subdir=$(make -V SUBDIR) +makefile=${pb}/${arch}/${branch}/Makefile +sufx=${PKGSUFFIX} + +rm ${makefile} + +for dir in ${subdir}; do + echo "all: ${dir}-all" >> ${makefile} +done + awk -F '|' "{me=\$1; here=\$2; bdep=\$8; rdep=\$9; split(here, tmp, \"/\"); if (bdep != \"\") { gsub(\"\$\", \"${sufx}\", bdep); gsub(\" \", \"${sufx} \", bdep); } if (rdep != \"\") { gsub(\"\$\", \"${sufx}\", rdep); gsub(\" \", \"${sufx} \", rdep); } print tmp[4] \"-all: \" me \"${sufx}\"; print me \": \" me \"${sufx}\"; print me \"${sufx}: \" bdep \" \" rdep; printf(\"\t@/var/portbuild/scripts/pdispatch ${arch} ${branch} /var/portbuild/scripts/portbuild %s${sufx} %s\",me, here); if (bdep != \"\") printf(\" %s\", bdep); if (rdep != \"\") printf(\" %s\", rdep);printf(\"\n\")}" < ${PORTSDIR}/${INDEXFILE} >> ${makefile} + + |