summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-01-15 20:55:38 +0000
committerjlam <jlam@pkgsrc.org>2003-01-15 20:55:38 +0000
commit63029a767b2258c5e70f71a95766fd682b45ff11 (patch)
tree67586206e121ed2b712b9edffb53000a2d7e5b20 /mk
parent33b8582279da9a692062efb4cd2ac5b871425c0b (diff)
downloadpkgsrc-63029a767b2258c5e70f71a95766fd682b45ff11.tar.gz
Make BUILD_DIR always point to a physical path by invoking /bin/pwd instead
of relying on the shell's builtin pwd. This makes BUILD_DIR consistently point to the correct directory regardless of the definition of SHELL. This fixes elusive some buildlink2 errors due to the fact that BUILDLINK_DIR is derived from BUILD_DIR and some paths were incorrectly being translated.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk14
-rw-r--r--mk/bsd.pkg.subdir.mk4
-rw-r--r--mk/bsd.prefs.mk6
-rw-r--r--mk/defs.Darwin.mk3
-rw-r--r--mk/defs.FreeBSD.mk3
-rw-r--r--mk/defs.IRIX.mk3
-rw-r--r--mk/defs.Linux.mk3
-rw-r--r--mk/defs.NetBSD.mk3
-rw-r--r--mk/defs.OpenBSD.mk3
-rw-r--r--mk/defs.SunOS.mk3
10 files changed, 26 insertions, 19 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index ee9aac11a5b..548b1e20397 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1128 2003/01/10 19:17:52 jmmv Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1129 2003/01/15 20:55:38 jlam Exp $
#
# This file is in the public domain.
#
@@ -1310,12 +1310,12 @@ do-fetch:
show-depends-dirs:
${_PKG_SILENT}${_PKG_DEBUG} \
dlist=""; \
- thisdir=`pwd`; \
+ thisdir=`${PWD_CMD}`; \
for reldir in "" ${DEPENDS:C/^[^:]*://:C/:.*$//} ${BUILD_DEPENDS:C/^[^:]*://:C/:.*$//} ;\
do \
if [ "X$$reldir" = "X" ]; then continue; fi; \
cd $$thisdir/$$reldir; \
- WD=`pwd`; \
+ WD=`${PWD_CMD}`; \
d=`dirname $$WD`; \
absdir=`basename $$d`/`basename $$WD`; \
dlist="$$dlist $$absdir"; \
@@ -1350,7 +1350,7 @@ _RECURSE_DEPENDS_DIRS= \
} \
} \
BEGIN { \
- command = "pwd"; \
+ command = "${PWD_CMD}"; \
command | getline start_dir; \
close(command); \
i = split(start_dir, tmp_r, /\//); \
@@ -3040,7 +3040,7 @@ fetch-list:
@${ECHO} '#!/bin/sh'
@${ECHO} '#'
@${ECHO} '# This is an auto-generated script, the result of running'
- @${ECHO} '# `${MAKE} fetch-list'"'"' in directory "'"`pwd`"'"'
+ @${ECHO} '# `${MAKE} fetch-list'"'"' in directory "'"`${PWD_CMD}`"'"'
@${ECHO} '# on host "'"`${UNAME} -n`"'" on "'"`date`"'".'
@${ECHO} '#'
@${MAKE} ${MAKEFLAGS} fetch-list-recursive
@@ -3073,7 +3073,7 @@ fetch-list-one-pkg:
. if !empty(_ALLFILES)
@${ECHO}
@${ECHO} '#'
- @location=`pwd | ${AWK} -F / '{ print $$(NF-1) "/" $$NF }'`; \
+ @location=`${PWD_CMD} | ${AWK} -F / '{ print $$(NF-1) "/" $$NF }'`; \
${ECHO} '# Need additional files for ${PKGNAME} ('$$location')...'
@${ECHO} '#'
@${MKDIR} ${_DISTDIR}
@@ -3632,7 +3632,7 @@ README.html: .PRECIOUS
@${ENV} AWK=${AWK} BMAKE=${MAKE} ../../mk/scripts/mkdatabase -f $@.tmp1
@if [ -e ${PACKAGES} ]; then \
cd ${PACKAGES}; \
- case `pwd` in \
+ case `${PWD_CMD}` in \
${_PKGSRCDIR}/packages) \
MULTIARCH=no; \
;; \
diff --git a/mk/bsd.pkg.subdir.mk b/mk/bsd.pkg.subdir.mk
index 319e3e047b0..fcc09d29c95 100644
--- a/mk/bsd.pkg.subdir.mk
+++ b/mk/bsd.pkg.subdir.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.subdir.mk,v 1.50 2003/01/05 13:37:16 dmcmahill Exp $
+# $NetBSD: bsd.pkg.subdir.mk,v 1.51 2003/01/15 20:55:39 jlam Exp $
# Derived from: FreeBSD Id: bsd.port.subdir.mk,v 1.19 1997/03/09 23:10:56 wosch Exp
# from: @(#)bsd.subdir.mk 5.9 (Berkeley) 2/1/91
#
@@ -212,7 +212,7 @@ fetch-list:
@${ECHO} '#!/bin/sh'
@${ECHO} '#'
@${ECHO} '# This is an auto-generated script, the result of running'
- @${ECHO} '# `make fetch-list'"'"' in directory "'"`pwd`"'"'
+ @${ECHO} '# `make fetch-list'"'"' in directory "'"`${PWD_CMD}`"'"'
@${ECHO} '# on host "'"`${UNAME} -n`"'" on "'"`date`"'".'
@${ECHO} '#'
.if defined(PKGSRCTOP) && !defined(SPECIFIC_PKGS)
diff --git a/mk/bsd.prefs.mk b/mk/bsd.prefs.mk
index f288a6b6ff3..1ee11dd5fb4 100644
--- a/mk/bsd.prefs.mk
+++ b/mk/bsd.prefs.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.prefs.mk,v 1.104 2003/01/15 10:06:48 jlam Exp $
+# $NetBSD: bsd.prefs.mk,v 1.105 2003/01/15 20:55:39 jlam Exp $
#
# Make file, included to get the site preferences, if any. Should
# only be included by package Makefiles before any .if defined()
@@ -295,8 +295,8 @@ PKGDIR?= ${.CURDIR}
.if defined(WRKOBJDIR)
BUILD_DIR?= ${WRKOBJDIR}/${PKGPATH}
.else
-BUILD_DIR?= ${.CURDIR}
-.endif # WRKOBJDIR
+BUILD_DIR!= cd ${.CURDIR} && ${PWD_CMD}
+.endif
# If OBJHOSTNAME is set, use first component of hostname in directory name.
# If OBJMACHINE is set, use ${MACHINE_ARCH} in the working directory name.
diff --git a/mk/defs.Darwin.mk b/mk/defs.Darwin.mk
index 57ba47b4138..0acb40038b7 100644
--- a/mk/defs.Darwin.mk
+++ b/mk/defs.Darwin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Darwin.mk,v 1.42 2003/01/10 08:44:20 jlam Exp $
+# $NetBSD: defs.Darwin.mk,v 1.43 2003/01/15 20:55:39 jlam Exp $
#
# Variable definitions for the Darwin operating system.
@@ -42,6 +42,7 @@ PAX?= /bin/pax
PERL5?= ${LOCALBASE}/bin/perl
PKGLOCALEDIR?= share
PS?= /bin/ps
+PWD_CMD?= /bin/pwd # needs to print physical path
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /usr/bin/sed
diff --git a/mk/defs.FreeBSD.mk b/mk/defs.FreeBSD.mk
index c55ecd03390..7740c4010ea 100644
--- a/mk/defs.FreeBSD.mk
+++ b/mk/defs.FreeBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.FreeBSD.mk,v 1.14 2003/01/10 08:44:20 jlam Exp $
+# $NetBSD: defs.FreeBSD.mk,v 1.15 2003/01/15 20:55:39 jlam Exp $
#
# Variable definitions for the FreeBSD operating system.
@@ -46,6 +46,7 @@ PAX?= /bin/pax
PERL5?= ${LOCALBASE}/bin/perl
PKGLOCALEDIR?= share
PS?= /bin/ps
+PWD_CMD?= /bin/pwd # needs to print physical path
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /usr/bin/sed
diff --git a/mk/defs.IRIX.mk b/mk/defs.IRIX.mk
index e72c6e40898..94d0c6f40cc 100644
--- a/mk/defs.IRIX.mk
+++ b/mk/defs.IRIX.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.IRIX.mk,v 1.16 2003/01/10 08:44:20 jlam Exp $
+# $NetBSD: defs.IRIX.mk,v 1.17 2003/01/15 20:55:39 jlam Exp $
#
# Variable definitions for the IRIX operating system.
@@ -53,6 +53,7 @@ PAX?= /usr/sbin/pax
PERL5?= ${LOCALBASE}/bin/perl
PKGLOCALEDIR?= share
PS?= /sbin/ps
+PWD_CMD?= /bin/pwd # needs to print physical path
RM?= /sbin/rm
RMDIR?= /usr/bin/rmdir
SED?= /sbin/sed
diff --git a/mk/defs.Linux.mk b/mk/defs.Linux.mk
index 004e2d8549a..645850f6dd7 100644
--- a/mk/defs.Linux.mk
+++ b/mk/defs.Linux.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.Linux.mk,v 1.43 2003/01/10 08:44:20 jlam Exp $
+# $NetBSD: defs.Linux.mk,v 1.44 2003/01/15 20:55:39 jlam Exp $
#
# Variable definitions for the Linux operating system.
@@ -42,6 +42,7 @@ PAX?= ${ZOULARISBASE}/bin/pax
PERL5?= ${LOCALBASE}/bin/perl
PKGLOCALEDIR?= share
PS?= /bin/ps
+PWD_CMD?= /bin/pwd # needs to print physical path
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /bin/sed
diff --git a/mk/defs.NetBSD.mk b/mk/defs.NetBSD.mk
index 2b3433ff51d..110aba4cd74 100644
--- a/mk/defs.NetBSD.mk
+++ b/mk/defs.NetBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.NetBSD.mk,v 1.43 2003/01/10 08:44:20 jlam Exp $
+# $NetBSD: defs.NetBSD.mk,v 1.44 2003/01/15 20:55:39 jlam Exp $
#
# Variable definitions for the NetBSD operating system.
@@ -46,6 +46,7 @@ PAX?= /bin/pax
PERL5?= ${LOCALBASE}/bin/perl
PKGLOCALEDIR?= share
PS?= /bin/ps
+PWD_CMD?= /bin/pwd # needs to print physical path
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /usr/bin/sed
diff --git a/mk/defs.OpenBSD.mk b/mk/defs.OpenBSD.mk
index a737d55f7cc..3af3228e0f9 100644
--- a/mk/defs.OpenBSD.mk
+++ b/mk/defs.OpenBSD.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.OpenBSD.mk,v 1.12 2003/01/10 08:44:20 jlam Exp $
+# $NetBSD: defs.OpenBSD.mk,v 1.13 2003/01/15 20:55:39 jlam Exp $
#
# Variable definitions for the OpenBSD operating system.
@@ -46,6 +46,7 @@ PAX?= /bin/pax
PERL5?= ${LOCALBASE}/bin/perl
PKGLOCALEDIR?= share
PS?= /bin/ps
+PWD_CMD?= /bin/pwd # needs to print physical path
RM?= /bin/rm
RMDIR?= /bin/rmdir
SED?= /usr/bin/sed
diff --git a/mk/defs.SunOS.mk b/mk/defs.SunOS.mk
index 667c5e44b30..b8ac41acf44 100644
--- a/mk/defs.SunOS.mk
+++ b/mk/defs.SunOS.mk
@@ -1,4 +1,4 @@
-# $NetBSD: defs.SunOS.mk,v 1.51 2003/01/10 08:44:20 jlam Exp $
+# $NetBSD: defs.SunOS.mk,v 1.52 2003/01/15 20:55:39 jlam Exp $
#
# Variable definitions for the SunOS/Solaris operating system.
@@ -64,6 +64,7 @@ PAX?= /bin/pax
PERL5?= ${LOCALBASE}/bin/perl
PKGLOCALEDIR?= lib
PS?= /bin/ps
+PWD_CMD?= /bin/pwd # needs to print physical path
RM?= /usr/bin/rm
RMDIR?= /usr/bin/rmdir
SED?= /usr/xpg4/bin/sed