diff options
author | Kris Kennaway <kris@FreeBSD.org> | 2003-01-24 04:43:42 +0000 |
---|---|---|
committer | Kris Kennaway <kris@FreeBSD.org> | 2003-01-24 04:43:42 +0000 |
commit | 90bdd0d6439dc4906503defd4f4ba234a08a9a81 (patch) | |
tree | de710c885f8cc7562ed9a4e152c07c0a864ff588 /Tools | |
parent | Correct the definition of RUBY_PORT when RUBY_DEFAULT_VER=1.8 and (diff) |
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.
Notes
Notes:
svn path=/head/; revision=73908
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} + + |