[PATCH] Fix automake warnings

Dmitry V. Levin ldv@altlinux.org
Wed Dec 9 23:34:55 GMT 2020


Apparently, commit 2f02e81510946a4c8e9157ad0b72d92894b9acd7 that removed
$(EXEEXT) suffix from shared libraries was incomplete: it missed the
fact that some libraries were included into noinst_PROGRAMS, resulting
to the following automake warnings:

libasm/Makefile.am:66: warning: deprecated feature: target 'libasm.so' overrides 'libasm.so$(EXEEXT)'
libdw/Makefile.am:114: warning: deprecated feature: target 'libdw.so' overrides 'libdw.so$(EXEEXT)'
libelf/Makefile.am:116: warning: deprecated feature: target 'libelf.so' overrides 'libelf.so$(EXEEXT)'

Fix this by renaming noinst_PROGRAMS to noinst_DATA and removing no
longer needed lib{asm,dw,elf}_so_SOURCES variables.

Reported-by: Mark Wielaard <mark@klomp.org>
Fixes: 2f02e8151094 ("Drop $(EXEEXT) suffix from shared libraries")
Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 libasm/ChangeLog   | 5 +++++
 libasm/Makefile.am | 3 +--
 libdw/ChangeLog    | 5 +++++
 libdw/Makefile.am  | 3 +--
 libelf/ChangeLog   | 5 +++++
 libelf/Makefile.am | 3 +--
 6 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/libasm/ChangeLog b/libasm/ChangeLog
index 29c23bad..427aa741 100644
--- a/libasm/ChangeLog
+++ b/libasm/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libasm_so_SOURCES): Remove.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* Makefile.am (libasm.so$(EXEEXT)): Drop $(EXEEXT) suffix.
diff --git a/libasm/Makefile.am b/libasm/Makefile.am
index 4b55d530..b50fd947 100644
--- a/libasm/Makefile.am
+++ b/libasm/Makefile.am
@@ -35,7 +35,7 @@ VERSION = 1
 
 lib_LIBRARIES = libasm.a
 noinst_LIBRARIES = libasm_pic.a
-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
+noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
 pkginclude_HEADERS = libasm.h
 
 libasm_a_SOURCES = asm_begin.c asm_abort.c asm_end.c asm_error.c \
@@ -62,7 +62,6 @@ libasm_so_LDLIBS += -lpthread
 endif
 
 libasm_so_LIBS = libasm_pic.a
-libasm_so_SOURCES =
 libasm.so: $(srcdir)/libasm.map $(libasm_so_LIBS) $(libasm_so_DEPS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION) \
diff --git a/libdw/ChangeLog b/libdw/ChangeLog
index fbe2abc0..3eefcc86 100644
--- a/libdw/ChangeLog
+++ b/libdw/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libdw_so_SOURCES): Remove.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* Makefile.am (libdw.so$(EXEEXT)): Drop $(EXEEXT) suffix.
diff --git a/libdw/Makefile.am b/libdw/Makefile.am
index f21ee6ae..cc18a3d1 100644
--- a/libdw/Makefile.am
+++ b/libdw/Makefile.am
@@ -36,7 +36,7 @@ VERSION = 1
 
 lib_LIBRARIES = libdw.a
 noinst_LIBRARIES = libdw_pic.a
-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
+noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
 
 include_HEADERS = dwarf.h
 pkginclude_HEADERS = libdw.h known-dwarf.h
@@ -110,7 +110,6 @@ libdw_so_LIBS = ../libebl/libebl_pic.a ../backends/libebl_backends_pic.a \
 		../libdwfl/libdwfl_pic.a
 libdw_so_DEPS = ../lib/libeu.a ../libelf/libelf.so
 libdw_so_LDLIBS = $(libdw_so_DEPS) -ldl -lz $(argp_LDADD) $(fts_LIBS) $(obstack_LIBS) $(zip_LIBS) -pthread
-libdw_so_SOURCES =
 libdw.so: $(srcdir)/libdw.map $(libdw_so_LIBS) $(libdw_so_DEPS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION),--enable-new-dtags \
diff --git a/libelf/ChangeLog b/libelf/ChangeLog
index 0a9e36a2..646a3429 100644
--- a/libelf/ChangeLog
+++ b/libelf/ChangeLog
@@ -1,3 +1,8 @@
+2020-12-09  Dmitry V. Levin  <ldv@altlinux.org>
+
+	* Makefile.am (noinst_PROGRAMS): Rename to noinst_DATA.
+	(libelf_so_SOURCES): Remove.
+
 2020-11-30  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* Makefile.am (libelf.so$(EXEEXT)): Drop $(EXEEXT) suffix.
diff --git a/libelf/Makefile.am b/libelf/Makefile.am
index f8f2afeb..31046d18 100644
--- a/libelf/Makefile.am
+++ b/libelf/Makefile.am
@@ -36,7 +36,7 @@ VERSION = 1
 
 lib_LIBRARIES = libelf.a
 noinst_LIBRARIES = libelf_pic.a
-noinst_PROGRAMS = $(noinst_LIBRARIES:_pic.a=.so)
+noinst_DATA = $(noinst_LIBRARIES:_pic.a=.so)
 include_HEADERS = libelf.h gelf.h nlist.h
 
 noinst_HEADERS = abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \
@@ -112,7 +112,6 @@ libelf_so_LDLIBS += -lpthread
 endif
 
 libelf_so_LIBS = libelf_pic.a
-libelf_so_SOURCES =
 libelf.so: $(srcdir)/libelf.map $(libelf_so_LIBS) $(libelf_so_DEPS)
 	$(AM_V_CCLD)$(LINK) $(dso_LDFLAGS) -o $@ \
 		-Wl,--soname,$@.$(VERSION) \
-- 
ldv


More information about the Elfutils-devel mailing list