summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam>2001-10-24 19:42:28 +0000
committerjlam <jlam>2001-10-24 19:42:28 +0000
commit9096a9952aa3fafd931f65fe6e991542a1b63830 (patch)
tree0f0177e741d43b6d1e0108e2a5d54a1cbf2ef249 /mk
parentdff2f8a86bae78828e767cc4169f4463f5ef3c92 (diff)
downloadpkgsrc-9096a9952aa3fafd931f65fe6e991542a1b63830.tar.gz
The do-configure target has some "stuff" that is supposed to be done after
the pre-configure target is called but before the configure script is called, but it's added in a non-extensible way. This "stuff" is the replace-ncurses step and the ltconfig-override step. Move these steps out into their own targets that are named as prerequisites to the do-configure step. The prerequisites are specified in the private variable _CONFIGURE_PREREQ, to which other independent targets may be appended.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.pkg.mk43
1 files changed, 26 insertions, 17 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index d3aaa6ea141..7b988a17e46 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.827 2001/10/17 23:23:16 hubertf Exp $
+# $NetBSD: bsd.pkg.mk,v 1.828 2001/10/24 19:42:28 jlam Exp $
#
# This file is in the public domain.
#
@@ -1477,10 +1477,10 @@ do-patch: uptodate-digest
# Configure
-.if !target(do-configure)
-do-configure:
-. if defined(REPLACE_NCURSES) && (!defined(NEED_NCURSES) || ${NEED_NCURSES} == "NO")
-. for f in ${REPLACE_NCURSES}
+_CONFIGURE_PREREQ+= replace-ncurses
+replace-ncurses:
+.if defined(REPLACE_NCURSES) && (!defined(NEED_NCURSES) || ${NEED_NCURSES} == "NO")
+. for f in ${REPLACE_NCURSES}
${_PKG_SILENT}${_PKG_DEBUG}cd ${WRKSRC}; if [ -f ${f} ]; then \
${SED} -e "s/ncurses/curses/g" ${f} > ${f}.new; \
if [ -x ${f} ]; then \
@@ -1488,20 +1488,29 @@ do-configure:
fi; \
${MV} ${f}.new ${f}; \
fi
-. endfor
-. endif
+. endfor
+.else
+ ${_PKG_SILENT}${_PKG_DEBUG}${TRUE}
+.endif
-. if defined(USE_LIBTOOL) && defined(LTCONFIG_OVERRIDE)
-. for ltconfig in ${LTCONFIG_OVERRIDE}
- ${_PKG_SILENT}${_PKG_DEBUG}\
- if [ -f ${ltconfig} ]; then \
- ${RM} -f ${ltconfig}; \
- ${ECHO} "${RM} -f libtool; ${LN} -s ${LIBTOOL} libtool" \
- > ${ltconfig}; \
- ${CHMOD} +x ${ltconfig} ; \
+_CONFIGURE_PREREQ+= do-libtool
+do-libtool:
+.if defined(USE_LIBTOOL) && defined(LTCONFIG_OVERRIDE)
+. for ltconfig in ${LTCONFIG_OVERRIDE}
+ ${_PKG_SILENT}${_PKG_DEBUG} \
+ if [ -f ${ltconfig} ]; then \
+ ${RM} -f ${ltconfig}; \
+ ${ECHO} "${RM} -f libtool; ${LN} -s ${LIBTOOL} libtool" \
+ > ${ltconfig}; \
+ ${CHMOD} +x ${ltconfig}; \
fi
-. endfor
-. endif
+. endfor
+.else
+ ${_PKG_SILENT}${_PKG_DEBUG}${TRUE}
+.endif
+
+.if !target(do-configure)
+do-configure: ${_CONFIGURE_PREREQ}
${_PKG_SILENT}${_PKG_DEBUG}if [ -f ${SCRIPTDIR}/configure ]; then \
cd ${.CURDIR} && ${SETENV} ${SCRIPTS_ENV} ${SH} \
${SCRIPTDIR}/configure; \