From: Peter Rosin Date: Tue, 14 Feb 2012 01:56:39 +0000 (+0100) Subject: depcomp tests: do not specify LDFLAGS for static libraries X-Git-Tag: ng-0.5a~9^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4933232e195fa4650400990bfba4c88fae9b8a29;p=thirdparty%2Fautomake.git depcomp tests: do not specify LDFLAGS for static libraries Commit v1.11-1848-gb3f34ca accidentally specified LDFLAGS for libbaz even when built as a static library, which is not allowed. * tests/depcomp.sh (src/Makefile.am): Don't add any LDFLAGS when libbaz is built as a static library. --- diff --git a/tests/depcomp.sh b/tests/depcomp.sh index 9d8060dba..d14928048 100755 --- a/tests/depcomp.sh +++ b/tests/depcomp.sh @@ -158,6 +158,7 @@ case $depcomp_with_libtool in # explicit declaration, libtool falls back to a static library # only, regardless of any --enable-shared flags etc. LIBPRIMARY=LTLIBRARIES LINKADD=LIBADD NOUNDEF=-no-undefined + libbaz_ldflags="libbaz_${a}_LDFLAGS = $NOUNDEF" echo lib_LTLIBRARIES = libfoo.la >> Makefile.am make_ok () { @@ -175,6 +176,7 @@ case $depcomp_with_libtool in po=Po objext='$(OBJEXT)' a=a normalized_target=foo LIBPRIMARY=LIBRARIES LINKADD=LDADD NOUNDEF= + libbaz_ldflags= echo bin_PROGRAMS = foo >> Makefile.am make_ok () { @@ -192,7 +194,7 @@ SUBDIRS = src # We include subfoo only to be sure that the munging in depcomp # doesn't remove too much from the object file name. ${normalized_target}_SOURCES = foo.c sub/subfoo.c foo.h sub/subfoo.h -${normalized_target}_LDFLAGS = ${NOUNDEF} +${normalized_target}_LDFLAGS = $NOUNDEF ${normalized_target}_${LINKADD} = src/libbaz.$a .PHONY: grep-test @@ -215,7 +217,7 @@ noinst_${LIBPRIMARY} = libbaz.$a # We include sub2foo only to be sure that the munging in depcomp # doesn't remove too much from the object file name. libbaz_${a}_SOURCES = baz.c sub2/sub2foo.c baz.h sub2/sub2foo.h -libbaz_${a}_LDFLAGS = ${NOUNDEF} +$libbaz_ldflags END cat > foo.c <<'END'