summaryrefslogtreecommitdiff
path: root/Tools
diff options
context:
space:
mode:
authorKris Kennaway <kris@FreeBSD.org>2002-03-11 11:54:40 +0000
committerKris Kennaway <kris@FreeBSD.org>2002-03-11 11:54:40 +0000
commit5826701f06989d4bdee12ea0d1498b430f67e168 (patch)
tree5e782abede133b811723c6f52ed6f05c1810e93a /Tools
parentSet all of the <bsd.port.mk> control variables to be used in port/package (diff)
Clean up index generation:
* Don't assume the script will be called from the ports directory * Use buildenv to set environment variables * Set LOCALBASE and X11BASE to dummy variables to prevent the ports tree from picking up packages installed on the host system, and patch up the generated index at the end
Notes
Notes: svn path=/head/; revision=55859
Diffstat (limited to 'Tools')
-rwxr-xr-xTools/portbuild/scripts/makeindex55
1 files changed, 26 insertions, 29 deletions
diff --git a/Tools/portbuild/scripts/makeindex b/Tools/portbuild/scripts/makeindex
index 75215bd623cd..8dffc420b0e1 100755
--- a/Tools/portbuild/scripts/makeindex
+++ b/Tools/portbuild/scripts/makeindex
@@ -1,60 +1,57 @@
#!/bin/sh
# usage: $0 branch
-#### -j# to make index
-###INDEXJOBS=1
+# -j# to make index
+# XXX corrupts index file because of lack of synchronization?
+#INDEXJOBS=1
+
+pb=/var/portbuild
+. ${pb}/portbuild.conf
+
+. ${pb}/scripts/buildenv
usage () {
echo "usage: makeindex branch"
exit 1
}
+
if [ $# != 1 ]; then
usage
fi
+
case "x$1" in
x4)
branch=4
- export PORTOBJFORMAT=elf
- export OSREL=4.5
- export OSVERSION=450000
;;
x4-exp)
branch=4-exp
- export PORTOBJFORMAT=elf
- export OSREL=4.5
- export OSVERSION=450000
;;
x5)
branch=5
- export PORTOBJFORMAT=elf
- export OSREL=5.0
- export OSVERSION=500027
;;
*)
usage
;;
esac
-export PORTSDIR=$(pwd)
+# Set up the build env variables
+buildenv $branch
-if [ "x$NODUMMY" = "x" ]; then
- unset XFREE86_VERSION
- unset MOTIF_OPEN
-else
- export XFREE86_VERSION=4
- export MOTIF_OPEN=t
-fi
+#if [ "x$NODUMMY" = "x" ]; then
+# unset XFREE86_VERSION
+# unset MOTIF_OPEN
+#fi
unset DISPLAY
-export BATCH=t
-export HAVE_MOTIF=t
-export PACKAGE_BUILDING=t
-export PARALLEL_PACKAGE_BUILD=t
-export SRCBASE=/var/portbuild/${branch}/src
-#export NO_RESTRICTED=t
-#export FOR_CDROM=t
-#export INDEX_NOSORT=t
+
+# Don't pick up installed packages from the host
+export LOCALBASE=/nonexistentlocal
+export X11BASE=/nonexistentx
+
+cd ${PORTSDIR}
make index
-# remove extra spaces in dependency list -- this could cause problems
-sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' INDEX > INDEX.tmp
+# remove extra spaces in dependency list -- this causes problems
+# Also transform the dummy paths to their canonical locations
+sed -e 's/ */ /g' -e 's/| */|/g' -e 's/ *|/|/g' -e "s,${LOCALBASE},/usr/local," -e "s,${X11BASE},/usr/X11R6," INDEX > INDEX.tmp
+
mv -f INDEX.tmp INDEX