summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorrillig <rillig@pkgsrc.org>2005-10-08 13:16:28 +0000
committerrillig <rillig@pkgsrc.org>2005-10-08 13:16:28 +0000
commit7102a2e63354fadd5436060f07938e800e569b19 (patch)
tree581f7e547e189291030d46365e9adf4386e1c00b /mk/bsd.pkg.mk
parente8b88514059f3e21b05216aa7ecb79b0778a092d (diff)
downloadpkgsrc-7102a2e63354fadd5436060f07938e800e569b19.tar.gz
CONFIGURE_DIRS, BUILD_DIRS, TEST_DIRS and INSTALL_DIRS are interpreted
relative to ${WRKSRC}. This makes it possible to shorten definitions like "BUILD_DIRS=${WRKSRC}/foo ${WRKSRC}/bar" in package Makefiles to "BUILD_DIRS=foo bar". Almost all current uses of those directories are given as absolute directories (mostly in the form ${WRKSRC}/foo), which will work as they did before.
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk41
1 files changed, 27 insertions, 14 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 145ed54e59b..32ba95a36b2 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1728 2005/10/07 17:39:28 rillig Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1729 2005/10/08 13:16:28 rillig Exp $
#
# This file is in the public domain.
#
@@ -1831,11 +1831,13 @@ pre-configure-override: ${_CONFIGURE_PREREQ}
.if !target(do-configure)
do-configure:
. if defined(HAS_CONFIGURE)
-. for DIR in ${CONFIGURE_DIRS}
- ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${DIR} && ${SETENV} \
- AWK="${TOOLS_AWK}" \
- INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
- ac_given_INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
+. for _dir_ in ${CONFIGURE_DIRS}
+ ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
+ cd ${WRKSRC}; cd ${_dir_}; \
+ ${SETENV} \
+ AWK="${TOOLS_AWK}" \
+ INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
+ ac_given_INSTALL="${INSTALL} -c -o ${BINOWN} -g ${BINGRP}" \
INSTALL_DATA="${INSTALL_DATA}" \
INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
INSTALL_GAME="${INSTALL_GAME}" \
@@ -1846,8 +1848,10 @@ do-configure:
. endfor
. endif
. if defined(USE_IMAKE)
-. for DIR in ${CONFIGURE_DIRS}
- ${_PKG_SILENT}${_PKG_DEBUG}cd ${DIR} && ${SETENV} ${SCRIPTS_ENV} XPROJECTROOT=${X11BASE} ${XMKMF}
+. for _dir_ in ${CONFIGURE_DIRS}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ cd ${WRKSRC}; cd ${_dir_}; \
+ ${SETENV} ${SCRIPTS_ENV} XPROJECTROOT=${X11BASE} ${XMKMF}
. endfor
. endif
.endif
@@ -1920,8 +1924,11 @@ BUILD_MAKE_FLAGS?= ${MAKE_FLAGS}
.PHONY: do-build
.if !target(do-build)
do-build:
-. for DIR in ${BUILD_DIRS}
- ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${DIR} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} -f ${MAKEFILE} ${BUILD_TARGET}
+. for _dir_ in ${BUILD_DIRS}
+ ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
+ cd ${WRKSRC}; cd ${_dir_}; \
+ ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${BUILD_MAKE_FLAGS} \
+ -f ${MAKEFILE} ${BUILD_TARGET}
. endfor
.endif
@@ -1935,8 +1942,11 @@ TEST_MAKE_FLAGS?= ${MAKE_FLAGS}
.if !target(do-test)
do-test:
. if defined(TEST_TARGET) && !empty(TEST_TARGET)
-. for DIR in ${TEST_DIRS}
- ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${DIR} && ${SETENV} ${TEST_ENV} ${MAKE_PROGRAM} ${TEST_MAKE_FLAGS} -f ${MAKEFILE} ${TEST_TARGET}
+. for _dir_ in ${TEST_DIRS}
+ ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
+ cd ${WRKSRC}; cd ${_dir_}; \
+ ${SETENV} ${TEST_ENV} ${MAKE_PROGRAM} ${TEST_MAKE_FLAGS} \
+ -f ${MAKEFILE} ${TEST_TARGET}
. endfor
. else
@${DO_NADA}
@@ -1948,8 +1958,11 @@ do-test:
.PHONY: do-install
.if !target(do-install)
do-install:
-. for DIR in ${INSTALL_DIRS}
- ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD}cd ${DIR} && ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${INSTALL_MAKE_FLAGS} -f ${MAKEFILE} ${INSTALL_TARGET}
+. for _dir_ in ${INSTALL_DIRS}
+ ${_PKG_SILENT}${_PKG_DEBUG}${_ULIMIT_CMD} \
+ cd ${WRKSRC}; cd ${_dir_}; \
+ ${SETENV} ${MAKE_ENV} ${MAKE_PROGRAM} ${INSTALL_MAKE_FLAGS} \
+ -f ${MAKEFILE} ${INSTALL_TARGET}
. endfor
.endif