From 22359e265395fd2f8267190ef97f5417770e6206 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Mon, 15 Feb 2010 15:57:03 -0800 Subject: Clean up and consolidate automake magic to reduce duplication and to work with --disable-dependency-tracking. --- backends/ChangeLog | 4 ++++ backends/Makefile.am | 34 ++++++----------------------- config/ChangeLog | 4 ++++ config/eu.am | 60 ++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/ChangeLog | 4 ++++ lib/Makefile.am | 13 ++++-------- libasm/ChangeLog | 4 ++++ libasm/Makefile.am | 29 +++++-------------------- libcpu/ChangeLog | 4 ++++ libcpu/Makefile.am | 24 ++++++--------------- libdw/ChangeLog | 4 ++++ libdw/Makefile.am | 24 ++++----------------- libdwfl/ChangeLog | 2 ++ libdwfl/Makefile.am | 29 +++++-------------------- libebl/ChangeLog | 4 ++++ libebl/Makefile.am | 28 +++++------------------- libelf/ChangeLog | 4 ++++ libelf/Makefile.am | 24 ++------------------- src/ChangeLog | 2 ++ src/Makefile.am | 45 ++++++++++----------------------------- tests/ChangeLog | 2 ++ tests/Makefile.am | 23 +++++++------------- 22 files changed, 154 insertions(+), 217 deletions(-) create mode 100644 config/eu.am diff --git a/backends/ChangeLog b/backends/ChangeLog index b52d75dd..ff32f3c2 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,7 @@ +2010-02-15 Roland McGrath + + * Makefile.am: Use config/eu.am for common stuff. + 2010-01-05 Roland McGrath * arm_retval.c (arm_return_value_location): Use dwarf_aggregate_size. diff --git a/backends/Makefile.am b/backends/Makefile.am index 2aed6216..d859cc97 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2000-2009 Red Hat, Inc. +## Copyright (C) 2000-2010 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -24,17 +24,9 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DOBJDIR=\"$(shell pwd)\" -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif -AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \ - -std=gnu99 -INCLUDES = -I$(srcdir) -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ - -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \ - -I$(top_srcdir)/lib -I.. +include $(top_srcdir)/config/eu.am +INCLUDES += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ + -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw modules = i386 sh x86_64 ia64 alpha arm sparc ppc ppc64 s390 @@ -49,17 +41,11 @@ noinst_DATA = $(libebl_pic:_pic.a=.so) if MUDFLAP libelf = ../libelf/libelf.a libdw = ../libdw/libdw.a -libmudflap = -lmudflap else libelf = ../libelf/libelf.so libdw = ../libdw/libdw.so -libmudflap = endif - -textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi - - i386_SRCS = i386_init.c i386_symbol.c i386_corenote.c i386_cfi.c \ i386_retval.c i386_regs.c i386_auxv.c i386_syscall.c cpu_i386 = ../libcpu/libcpu_i386.a @@ -125,13 +111,6 @@ libebl_x86_64.so: $(cpu_x86_64) libebl_%.map: Makefile echo 'ELFUTILS_$(PACKAGE_VERSION) { global: $*_init; local: *; };' > $@ -%.os: %.c - if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ - -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ - then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - fi - install: install-am install-ebl-modules install-ebl-modules: $(mkinstalldirs) $(DESTDIR)$(libdir)/$(LIBEBL_SUBDIR) @@ -150,6 +129,5 @@ uninstall: uninstall-am noinst_HEADERS = libebl_CPU.h common-reloc.c linux-core-note.c x86_corenote.c EXTRA_DIST = $(foreach m,$(modules),$($(m)_SRCS)) $(modules:=_reloc.def) -CLEANFILES = *.gcno *.gcda \ - $(foreach m,$(modules),\ - libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS)) +CLEANFILES += $(foreach m,$(modules),\ + libebl_$(m).so $(am_libebl_$(m)_pic_a_OBJECTS)) diff --git a/config/ChangeLog b/config/ChangeLog index 798a2f93..1e61047e 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2010-02-15 Roland McGrath + + * eu.am: New file. + 2009-04-19 Roland McGrath * version.h.in: Revert last change. diff --git a/config/eu.am b/config/eu.am new file mode 100644 index 00000000..7cbdd249 --- /dev/null +++ b/config/eu.am @@ -0,0 +1,60 @@ +## Common automake fragments for elfutils subdirectory makefiles. +## +## Copyright (C) 2010 Red Hat, Inc. +## This file is part of Red Hat elfutils. +## +## Red Hat elfutils is free software; you can redistribute it and/or modify +## it under the terms of the GNU General Public License as published by the +## Free Software Foundation; version 2 of the License. +## +## Red Hat elfutils is distributed in the hope that it will be useful, but +## WITHOUT ANY WARRANTY; without even the implied warranty of +## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +## General Public License for more details. +## +## You should have received a copy of the GNU General Public License along +## with Red Hat elfutils; if not, write to the Free Software Foundation, +## Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. +## +## Red Hat elfutils is an included package of the Open Invention Network. +## An included package of the Open Invention Network is a package for which +## Open Invention Network licensees cross-license their patents. No patent +## license is granted, either expressly or impliedly, by designation as an +## included package. Should you wish to participate in the Open Invention +## Network licensing program, please visit www.openinventionnetwork.com +## . +## + +DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H +INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. +AM_CFLAGS = -std=gnu99 -Wall -Wshadow \ + $(if $($(*F)_no_Werror),,-Werror) \ + $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ + $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) \ + $($(*F)_CFLAGS) + +if MUDFLAP +AM_CFLAGS += -fmudflap +libmudflap = -lmudflap +else +libmudflap = +endif + +COMPILE.os = $(filter-out -fprofile-arcs -ftest-coverage $(no_mudflap.os),\ + $(COMPILE)) + +%.os: %.c %.o +if AMDEP + if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ + -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ + then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ + rm -f "$(DEPDIR)/$*.Tpo"; \ + else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ + fi +else + $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED $< +endif + +CLEANFILES = *.gcno *.gcda + +textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi diff --git a/lib/ChangeLog b/lib/ChangeLog index 73f8e73a..089747aa 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2010-02-15 Roland McGrath + + * Makefile.am: Use config/eu.am for common stuff. + 2009-08-09 Roland McGrath * eu-config.h (OLD_VERSION, NEW_VERSION, COMPAT_VERSION): New macros. diff --git a/lib/Makefile.am b/lib/Makefile.am index b95d3e3b..50d55c56 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2001, 2002, 2004, 2005, 2008 Red Hat, Inc. +## Copyright (C) 1996-2010 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -24,14 +24,9 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif -AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra $($(*F)_CFLAGS) -INCLUDES = -I$(srcdir)/../libelf -I.. +include $(top_srcdir)/config/eu.am +AM_CFLAGS += -fpic +INCLUDES += -I$(srcdir)/../libelf noinst_LIBRARIES = libeu.a diff --git a/libasm/ChangeLog b/libasm/ChangeLog index d0d40396..ef31dbb2 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,7 @@ +2010-02-15 Roland McGrath + + * Makefile.am: Use config/eu.am for common stuff. + 2009-01-10 Ulrich Drepper * Makefile.am: Use USE_LOCKS instead of USE_TLS. diff --git a/libasm/Makefile.am b/libasm/Makefile.am index 7d5e25d1..52de7a3b 100644 --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2002, 2004, 2005, 2006, 2008, 2009 Red Hat, Inc. +## Copyright (C) 2002-2010 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -24,22 +24,12 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif -AM_CFLAGS += -std=gnu99 -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -INCLUDES = -I. -I$(srcdir) -I.. \ - -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw\ - -I$(top_srcdir)/lib +include $(top_srcdir)/config/eu.am +INCLUDES += -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw + GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) VERSION = 1 -COMPILE.os = $(filter-out -fprofile-arcs, $(filter-out -ftest-coverage, \ - $(COMPILE))) - lib_LIBRARIES = libasm.a if !MUDFLAP noinst_LIBRARIES = libasm_pic.a @@ -79,15 +69,6 @@ libasm.so: libasm_pic.a libasm.map if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi ln -fs $@ $@.$(VERSION) - -%.os: %.c %.o - if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ - -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ - then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ - rm -f "$(DEPDIR)/$*.Tpo"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - fi - install: install-am libasm.so $(mkinstalldirs) $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) libasm.so $(DESTDIR)$(libdir)/libasm-$(PACKAGE_VERSION).so @@ -104,4 +85,4 @@ endif noinst_HEADERS = libasmP.h symbolhash.h EXTRA_DIST = libasm.map -CLEANFILES = $(am_libasm_pic_a_OBJECTS) *.gcno *.gcda libasm.so.$(VERSION) +CLEANFILES += $(am_libasm_pic_a_OBJECTS) libasm.so.$(VERSION) diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index 738af57a..9d517fc8 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -1,3 +1,7 @@ +2010-02-15 Roland McGrath + + * Makefile.am: Use config/eu.am for common stuff. + 2009-04-14 Roland McGrath * Makefile.am (AM_CFLAGS): Add -fdollars-in-identifiers; it is not the diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am index 923556f6..ca334bb6 100644 --- a/libcpu/Makefile.am +++ b/libcpu/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2002, 2004, 2005, 2007, 2008, 2009 Red Hat, Inc. +## Copyright (C) 2002-2010 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -24,26 +24,14 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif -AM_CFLAGS += -Wall -Wshadow -Wunused -Wextra -std=gnu99 -fpic \ - -fdollars-in-identifiers \ - $($(*F)_CFLAGS) \ - $(if $($(*F)_no_Werror),,-Werror) -INCLUDES = -I$(srcdir) -I$(srcdir)/../lib -I$(srcdir)/../libelf \ - -I$(srcdir)/../libebl -I$(srcdir)/../libdw -I$(srcdir)/../libasm +include $(top_srcdir)/config/eu.am +INCLUDES += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ + -I$(srcdir)/../libdw -I$(srcdir)/../libasm +AM_CFLAGS += -fpic -fdollars-in-identifiers LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$( + + * Makefile.am: Use config/eu.am for common stuff. + 2010-02-02 Mark Wielaard * fde.c (intern_fde): Fix length check for sized_augmentation_data. diff --git a/libdw/Makefile.am b/libdw/Makefile.am index 23896fa6..4bd0f2a8 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -24,22 +24,14 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DIS_LIBDW -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif +include $(top_srcdir)/config/eu.am +DEFS += -DIS_LIBDW if BUILD_STATIC AM_CFLAGS += -fpic endif -AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99 -INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I.. -I$(srcdir)/../lib +INCLUDES += -I$(srcdir)/../libelf VERSION = 1 -COMPILE.os = $(filter-out -fprofile-arcs, $(filter-out -ftest-coverage, \ - $(COMPILE))) - lib_LIBRARIES = libdw.a if !MUDFLAP noinst_LIBRARIES = libdw_pic.a @@ -117,14 +109,6 @@ libdw.so: $(srcdir)/libdw.map libdw_pic.a \ if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi ln -fs $@ $@.$(VERSION) -%.os: %.c %.o - if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ - -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ - then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ - rm -f "$(DEPDIR)/$*.Tpo"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - fi - install: install-am libdw.so $(mkinstalldirs) $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) libdw.so $(DESTDIR)$(libdir)/libdw-$(PACKAGE_VERSION).so @@ -145,4 +129,4 @@ noinst_HEADERS = libdwP.h memory-access.h dwarf_abbrev_hash.h \ EXTRA_DIST = libdw.map -MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) *.gcno *.gcda libdw.so.$(VERSION) +MOSTLYCLEANFILES = $(am_libdw_pic_a_OBJECTS) libdw.so.$(VERSION) diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index f6d3eaff..833c2a51 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,5 +1,7 @@ 2010-02-15 Roland McGrath + * Makefile.am: Use config/eu.am for common stuff. + * find-debuginfo.c (find_debuginfo_in_path): Fix uninitialized variable in failure path. diff --git a/libdwfl/Makefile.am b/libdwfl/Makefile.am index 69bef7d9..8ec1f4fa 100644 --- a/libdwfl/Makefile.am +++ b/libdwfl/Makefile.am @@ -2,7 +2,7 @@ ## ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2005, 2006, 2007, 2008, 2009 Red Hat, Inc. +## Copyright (C) 2005-2010 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -26,20 +26,11 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif -AM_CFLAGS += -Wall -Werror -Wshadow -Wunused -Wformat=2 -Wextra -std=gnu99 -INCLUDES = -I. -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ - -I$(srcdir)/../libdw -I.. -I$(srcdir)/../lib +include $(top_srcdir)/config/eu.am +INCLUDES += -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ + -I$(srcdir)/../libdw VERSION = 1 -COMPILE.os = $(filter-out -fprofile-arcs, $(filter-out -ftest-coverage, \ - $(COMPILE))) - noinst_LIBRARIES = libdwfl.a if !MUDFLAP noinst_LIBRARIES += libdwfl_pic.a @@ -90,7 +81,6 @@ if MUDFLAP libdwfl = libdwfl.a $(libdw) $(libebl) $(libelf) $(libeu) libdw = ../libdw/libdw.a libelf = ../libelf/libelf.a -libmudflap = -lmudflap else libdwfl = $(libdw) libdw = ../libdw/libdw.so @@ -99,20 +89,11 @@ endif libebl = ../libebl/libebl.a libeu = ../lib/libeu.a - if !MUDFLAP libdwfl_pic_a_SOURCES = am_libdwfl_pic_a_OBJECTS = $(libdwfl_a_SOURCES:.c=.os) - -%.os: %.c %.o - if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ - -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ - then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ - rm -f "$(DEPDIR)/$*.Tpo"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - fi endif noinst_HEADERS = libdwflP.h -CLEANFILES = $(am_libdwfl_pic_a_OBJECTS) +CLEANFILES += $(am_libdwfl_pic_a_OBJECTS) diff --git a/libebl/ChangeLog b/libebl/ChangeLog index aaa1c86d..ed9361c1 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,7 @@ +2010-02-15 Roland McGrath + + * Makefile.am: Use config/eu.am for common stuff. + 2010-01-04 Roland McGrath * eblcorenote.c (ebl_core_note): Take GElf_Nhdr * and name data diff --git a/libebl/Makefile.am b/libebl/Makefile.am index a95e66d6..d157195e 100644 --- a/libebl/Makefile.am +++ b/libebl/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 2000-2009 Red Hat, Inc. +## Copyright (C) 2000-2010 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -24,19 +24,10 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DOBJDIR=\"$(shell pwd)\" -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif -AM_CFLAGS += -fpic -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 \ - -std=gnu99 - -INCLUDES = -I$(srcdir) -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw \ - -I$(top_srcdir)/lib -I.. -I$(srcdir)/../libasm +include $(top_srcdir)/config/eu.am +AM_CFLAGS += -fpic +INCLUDES += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm VERSION = 1 -PACKAGE_VERSION = @PACKAGE_VERSION@ LIBEBL_SUBDIR = @LIBEBL_SUBDIR@ lib_LIBRARIES = libebl.a @@ -63,15 +54,6 @@ gen_SOURCES = eblopenbackend.c eblclosebackend.c eblstrtab.c \ libebl_a_SOURCES = $(gen_SOURCES) - -%.os: %.c %.o - if $(COMPILE) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ - -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ - then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ - rm -f "$(DEPDIR)/$*.Tpo"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - fi - noinst_HEADERS = libeblP.h ebl-hooks.h -CLEANFILES = $(am_libebl_pic_a_OBJECTS) *.gcno *.gcda +CLEANFILES += $(am_libebl_pic_a_OBJECTS) diff --git a/libelf/ChangeLog b/libelf/ChangeLog index c71c5638..303975b3 100644 --- a/libelf/ChangeLog +++ b/libelf/ChangeLog @@ -1,3 +1,7 @@ +2010-02-15 Roland McGrath + + * Makefile.am: Use config/eu.am for common stuff. + 2010-01-07 Roland McGrath * elf32_getphdr.c: Use __elf_getphdrnum_rdlock. diff --git a/libelf/Makefile.am b/libelf/Makefile.am index b277e944..c7c83f35 100644 --- a/libelf/Makefile.am +++ b/libelf/Makefile.am @@ -24,24 +24,12 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif +include $(top_srcdir)/config/eu.am if BUILD_STATIC AM_CFLAGS += -fpic endif -AM_CFLAGS += -Wall -Wshadow -Werror -Wunused -Wextra -Wformat=2 -std=gnu99 \ - $($(*F)_CFLAGS) -INCLUDES = -I$(srcdir) -I$(top_srcdir)/lib -I.. GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) VERSION = 1 -PACKAGE_VERSION = @PACKAGE_VERSION@ - -COMPILE.os = $(filter-out -fprofile-arcs, $(filter-out -ftest-coverage, \ - $(COMPILE))) lib_LIBRARIES = libelf.a if !MUDFLAP @@ -118,14 +106,6 @@ libelf.so: libelf_pic.a libelf.map if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi ln -fs $@ $@.$(VERSION) -%.os: %.c %.o - if $(COMPILE.os) -c -o $@ -fpic -DPIC -DSHARED -MT $@ -MD -MP \ - -MF "$(DEPDIR)/$*.Tpo" `test -f '$<' || echo '$(srcdir)/'`$<; \ - then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ - rm -f "$(DEPDIR)/$*.Tpo"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - fi - install: install-am libelf.so $(mkinstalldirs) $(DESTDIR)$(libdir) $(INSTALL_PROGRAM) libelf.so $(DESTDIR)$(libdir)/libelf-$(PACKAGE_VERSION).so @@ -142,4 +122,4 @@ noinst_HEADERS = elf.h abstract.h common.h exttypes.h gelf_xlate.h libelfP.h \ version_xlate.h gnuhash_xlate.h note_xlate.h dl-hash.h EXTRA_DIST = libelf.map -CLEANFILES = $(am_libelf_pic_a_OBJECTS) *.gcno *.gcda libelf.so.$(VERSION) +CLEANFILES += $(am_libelf_pic_a_OBJECTS) libelf.so.$(VERSION) diff --git a/src/ChangeLog b/src/ChangeLog index f9f98ac1..0b7c51a6 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,7 @@ 2010-02-15 Roland McGrath + * Makefile.am: Use config/eu.am for common stuff. + * readelf.c (print_debug_frame_section): Add a cast to avoid sign mismatch in comparison. diff --git a/src/Makefile.am b/src/Makefile.am index 9b7d7f0f..afd3bd3a 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2002, 2003, 2004, 2005, 2006, 2007, 2009 Red Hat, Inc. +## Copyright (C) 1996-2010 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -24,24 +24,17 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H $(YYDEBUG) -DDEBUGPRED=@DEBUGPRED@ \ - -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\" -if MUDFLAP -AM_CFLAGS = -fmudflap -else -AM_CFLAGS = -endif -AM_CFLAGS += -Wall -Wshadow -std=gnu99 $(native_ld_cflags) \ - $(if $($(*F)_no_Werror),,-Werror) \ - $(if $($(*F)_no_Wunused),,-Wunused -Wextra) \ - $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) $(CFLAGS_$(*F)) - -INCLUDES = -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ - -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ - -I$(srcdir)/../libasm -I$(srcdir)/../lib -I.. +include $(top_srcdir)/config/eu.am +DEFS += $(YYDEBUG) -DDEBUGPRED=@DEBUGPRED@ \ + -DSRCDIR=\"$(shell cd $(srcdir);pwd)\" -DOBJDIR=\"$(shell pwd)\" +INCLUDES += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ + -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ + -I$(srcdir)/../libasm AM_LDFLAGS = -Wl,-rpath-link,../libelf:../libdw +no_mudflap.os = -fmudflap + YACC = @YACC@ -d AM_YFLAGS = -pld AM_LFLAGS = -Pld -olex.yy.c @@ -70,8 +63,6 @@ noinst_LIBRARIES += libdummy.a libdummy_a_SOURCES = i386_ld.c endif -textrel_check = if readelf -d $@ | fgrep -q TEXTREL; then exit 1; fi - ld_SOURCES = ld.c ldgeneric.c ldlex.l ldscript.y symbolhash.c sectionhash.c \ versionhash.c @@ -87,11 +78,7 @@ ld_modules = i386_ld.c bin_SCRIPTS = make-debug-archive EXTRA_DIST += make-debug-archive.in -CLEANFILES = make-debug-archive - -if MUDFLAP -libmudflap = -lmudflap -endif +CLEANFILES += make-debug-archive if BUILD_STATIC libasm = ../libasm/libasm.a @@ -151,16 +138,6 @@ libld_elf_i386.so: libld_elf_i386_pic.a libld_elf_i386.map $(textrel_check) endif - -%.os: %.c %.o - if $(filter-out -fmudflap,$(COMPILE)) -c -o $@ -fpic -DPIC -DSHARED \ - -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ - `test -f '$<' || echo '$(srcdir)/'`$<; \ - then cat "$(DEPDIR)/$*.Tpo" >> "$(DEPDIR)/$*.Po"; \ - rm -f "$(DEPDIR)/$*.Tpo"; \ - else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ - fi - # Special rule to make it possible to define libld_elf_a_SOURCES as we do. # Otherwise make would complain. .deps/none_ld.Po: none_ld.os @@ -183,7 +160,7 @@ installcheck-binPROGRAMS: $(bin_PROGRAMS) done; \ done; rm -f c$${pid}_.???; exit $$bad -CLEANFILES += none_ld.os $(ld_modules:.c=.os) *.gcno *.gcda *.gconv +CLEANFILES += none_ld.os $(ld_modules:.c=.os) *.gconv MAINTAINERCLEANFILES = ldlex.c ldscript.c ldscript.h diff --git a/tests/ChangeLog b/tests/ChangeLog index 29789e2b..c871baa1 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,5 +1,7 @@ 2010-02-15 Roland McGrath + * Makefile.am: Use config/eu.am for common stuff. + * asm-tst9.c (main): Rename local to avoid shadowing another local. 2009-07-22 Roland McGrath diff --git a/tests/Makefile.am b/tests/Makefile.am index 54d2c61a..1b9bc73b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -1,6 +1,6 @@ ## Process this file with automake to create Makefile.in ## -## Copyright (C) 1996-2009 Red Hat, Inc. +## Copyright (C) 1996-2010 Red Hat, Inc. ## This file is part of Red Hat elfutils. ## ## Red Hat elfutils is free software; you can redistribute it and/or modify @@ -24,26 +24,22 @@ ## Network licensing program, please visit www.openinventionnetwork.com ## . ## -DEFS = -DHAVE_CONFIG_H -D_GNU_SOURCE +include $(top_srcdir)/config/eu.am if MUDFLAP -AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 -fmudflap\ - $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) BUILD_RPATH = \$$ORIGIN/../backends else -AM_CFLAGS = -Wall -Werror -Wextra -std=gnu99 \ - $(if $($(*F)_no_Wformat),-Wno-format,-Wformat=2) BUILT_RPATH = \$$ORIGIN/../libasm:\$$ORIGIN/../libdw:\$$ORIGIN/../backends:\$$ORIGIN/../libelf endif AM_LDFLAGS = if !STANDALONE -INCLUDES = -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ - -I$(top_srcdir)/libdwfl \ - -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \ - -I$(top_srcdir)/lib -I.. +INCLUDES += -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ + -I$(top_srcdir)/libdwfl \ + -I$(top_srcdir)/libebl -I$(top_srcdir)/libelf \ + -I$(top_srcdir)/lib -I.. AM_LDFLAGS += -Wl,-rpath-link,../libasm:../libdw:../libelf -endif !STANDALONE +endif if TESTS_RPATH AM_LDFLAGS += -Wl,-rpath,$(BUILT_RPATH) @@ -161,7 +157,6 @@ endif !STANDALONE if MUDFLAP static_build = yes -libmudflap = -lmudflap endif if STANDALONE @@ -233,11 +228,9 @@ dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl sha1_tst_LDADD = $(libeu) $(libmudflap) -dwarf_getmacros_LDADD = $(libdw) +dwarf_getmacros_LDADD = $(libdw) $(libmudflap) addrcfi_LDADD = $(libdw) $(libebl) $(libelf) $(libmudflap) -ldl -CLEANFILES = xxx *.gcno *.gcda *gconv - if GCOV check: check-am coverage .PHONY: coverage -- cgit v1.2.1