summaryrefslogtreecommitdiff
path: root/Mk/bsd.port.mk
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1994-10-03 13:45:03 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1994-10-03 13:45:03 +0000
commit37e15dac70083e5a48bbc29450320a8dab64bf63 (patch)
treec82742fd2c34b25bbbdd22bbe58804bceefba2cc /Mk/bsd.port.mk
parentAdded nn (diff)
May the saints praise Robert Withrow <witr@rwwa.com> for showing me
the light. `env' can be used to pass environment variables to shell scripts this way, which means that all *configure/post-build scripts _no longer take any arguments_; everything they should need (and more) is now available in the environment. I'm working now to adapt the older shell scripts over, but if you want beat me to it on some of your own ports, don't let me stop you! :) Submitted by: witr
Notes
Notes: svn path=/head/; revision=160
Diffstat (limited to 'Mk/bsd.port.mk')
-rw-r--r--Mk/bsd.port.mk26
1 files changed, 17 insertions, 9 deletions
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index afccd3298284..0a8c599d7913 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -3,7 +3,7 @@
# bsd.port.mk - 940820 Jordan K. Hubbard.
# This file is in the public domain.
#
-# $Id: bsd.port.mk,v 1.40 1994/09/22 07:45:30 swallace Exp $
+# $Id: bsd.port.mk,v 1.41 1994/09/28 14:19:30 jkh Exp $
#
# Please view me with 4 column tabs!
@@ -229,7 +229,10 @@ build: configure pre-build
@(cd ${WRKSRC}; ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} all)
.endif
@if [ -f ${SCRIPTDIR}/post-build ]; then \
- sh ${SCRIPTDIR}/post-build ${PORTSDIR} ${.CURDIR} ${WRKSRC}; \
+ env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \
+ WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \
+ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} \
+ sh ${SCRIPTDIR}/post-build; \
fi
.endif
@@ -252,15 +255,17 @@ ${CONFIGURE_COOKIE}:
${PATCH} ${PATCH_ARGS} < $$i; \
done; \
fi
-# We have a small convention for our local configure scripts, which
-# is that ${PORTSDIR}, ${.CURDIR} and ${WRKSRC} get passed as
-# command-line arguments since all other methods are a little
-# problematic.
@if [ -f ${SCRIPTDIR}/pre-configure ]; then \
- sh ${SCRIPTDIR}/pre-configure ${PORTSDIR} ${.CURDIR} ${WRKSRC}; \
+ env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \
+ WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \
+ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} \
+ sh ${SCRIPTDIR}/pre-configure; \
fi
@if [ -f ${SCRIPTDIR}/configure ]; then \
- sh ${SCRIPTDIR}/configure ${PORTSDIR} ${.CURDIR} ${WRKSRC}; \
+ env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \
+ WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \
+ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} \
+ sh ${SCRIPTDIR}/configure; \
fi
.if defined(HAS_CONFIGURE)
@(cd ${WRKSRC}; ./configure ${CONFIGURE_ARGS})
@@ -269,7 +274,10 @@ ${CONFIGURE_COOKIE}:
@(cd ${WRKSRC}; ${XMKMF} && ${MAKE} Makefiles)
.endif
@if [ -f ${SCRIPTDIR}/post-configure ]; then \
- sh ${SCRIPTDIR}/post-configure ${PORTSDIR} ${.CURDIR} ${WRKSRC}; \
+ env CURDIR=${.CURDIR} DISTDIR=${DISTDIR} WRKDIR=${WRKDIR} \
+ WRKSRC=${WRKSRC} PATCHDIR=${PATCHDIR} SCRIPTDIR=${SCRIPTDIR} \
+ FILESDIR=${FILESDIR} PORTSDIR=${PORTSDIR} \
+ sh ${SCRIPTDIR}/post-configure; \
fi
@touch -f ${CONFIGURE_COOKIE}
.endif