]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
build: avoid name transformations on libstdbuf
authorPádraig Brady <P@draigBrady.com>
Tue, 9 Sep 2014 14:50:07 +0000 (15:50 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 10 Sep 2014 14:45:42 +0000 (15:45 +0100)
* src/local.mk (transform): Skip the transformation for libstdbuf
since that should not be subject to name clashes, and we need
to reference the name directly in LD_PRELOAD etc.
* configure.ac: Add a comment on the coupling of pkglibexec_PROGRAMS
to $(transform).
Issue reported at https://trac.macports.org/ticket/44922
Improved by Nick Bowler

configure.ac
src/local.mk

index e061a0ad5a8fcdf4e0671697b6c67627e21f16c9..f45b06e3a6c3d40109e3b7773485a2772aca8aa7 100644 (file)
@@ -488,6 +488,8 @@ m4_include([m4/cu-progs.m4])
 
 # Now that we know which programs will actually be built, determine
 # which optional helper progs should be compiled.
+# Note it adding to pkglibexec_PROGRAMS, $(transform) in src/local.mk
+# may need to be updated accordingly.
 case " $optional_bin_progs " in
   *' stdbuf '*) pkglibexec_PROGRAMS='src/libstdbuf.so';;
   *) pkglibexec_PROGRAMS='';;
index c0d04d680c5fe37613b81a4bd872e0e6ab016f95..0a6f217e0ef2dc20118c28f78dfee1cc1a18c472 100644 (file)
@@ -336,11 +336,18 @@ copy_sources = \
   src/extent-scan.c \
   src/extent-scan.h
 
+# Don't apply prefix transformations to libstdbuf shared lib
+# as that's not generally needed, and we need to reference the
+# name directly in LD_PRELOAD etc.  In general it's surprising
+# that $(transform) is applied to libexec at all given that is
+# for internal package naming, not privy to $(transform).
+
 # Use 'ginstall' in the definition of PROGRAMS and in dependencies to avoid
 # confusion with the 'install' target.  The install rule transforms 'ginstall'
 # to install before applying any user-specified name transformations.
 
-transform = s/ginstall/install/; $(program_transform_name)
+transform = /libstdbuf/q;s/ginstall/install/;$(program_transform_name)
+
 src_ginstall_SOURCES = src/install.c src/prog-fprintf.c $(copy_sources) \
                       $(selinux_sources)