pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/mk Move the hide-tools portion of bsd.buildlink2.mk in...
details: https://anonhg.NetBSD.org/pkgsrc/rev/b740bb4b0254
branches: trunk
changeset: 460017:b740bb4b0254
user: jlam <jlam%pkgsrc.org@localhost>
date: Sat Aug 16 08:50:17 2003 +0000
description:
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:
mk/bsd.pkg.mk | 132 +++++----------
mk/buildlink2/bsd.buildlink2.mk | 95 +-----------
mk/tools.mk | 332 +++++++++++++++++++++++----------------
3 files changed, 238 insertions(+), 321 deletions(-)
diffs (truncated from 746 to 300 lines):
diff -r e13a740a65c1 -r b740bb4b0254 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk Sat Aug 16 08:39:17 2003 +0000
+++ b/mk/bsd.pkg.mk Sat Aug 16 08:50:17 2003 +0000
@@ -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 @@
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_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 @@
. 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 @@
@${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 @@
. 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 @@
. 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-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 @@
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 @@
${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 @@
${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 @@
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 @@
.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 @@
# 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 @@
# 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}:
diff -r e13a740a65c1 -r b740bb4b0254 mk/buildlink2/bsd.buildlink2.mk
--- a/mk/buildlink2/bsd.buildlink2.mk Sat Aug 16 08:39:17 2003 +0000
+++ b/mk/buildlink2/bsd.buildlink2.mk Sat Aug 16 08:50:17 2003 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink2.mk,v 1.93 2003/08/09 10:24:54 seb Exp $
+# $NetBSD: bsd.buildlink2.mk,v 1.94 2003/08/16 08:50:20 jlam Exp $
#
# An example package buildlink2.mk file:
#
@@ -584,7 +584,7 @@
_BLNK_WRAP_POST_CACHE= ${BUILDLINK_DIR}/bin/.post-cache
_BLNK_WRAP_LOGIC= ${BUILDLINK_DIR}/bin/.logic
_BLNK_WRAP_LOGIC_TRANSFORM= ${BUILDLINK_DIR}/bin/.logic-trans
-_BLNK_WRAP_LOG= ${BUILDLINK_DIR}/.wrapper.log
+_BLNK_WRAP_LOG= ${WRKLOG}
_BLNK_LIBTOOL_DO_INSTALL= ${BUILDLINK_DIR}/bin/.libtool-do-install
_BLNK_LIBTOOL_FIX_LA= ${BUILDLINK_DIR}/bin/.libtool-fix-la
_BLNK_FAKE_LA= ${BUILDLINK_DIR}/bin/.fake-la
@@ -982,94 +982,3 @@
@if [ -f ${_BLNK_WRAP_LOG} ]; then \
${GREP} ${_BLNK_CHECK_PATTERNS} ${_BLNK_WRAP_LOG} || ${TRUE}; \
fi
-
-# Create shell scripts in ${BUILDLINK_DIR} that simply return an error
-# status for each of the GNU auto* tools, which should cause GNU configure
-# scripts to think that they can't be found.
-#
-AUTOMAKE_OVERRIDE?= yes
-_GNU_MISSING= ${.CURDIR}/../../mk/gnu-config/missing
-_HIDE_PROGS.autoconf= bin/autoconf bin/autoconf-2.13 \
- bin/autoheader bin/autoheader-2.13 \
- bin/autom4te \
- bin/autoreconf bin/autoreconf-2.13 \
- bin/autoscan bin/autoscan-2.13 \
- bin/autoupdate bin/autoupdate-2.13 \
- bin/ifnames bin/ifnames-2.13
-_HIDE_PROGS.automake= bin/aclocal bin/aclocal-1.4 \
- bin/aclocal-1.5 \
- bin/aclocal-1.6 \
Home |
Main Index |
Thread Index |
Old Index