diff options
author | Stefano Lattarini <stefano.lattarini@gmail.com> | 2012-08-30 18:19:54 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2012-08-31 12:22:09 +0200 |
commit | c1269eee5ceabe4ab2ff73db04aa522295ba96b4 (patch) | |
tree | d4713dadcde5e725c3ff8ed921453d26d0329d98 /src | |
parent | a159d594facba612e60d58539eeba80e2a0d3413 (diff) | |
download | coreutils-c1269eee5ceabe4ab2ff73db04aa522295ba96b4.tar.xz |
build: don't use foo_LDADD if there's no foo program
For example, instead of factoring out the extra linker flags needed
by 'cp', 'mv' ind 'install' into a '$(copy_LDADD)' variable, factor
them out in a '$(copy_ldadd)' variable.
Partly a minor cleanup, partly a preparation for future changes.
* src/Makefile.am (copy_LDADD): Rename ...
(copy_ldadd): ... like this.
(remove_LDADD): Rename ...
(remove_ldadd): ... like this.
All uses adjusted. Some comments updated.
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.am | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/src/Makefile.am b/src/Makefile.am index 896c90203..63c2b11c8 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -177,6 +177,10 @@ nodist_libver_a_SOURCES = version.c version.h # Tell the linker to omit references to unused shared libraries. AM_LDFLAGS = $(IGNORE_UNUSED_LIBRARIES_CFLAGS) +# Extra libraries needed by more than one program. Will be updated later. +copy_ldadd = +remove_ldadd = + # Sometimes, the expansion of $(LIBINTL) includes -lc which may # include modules defining variables like 'optind', so libcoreutils.a # must precede $(LIBINTL) in order to ensure we use GNU getopt. @@ -297,25 +301,22 @@ __LDADD = $(test_LDADD) dir_LDADD = $(ls_LDADD) vdir_LDADD = $(ls_LDADD) -# Shared files -copy_LDADD = -cp_LDADD += $(copy_LDADD) -ginstall_LDADD += $(copy_LDADD) -mv_LDADD += $(copy_LDADD) +cp_LDADD += $(copy_ldadd) +ginstall_LDADD += $(copy_ldadd) +mv_LDADD += $(copy_ldadd) -remove_LDADD = -mv_LDADD += $(remove_LDADD) -rm_LDADD += $(remove_LDADD) +mv_LDADD += $(remove_ldadd) +rm_LDADD += $(remove_ldadd) # for eaccess, euidaccess -copy_LDADD += $(LIB_EACCESS) -remove_LDADD += $(LIB_EACCESS) +copy_ldadd += $(LIB_EACCESS) +remove_ldadd += $(LIB_EACCESS) sort_LDADD += $(LIB_EACCESS) test_LDADD += $(LIB_EACCESS) # for selinux use +copy_ldadd += $(LIB_SELINUX) chcon_LDADD += $(LIB_SELINUX) -copy_LDADD += $(LIB_SELINUX) ginstall_LDADD += $(LIB_SELINUX) id_LDADD += $(LIB_SELINUX) ls_LDADD += $(LIB_SELINUX) @@ -326,7 +327,7 @@ runcon_LDADD += $(LIB_SELINUX) stat_LDADD += $(LIB_SELINUX) # for gettime, settime, utimecmp, utimens -copy_LDADD += $(LIB_CLOCK_GETTIME) +copy_ldadd += $(LIB_CLOCK_GETTIME) date_LDADD += $(LIB_CLOCK_GETTIME) ginstall_LDADD += $(LIB_CLOCK_GETTIME) ls_LDADD += $(LIB_CLOCK_GETTIME) @@ -357,11 +358,11 @@ factor_LDADD += $(LIB_GMP) uptime_LDADD += $(GETLOADAVG_LIBS) # for various ACL functions -copy_LDADD += $(LIB_ACL) +copy_ldadd += $(LIB_ACL) ls_LDADD += $(LIB_ACL) # for various xattr functions -copy_LDADD += $(LIB_XATTR) +copy_ldadd += $(LIB_XATTR) # for print_unicode_char, proper_name_utf8 cat_LDADD += $(LIBICONV) |