summaryrefslogtreecommitdiff
path: root/mk/bsd.pkg.mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2003-08-16 08:50:17 +0000
committerjlam <jlam@pkgsrc.org>2003-08-16 08:50:17 +0000
commitac0258dd3cb43d7851d44bde98ed32c1e22ff6d2 (patch)
tree30ed6a009df883a6bc69e0407c4cf1a6b6bcbbdd /mk/bsd.pkg.mk
parentd742be9bfff852098589aa99188b11e0cf7d5610 (diff)
downloadpkgsrc-ac0258dd3cb43d7851d44bde98ed32c1e22ff6d2.tar.gz
Move the hide-tools portion of bsd.buildlink2.mk into tools.mk, and
put the tools in ${WRKDIR}/.tools/bin instead of in ${BUILDLINK_DIR}, and remove the need for buildlink2 to use USE_GNU_TOOLS. In the modified USE_GNU_TOOLS implementation, the following implementation- specific variables have the following meanings: _TOOLS_REPLACE.<tool> means that we want ${AWK}, ${SED}, etc. symlinked into ${TOOLS_DIR} as awk, sed, etc. _TOOLS_NEED_GNU.<tool> means that we want to use the pkgsrc version of <tool> symlinked info ${TOOLS_DIR} as awk, sed, etc. If this is "YES", then it always trumps _TOOLS_REPLACE.<tool>. And we want nothing to happen if we're building the pkgsrc GNU tool itself. The modified USE_GNU_TOOLS implementation should also hopefully fix the circular dependency problem. Create a new target "tools" that is run after "patch" and before "buildlink" that populates the ${TOOLS_DIR} directory. This ensures that it's always run at the right time, instead of relying on pre-buildlink or pre-configure, which may be cancelled by NO_BUILDLINK or NO_CONFIGURE. XXX There is some possible fallout in texinfo.mk with the MAKE_ENV and XXX CONFIGURE_ENV settings for INSTALL_INFO and MAKEINFO. It looks XXX like the MAKE_ENV and CONFIGURE_ENV settings should move from XXX tools.mk into texinfo.mk, and they no longer need to be XXX conditional on USE_BUILDLINK2. I'll leave it to the texinfo.mk XXX dude (Hi, Stoned!).
Diffstat (limited to 'mk/bsd.pkg.mk')
-rw-r--r--mk/bsd.pkg.mk132
1 files changed, 43 insertions, 89 deletions
diff --git a/mk/bsd.pkg.mk b/mk/bsd.pkg.mk
index 646dd8e6670..94baa77f2a8 100644
--- a/mk/bsd.pkg.mk
+++ b/mk/bsd.pkg.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.pkg.mk,v 1.1238 2003/08/12 15:55:21 seb Exp $
+# $NetBSD: bsd.pkg.mk,v 1.1239 2003/08/16 08:50:17 jlam Exp $
#
# This file is in the public domain.
#
@@ -298,6 +298,7 @@ INSTALL_COOKIE= ${WRKDIR}/.install_done
TEST_COOKIE= ${WRKDIR}/.test_done
BUILD_COOKIE= ${WRKDIR}/.build_done
PATCH_COOKIE= ${WRKDIR}/.patch_done
+TOOLS_COOKIE= ${WRKDIR}/.tools_done
PACKAGE_COOKIE= ${WRKDIR}/.package_done
INTERACTIVE_COOKIE= .interactive_stage
NULL_COOKIE= ${WRKDIR}/.null
@@ -550,9 +551,6 @@ PLIST_SUBST+= PERL5_SITEARCH=${PERL5_SITEARCH:S/^${LOCALBASE}\///}
PLIST_SUBST+= PERL5_ARCHLIB=${PERL5_ARCHLIB:S/^${LOCALBASE}\///}
.endif
-# base vs. GNU tools
-. include "../../mk/tools.mk"
-
# Handle info files
#
INFO_FILES?= # default to no info files to handle
@@ -1191,6 +1189,8 @@ NO_BUILDLINK= # defined
. include "../../mk/buildlink2/bsd.buildlink2.mk"
.endif
+.include "../../mk/tools.mk"
+
.MAIN: all
# Use aliases, so that all versions of English are acceptable
@@ -1364,10 +1364,17 @@ checksum: fetch
@${DO_NADA}
.endif
+# Disable tools
+.PHONY: tools
+.if defined(NO_TOOLS) && !target(tools)
+tools: patch
+ ${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${TOOLS_COOKIE}
+.endif
+
# Disable buildlink
.PHONY: buildlink
.if defined(NO_BUILDLINK) && !target(configure)
-buildlink: patch
+buildlink: tools
${_PKG_SILENT}${_PKG_DEBUG}${TOUCH} ${TOUCH_FLAGS} ${BUILDLINK_COOKIE}
.endif
@@ -2143,77 +2150,6 @@ do-pkgconfig-override:
. endfor
.endif
-.if empty(USE_BUILDLINK2:M[nN][oO])
-#
-# By default, prevent invocation of GNU "auto*" driven by the generated
-# Makefiles during the build process by touching various auto{conf,make}
-# source files to make them up-to-date. Packages that require regenerating
-# the configure script and Makefile.in files should make the appropriate
-# calls to auto{conf,make} in a pre-configure target.
-#
-# The rationale for the choice of patterns is:
-#
-# Before configure script is run:
-# * configure.in might be generated from configure.in.in,
-# * aclocal.m4 is generated by aclocal from acinclude.m4 and
-# configure.in,
-# * stamp-h.in, stamp-h[0-9].in are the automake timestamp files
-# for config.h.in,
-# * config.h.in is generated by autoheader from configure.in
-# * Makefile.in is generated from Makefile.am,
-# * the configure script is generated by autoconf from configure.in,
-# aclocal.m4, and various other *.m4 files.
-#
-# After configure script is run:
-# * config.status is generated by the configure script,
-# * Makefile, stamp-h, stamp-h[0-9] are generated by config.status.
-# * config.h are generated by config.status.
-#
-# NOTE: If you change the patterns listed below, then it's recommended that
-# you verify that the changes are correct by trying to build the
-# following packages:
-#
-# sysutils/fileutils, www/curl, x11/lesstif, x11/kdelibs2
-#
-AUTOMAKE_OVERRIDE?= YES
-. if empty(AUTOMAKE_OVERRIDE:M[nN][oO])
-AUTOMAKE_PATTERNS+= aclocal.m4
-AUTOMAKE_PATTERNS+= configure.in
-AUTOMAKE_PATTERNS+= Makefile.in
-AUTOMAKE_PATTERNS+= stamp-h.in stamp-h\[0-9\].in
-AUTOMAKE_PATTERNS+= stamp-vti
-AUTOMAKE_PATTERNS+= config.h.in
-AUTOMAKE_PATTERNS+= ${CONFIGURE_SCRIPT:T}
-
-_CONFIGURE_PREREQ+= automake-pre-override
-.PHONY: automake-pre-override
-automake-pre-override:
-. if defined(HAS_CONFIGURE)
- ${_PKG_SILENT}${_PKG_DEBUG} \
- (for _PATTERN in ${AUTOMAKE_PATTERNS}; do \
- ${FIND} ${WRKSRC} -type f -name "$$_PATTERN" -print; \
- done; echo ${NULL_COOKIE} ) | \
- ${XARGS} ${TOUCH} ${TOUCH_FLAGS}
-. endif
-
-AUTOMAKE_POST_PATTERNS+= config.status
-AUTOMAKE_POST_PATTERNS+= Makefile
-AUTOMAKE_POST_PATTERNS+= stamp-h stamp-h[0-9]
-AUTOMAKE_POST_PATTERNS+= config.h
-
-_CONFIGURE_POSTREQ+= automake-post-override
-.PHONY: automake-post-override
-automake-post-override:
-. if defined(HAS_CONFIGURE)
- ${_PKG_SILENT}${_PKG_DEBUG} \
- (for _PATTERN in ${AUTOMAKE_POST_PATTERNS}; do \
- ${FIND} ${WRKSRC} -type f -name "$$_PATTERN" -print; \
- done; echo ${NULL_COOKIE} ) | \
- ${XARGS} ${TOUCH} ${TOUCH_FLAGS}
-. endif
-. endif # AUTOMAKE_OVERRIDE
-.endif # USE_BUILDLINK != "no"
-
# By adding this target, it makes sure the the above PREREQ's work.
.PHONY: pre-configure-override
pre-configure-override: ${_CONFIGURE_PREREQ}
@@ -2785,12 +2721,14 @@ show-shlib-type:
. endif # libc.dylib
.endif
-.PHONY: acquire-extract-lock acquire-patch-lock acquire-buildlink-lock
-.PHONY: acquire-configure-lock acquire-build-lock
+.PHONY: acquire-extract-lock acquire-patch-lock acquire-tools-lock
+.PHONY: acquire-buildlink-lock acquire-configure-lock acquire-build-lock
acquire-extract-lock:
${_ACQUIRE_LOCK}
acquire-patch-lock:
${_ACQUIRE_LOCK}
+acquire-tools-lock:
+ ${_ACQUIRE_LOCK}
acquire-buildlink-lock:
${_ACQUIRE_LOCK}
acquire-configure-lock:
@@ -2798,12 +2736,14 @@ acquire-configure-lock:
acquire-build-lock:
${_ACQUIRE_LOCK}
-.PHONY: release-extract-lock release-patch-lock release-buildlink-lock
-.PHONY: release-configure-lock release-build-lock
+.PHONY: release-extract-lock release-patch-lock release-tools-lock
+.PHONY: release-buildlink-lock release-configure-lock release-build-lock
release-extract-lock:
${_RELEASE_LOCK}
release-patch-lock:
${_RELEASE_LOCK}
+release-tools-lock:
+ ${_RELEASE_LOCK}
release-buildlink-lock:
${_RELEASE_LOCK}
release-configure-lock:
@@ -2836,9 +2776,14 @@ extract: checksum ${WRKDIR} acquire-extract-lock ${EXTRACT_COOKIE} release-extra
patch: extract acquire-patch-lock ${PATCH_COOKIE} release-patch-lock
.endif
+.PHONY: tools
+.if !target(tools)
+tools: patch acquire-tools-lock ${TOOLS_COOKIE} release-tools-lock
+.endif
+
.PHONY: buildlink
.if !target(buildlink)
-buildlink: patch acquire-buildlink-lock ${BUILDLINK_COOKIE} release-buildlink-lock
+buildlink: tools acquire-buildlink-lock ${BUILDLINK_COOKIE} release-buildlink-lock
.endif
.PHONY: configure
@@ -2893,6 +2838,9 @@ ${EXTRACT_COOKIE}:
${PATCH_COOKIE}:
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-patch
+${TOOLS_COOKIE}:
+ ${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-tools
+
${BUILDLINK_COOKIE}:
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-buildlink
@@ -2932,12 +2880,14 @@ ${INSTALL_COOKIE}:
${PACKAGE_COOKIE}:
${_PKG_SILENT}${_PKG_DEBUG}cd ${.CURDIR} && ${MAKE} ${MAKEFLAGS} real-package
-.PHONY: extract-message patch-message buildlink-message configure-message
-.PHONY: build-message test-message
+.PHONY: extract-message patch-message tools-message buildlink-message
+.PHONY: configure-message build-message test-message
extract-message:
@${ECHO_MSG} "${_PKGSRC_IN}> Extracting for ${PKGNAME}"
patch-message:
@${ECHO_MSG} "${_PKGSRC_IN}> Patching for ${PKGNAME}"
+tools-message:
+ @${ECHO_MSG} "${_PKGSRC_IN}> Overriding tools for ${PKGNAME}"
buildlink-message:
@${ECHO_MSG} "${_PKGSRC_IN}> Buildlinking for ${PKGNAME}"
configure-message:
@@ -2947,12 +2897,14 @@ build-message:
test-message:
@${ECHO_MSG} "${_PKGSRC_IN}> Testing for ${PKGNAME}"
-.PHONY: extract-cookie patch-cookie buildlink-cookie configure-cookie
-.PHONY: build-cookie test-cookie
+.PHONY: extract-cookie patch-cookie tools-cookie buildlink-cookie
+.PHONY: configure-cookie build-cookie test-cookie
extract-cookie:
${_PKG_SILENT}${_PKG_DEBUG}${ECHO} ${PKGNAME} >> ${EXTRACT_COOKIE}
patch-cookie:
${_PKG_SILENT}${_PKG_DEBUG} ${TOUCH} ${TOUCH_FLAGS} ${PATCH_COOKIE}
+tools-cookie:
+ ${_PKG_SILENT}${_PKG_DEBUG} ${TOUCH} ${TOUCH_FLAGS} ${TOOLS_COOKIE}
buildlink-cookie:
${_PKG_SILENT}${_PKG_DEBUG} ${TOUCH} ${TOUCH_FLAGS} ${BUILDLINK_COOKIE}
configure-cookie:
@@ -2965,6 +2917,7 @@ test-cookie:
.ORDER: pre-fetch do-fetch post-fetch
.ORDER: extract-message install-depends pre-extract do-extract post-extract extract-cookie
.ORDER: patch-message pre-patch do-patch post-patch patch-cookie
+.ORDER: tools-message pre-tools do-tools post-tools tools-cookie
.ORDER: buildlink-message pre-buildlink do-buildlink post-buildlink buildlink-cookie
.ORDER: configure-message pre-configure pre-configure-override do-configure post-configure configure-cookie
.ORDER: build-message pre-build do-build post-build build-cookie
@@ -2973,12 +2926,13 @@ test-cookie:
# Please note that the order of the following targets is important, and
# should not be modified (.ORDER is not recognised by make(1) in a serial
# make i.e. without -j n)
-.PHONY: real-fetch real-extract real-patch real-buildlink real-configure
-.PHONY: real-build real-test real-install real-package real-replace
-.PHONY: real-undo-replace
+.PHONY: real-fetch real-extract real-patch real-tools real-buildlink
+.PHONY: real-configure real-build real-test real-install real-package
+.PHONY: real-replace real-undo-replace
real-fetch: pre-fetch do-fetch post-fetch
real-extract: extract-message install-depends pre-extract do-extract post-extract extract-cookie
real-patch: patch-message pre-patch do-patch post-patch patch-cookie
+real-tools: tools-message pre-tools do-tools post-tools tools-cookie
real-buildlink: buildlink-message pre-buildlink do-buildlink post-buildlink buildlink-cookie
real-configure: configure-message pre-configure pre-configure-override do-configure post-configure configure-cookie
real-build: build-message pre-build do-build post-build build-cookie
@@ -3055,7 +3009,7 @@ do-su-undo-replace:
# Empty pre-* and post-* targets
-.for name in fetch extract patch buildlink configure build test install-script install package
+.for name in fetch extract patch tools buildlink configure build test install-script install package
. if !target(pre-${name})
pre-${name}: