summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorjlam <jlam@pkgsrc.org>2001-10-24 19:46:45 +0000
committerjlam <jlam@pkgsrc.org>2001-10-24 19:46:45 +0000
commite44bb6e882b7159ca712a088730c4acc3bc65982 (patch)
tree8f0b100d670d48c1c55169bbade9238f7e9f73e9 /mk
parent51436ad116bb64986efd83d8f814f0d2fa4162ad (diff)
downloadpkgsrc-e44bb6e882b7159ca712a088730c4acc3bc65982.tar.gz
Rearrange some of the logic to consolidate the code that is a.out-specific.
Also name the replace-libnames-configure as part of ${_CONFIGURE_PREREQ} instead of as a prerequisite to pre-configure. This is needed so that the replacement occurs _after_ pre-configure target is run, which may call autoconf/automake to regenerate the configure scripts. Before this change, the replacement would be overwritten when the configure scripts were regenerated. This should fix a problem first noticed by Alistair Crooks <agc@netbsd.org> in the net/mtr package.
Diffstat (limited to 'mk')
-rw-r--r--mk/bsd.buildlink.mk17
1 files changed, 10 insertions, 7 deletions
diff --git a/mk/bsd.buildlink.mk b/mk/bsd.buildlink.mk
index c75d4de7e98..54d8d1453e1 100644
--- a/mk/bsd.buildlink.mk
+++ b/mk/bsd.buildlink.mk
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.buildlink.mk,v 1.45 2001/10/24 19:01:00 jlam Exp $
+# $NetBSD: bsd.buildlink.mk,v 1.46 2001/10/24 19:46:45 jlam Exp $
#
# This Makefile fragment is included by package buildlink.mk files. This
# file does the following things:
@@ -245,14 +245,17 @@ MAKEFILE_PATTERNS+= *.mk
REPLACE_LIBNAME_PATTERNS+= ${MAKEFILE_PATTERNS}
_REPLACE_LIBNAME_PATTERNS_FIND= \
${REPLACE_LIBNAME_PATTERNS:S/$/!/:S/^/-o -name !/:S/!/"/g:S/-o//1}
+_REPLACE_LIBNAME_CONFIGURE_PATTERNS_FIND= \
+ -name "${CONFIGURE_SCRIPT:T}"
+
+REPLACE_LIBNAMES_CONFIGURE+= \
+ `cd ${WRKSRC}; ${FIND} . ${_REPLACE_LIBNAME_CONFIGURE_PATTERNS_FIND} | ${SED} -e 's|^\./||' | ${SORT}`
REPLACE_LIBNAMES+= \
`cd ${WRKSRC}; ${FIND} . ${_REPLACE_LIBNAME_PATTERNS_FIND} | ${SED} -e 's|^\./||' | ${SORT}`
-.endif
-.if defined(REPLACE_LIBNAMES) || defined(REPLACE_LIBNAME_PATTERNS)
.if defined(HAS_CONFIGURE) || defined(GNU_CONFIGURE)
-pre-configure: replace-libnames-configure
+_CONFIGURE_PREREQ+= replace-libnames-configure
# Fix linking on a.out platforms in configure scripts by changing library
# references to the true library names.
@@ -261,11 +264,11 @@ replace-libnames-configure:
${_PKG_SILENT}${_PKG_DEBUG} \
cookie=${BUILDLINK_DIR}/.replace_libnames_configure_done; \
if [ ! -f $${cookie} ]; then \
- replace_files="${CONFIGURE_SCRIPT}"; \
+ replace_files="${REPLACE_LIBNAMES_CONFIGURE}"; \
message="Fixing library name references in configure scripts:"; \
${_REPLACE_LIBNAMES_SCRIPT}; \
fi
-.endif # HAS_CONFIGURE
+.endif
post-configure: replace-libnames-makefiles
@@ -280,7 +283,7 @@ replace-libnames-makefiles:
message="Fixing library name references in Makefiles:"; \
${_REPLACE_LIBNAMES_SCRIPT}; \
fi
-.endif # REPLACE_LIBNAMES
+.endif # a.out
REPLACE_RPATH_PATTERNS+= ${MAKEFILE_PATTERNS}
_REPLACE_RPATH_PATTERNS_FIND= \