summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authordmcmahill <dmcmahill>2000-12-29 15:56:26 +0000
committerdmcmahill <dmcmahill>2000-12-29 15:56:26 +0000
commita50ddc48f25d78c4006226494a9205125c8ac622 (patch)
treea663b04026b48e8790f5075cd0f01be8833cd451 /mk
parentff2d69c8e0a31c260e868b1558d5bc1b905b892a (diff)
downloadpkgsrc-a50ddc48f25d78c4006226494a9205125c8ac622.tar.gz
add hostname and pid to the temp makefile name to avoid conflicts when
pkgsrc is shared via nfs where multiple machines may want to run the script at the same time. Also avoid conflicts if multiple copies are run on the same machine at once.
Diffstat (limited to 'mk')
-rw-r--r--mk/bulk/printdepends10
1 files changed, 5 insertions, 5 deletions
diff --git a/mk/bulk/printdepends b/mk/bulk/printdepends
index 6396e0316b7..82141c69bae 100644
--- a/mk/bulk/printdepends
+++ b/mk/bulk/printdepends
@@ -1,5 +1,5 @@
#!/bin/sh
-# $NetBSD: printdepends,v 1.3 2000/11/18 07:30:25 hubertf Exp $
+# $NetBSD: printdepends,v 1.4 2000/12/29 15:56:26 dmcmahill Exp $
#
# Print list of pkg dependencies suitable for tsort(1).
# Start in /usr/pkgsrc.
@@ -17,10 +17,10 @@ cwd=$PWD
#list=x11/gnome
#list='x11/xteddy x11/xsnow'
-
+mf=$cwd/.m.`hostname`.$$
# Makefile to print the DEPENDS' and BUILD_DEPENDS' directory parts
# bsd.pkg.mk is pulled in via the Makefile
-cat >$cwd/.m <<EOF
+cat >$mf <<EOF
bla:
@echo \${DEPENDS:C/^[^:]*://:C/:.*$//} \${BUILD_DEPENDS:C/^[^:]*://:C/:.*$//}
.include "Makefile"
@@ -31,7 +31,7 @@ for pkgdir in $list
do
cd $pkgdir
- l=`make -f - <$cwd/.m bla` # XXX NOT -f $cwd/.m !
+ l=`make -f - <$mf bla` # XXX NOT -f $mf !
if [ "$l" = "" ]; then
# No dependencies
echo "$pkgdir $pkgdir"
@@ -48,4 +48,4 @@ do
cd $cwd
done
-rm -f $cwd/.m
+rm -f $mf