summaryrefslogtreecommitdiff
path: root/mk/bsd.buildlink.mk
AgeCommit message (Collapse)AuthorFilesLines
2002-03-20Modify the generated wrapper script to honor the exit code of the wrappee.jlam1-3/+6
Idea from Dan McMahill <dmcmahill@netbsd.org>.
2002-03-20Disable the code added in the previous commit. It seems to be causingjlam1-1/+6
problems linking against libintl in the base system (pkg/15964).
2002-03-18_LIBTOOL_ARCHIVE_TRANSFORM creates $${dest} from $${file}, wherejlam1-3/+20
$${file} is a libtool archive (*.la). It allows libtool to properly interact with buildlink at link time by linking against the libraries pointed to by symlinks in ${BUILDLINK_DIR}. This change has been tested by me on NetBSD-1.5ZA/i386 and by Mark Davies <mark@mcs.vuw.ac.nz> on Solaris.
2002-03-08Minimize the amount of stuff guarded by ${_USE_RPATH}.jlam1-2/+2
2002-03-08Use some new conventions (changes not user-visible):jlam1-5/+11
FOO_SED is user-appendable. _FOO_SED = ${_FOO_PRE_SED} ${FOO_SED} ${_FOO_POST_SED} _FOO_SED is used when actually making sed(1) substitutions. This allows tweaking _FOO_{PRE,POST}_SED to alter the total sed expression.
2002-02-26Use massively simpler method to filter out libtool archives and get ridjlam1-12/+8
of the horrendous (non-portable) sed statement that did the same thing.
2002-01-06Fix file recognition for "unbuildlink-buildlink-subst" so it recognizetron1-2/+2
shell scripts under Solaris.
2002-01-03Explicitly set BUILDLINK_DIR and BUILDLINK_X11_DIR with = instead of ?=.jlam1-2/+2
We really don't want these to change from the correct values (within ${WRKDIR}).
2002-01-01Remove trailing \ in the sed expression for config script wrappers as Linuxjlam1-2/+2
chokes on the construct. This was a pasto that's been there for a while but was uncaught. Thanks for David Brownlee <abs@netbsd.org> for noting the problem and the solution.
2001-11-30Create ECHO_BUILDLINK_MSG for printing buildlink diagnostics. It's justjlam1-4/+6
set to '${ECHO_MSG} "=>"' for now.
2001-11-30Factor out code that substitutes for text in files into a macro target.jlam1-109/+90
Less cut-and-paste, more code sharing. Also comment the file a bit more.
2001-10-31Fix an improper newline in a comment (was <TAB>bing all the way to column 80).tv1-2/+3
2001-10-29On Solaris 7, when `find dir -name foo -name bar' in invoked, only anjlam1-9/+9
implicit `-print' action is performed on bar and not on foo. Surround the search pattern in \( ... \) and add an explict -print so that all of the results of the find are printed. Problem noted and patch to fix this received in private email from Stoned Elipot <seb@netbsd.org>.
2001-10-25Make it easier to debug for the a.out case on an ELF machine.jlam1-2/+2
2001-10-24Rearrange some of the logic to consolidate the code that is a.out-specific.jlam1-7/+10
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.
2001-10-24Make some more variables "private" by prepending with an underscore.jlam1-7/+7
2001-10-22Replace the -and/-or options with -a/-o as the former don't work withjlam1-4/+4
Solaris find. The latter work across Solaris/NetBSD/Linux. Patch received in private e-mail from Stoned Elipot <seb@netbsd.org>.
2001-10-20Some Makefiles separate -R and the rpath directory with whitespace, sojlam1-2/+2
handle that case.
2001-10-09Make the variables BUILDLINK_CPPFLAGS and BUILDLINK_LDFLAGS private byjlam1-17/+17
prepending an underscore to their names. The values are not meant to be set by Makefiles or buildlink.mk files. However, the values are exported through CONFIGURE_ENV and MAKE_ENV so that they may be used during the respective processes.
2001-10-09Back out last change that moved the prepending of BUILDLINK_CPPFLAGS andjlam1-1/+6
BUILDLINK_LDFLAGS to CFLAGS, CPPFLAGS, CXXFLAGS, LDFLAGS from bsd.buildlink.mk to bsd.pkg.mk. They're unnecessary after the recent changes to bonobo/buildlink.mk and to libglade/buildlink.mk that removed their settings of BUILDLINK_CPPFLAGS.
2001-10-05Prepend "${BUILDLINK_CPPFLAGS}" and "${BUILDLINK_LDFLAGS}" to "${CFLAGS}",tron1-6/+1
"${CPPFLAGS}", "${CXXFLAGS}" respectively "${LDFLAGS}" in "bsd.pkg.mk" and not in "bsd.buildlink.mk" because "${BUILDLINK_CPPFLAGS}" and "${BUILDLINK_LDFLAGS}" might get changed several times by the "buildlink.mk" files of various packages.
2001-10-05Substitute for rpath references to buildlink directories in Makefilesjlam1-6/+42
after the configure step. There's a growing number of GNU configure scripts that find a library in -L/path and automatically add -R/path to the linker flags. We need to make sure this doesn't happen to buildlink directories.
2001-10-05Move the setting of replace_files within the cookie check so that if it'sjlam1-25/+27
expanded from some expensive operation, it isn't evaluated if it's not needed. Also fix the replace-buildlink target where we were potentially evaluating ${REPLACE_BUILDLINK} twice when only once was enough.
2001-10-05Rename some replace_* variables to replace_files. I'm trying to factorjlam1-10/+10
out some common code, and this is a start to make different code pieces look more alike.
2001-10-05Factor out the pattern representing Makefiles into its own variablejlam1-6/+9
MAKEFILE_PATTERNS. Also replace -R${BUILDLINK_DIR}/lib with -R${LOCALBASE}/lib on all the REPLACE_BUILDLINK files to prevent rpath references to ${BUILDLINK_DIR} from getting into things like config scripts.
2001-10-04Document the following variables:jlam1-5/+38
REPLACE_BUILDLINK REPLACE_BUILDLINK_PATTERNS REPLACE_BUILDLINK_SED REPLACE_LIBNAMES REPLACE_LIBNAMES_PATTERNS REPLACE_LIBNAMES_SED BUILDLINK_CONFIG_WRAPPER_SED Also prepend an underscore to REPLACE_LIBNAME_SCRIPT as it's not a variable we're exporting.
2001-10-04Fix typo in previous commit.jlam1-2/+2
2001-10-03Make explicit what the mammoth sed expression in the _BUILDLINK_USE targetjlam1-5/+12
is supposed to do: filter out libtool archives from the list of files to link into ${BUILDLINK_DIR}.
2001-10-03Invent new variables:jlam1-26/+39
REPLACE_LIBNAMES_PATTERNS REPLACE_BUILDLINK_PATTERNS They are space-separated lists of shell glob patterns representing files in which we substitute with REPLACE_LIBNAMES_SED (for replacing buildlink library names with the true library names) and REPLACE_BUILDLINK_SED (for replacing references to buildlink directories with the true install locations). This generalizes the variables (which may still be used): REPLACE_LIBNAMES, REPLACE_BUILDLINK, that contained the actual filenames. REPLACE_BUILDLINK_PATTERNS contains *.lai, *-config, *Conf.sh, and *.pc.
2001-10-02Factor out the common code for the replace-libnames targets into a variablejlam1-54/+51
and use it instead. Also subsititute for library names in the installed libtool archives. This last bit is to fix instances where "-lncurses" has been hard-coded into *.lai files, but we are actually using -lcurses in reality (devel/tvision is one example). Problem noted by Thomas Klausner (hi wiz!).
2001-08-22Change a = to a += to allow adding to the value ofjlam1-6/+8
BUILDLINK_CONFIG_WRAPPER_POST_SED. Also some minor formatting changes.
2001-07-27Add back commented code.jlam1-3/+3
2001-07-27Separate library name replacement into two parts, pre-configure andjlam1-7/+39
post-configure. Also make sure ${BUILDLINK_DIR} is created prior to trying to create the cookie files.
2001-07-27On ELF, the linker extracts the soname from the specified libraries tojlam1-2/+38
place in the linked object, so even if the library is a symlink with a different name from the true library, the correct soname is recorded in the object. On a.out, there is no soname, so the linker just records the specified library name + major number into the object, which can cause the incorrect library name to be recorded. Fix this problem on a.out by replacing the specified library names with the true library names in all of the Makefiles in a post-configure step. Additional files may be added to the list of files on which replacement is done by setting REPLACE_LIBNAMES in each package that needs it. This should fix pkg/13402 by John Klos <john@sixgirls.org>.
2001-07-24Add more debugging code to note when a file to be linked can't be found.jlam1-1/+4
2001-07-23Record files that are linked into ${BUILDLINK_DIR} in the cookie filesjlam1-4/+8
to aid in debugging problems.
2001-07-20Make the example buildlink.mk file more complete by showing howjlam1-2/+5
dependencies on the package are added through buildlink. Also show how to use EVAL_PREFIX to set BUILDLINK_PREFIX.foo.
2001-07-06Fix quoting problem in Solaris's "/bin/sh".tron1-2/+2
2001-07-02For aesthetic reasons, sort the *.lai files found during replace-buildlink.jlam1-2/+3
2001-07-02Merge buildlink-fix-libtool-archives and buildlink-fix-config-scriptsjlam1-41/+25
into one target: replace-buildlink. Get rid of BUILDLINK_FIX_LIBTOOL_SED as it can be handled with REPLACE_BUILDLINK_SED.
2001-07-01Change example to have bsd.buildlink.mk file included at start of ajlam1-7/+11
package buildlink.mk file. Also change BUILDLINK_CONFIG_WRAPPER_SED.<pkgname> to BUILDLINK_CONFIG_WRAPPER_SED.
2001-06-29If USE_BUILDLINK_ONLY is set, then also set USE_CONFIG_WRAPPERjlam1-1/+9
automatically.
2001-06-28Create new variable BUILDLINK_CONFIG_WRAPPER_SED.<pkgname> that is addedjlam1-3/+7
to the sed expression used in the generated config script wrappers.
2001-06-26Remove a debugging printf/echo.jlam1-2/+1
2001-06-26Fix bug in the sed expression used to filter out libtool archives. It wasjlam1-2/+3
mangling "lib/libaviplay.so.0.0" to "y.so.0.0". Thanks to Tomasz Luchowski <zuntum@netbsd.org> for finding this.
2001-06-26Add code, similar to REPLACE_NCURSES, called REPLACE_BUILDLINK, thatjlam1-3/+30
replace ${BUILDLINK_DIR} in config scripts.
2001-06-23Factor out the sed expression used to fix libtool archives into a variable,jlam1-3/+6
BUILDLINK_FIX_LIBTOOL_SED, that may be appended to.
2001-06-21Add code that runs at post-build time to fix references to ${BUILDLINK_DIR}jlam1-1/+23
into ${LOCALBASE} in libtool archives if USE_LIBTOOL is defined.
2001-06-20Relax libtool archive regexp to match more .la files.jlam1-2/+2
2001-06-20Filter out libtool archive files from being linked into ${BUILDLINK_DIR}jlam1-3/+7
as they often add extra -L options to the compiler flags, which goes against the buildlink.mk philosophy.