]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Automake: use EXTRA_LTLIBRARIES instead of noinst_LTLIBRARIES
authorLuca Boccassi <luca.boccassi@microsoft.com>
Mon, 15 Mar 2021 12:16:08 +0000 (12:16 +0000)
committerLuca Boccassi <luca.boccassi@microsoft.com>
Mon, 15 Mar 2021 12:17:31 +0000 (12:17 +0000)
noinst_LTLIBRARIES causes the libraries to be always built
unconditionally. EXTRA_LTLIBRARIES causes them to be built
only if other build target needs them.
In other words, avoid building libcommon.a and libtcolors.a
unless they are needed by another library/executable and
save some build time.

https://www.gnu.org/software/automake/manual/html_node/Libtool-Convenience-Libraries.html

Makefile.am
lib/Makemodule.am

index 12cb86cba450942cb844a2eaa8111ce0c89883b0..dd887632794d4c7962d7a534814db6d69b47f8f3 100644 (file)
@@ -49,7 +49,7 @@ bashcompletiondir = @bashcompletiondir@
 
 dist_noinst_HEADERS =
 noinst_PROGRAMS =
-noinst_LTLIBRARIES =
+EXTRA_LTLIBRARIES =
 usrbin_exec_PROGRAMS =
 usrsbin_exec_PROGRAMS =
 dist_man_MANS =
index f975e0cd38c2750b6602f70e5dc73e8480278413..6a9187e487bf51d68bb2f574357df2308edf8f05 100644 (file)
@@ -9,7 +9,7 @@
 # Note that you need "make install-strip" (or proper rpm / Debian build)
 # to generate binaries with only relevant stuff.
 #
-noinst_LTLIBRARIES += libcommon.la
+EXTRA_LTLIBRARIES += libcommon.la
 libcommon_la_CFLAGS = $(AM_CFLAGS)
 libcommon_la_SOURCES = \
        lib/blkdev.c \
@@ -60,7 +60,7 @@ libcommon_la_SOURCES += lib/sysfs.c
 endif
 endif
 
-noinst_LTLIBRARIES += libtcolors.la
+EXTRA_LTLIBRARIES += libtcolors.la
 libtcolors_la_CFLAGS = $(AM_CFLAGS)
 libtcolors_la_SOURCES = lib/colors.c lib/color-names.c include/colors.h include/color-names.h
 libtcolors_la_LIBADD =