This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH v2] Allow to disable components


Signed-off-by: Akihiko Odaki <akihiko.odaki.4i@stu.hosei.ac.jp>
---
 Makefile.am              |  31 ++++++-
 configure.ac             | 127 ++++++++++++++++++++++-------
 lib/system.h             |   9 ++-
 tests/Makefile.am        | 205 +++++++++++++++++++++++++++--------------------
 tests/run-low_high_pc.sh |   4 +-
 tests/test-subr.sh       |   3 +-
 6 files changed, 255 insertions(+), 124 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 2ff444e..a52fc34 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,8 +27,35 @@ AM_MAKEFLAGS = --no-print-directory
 pkginclude_HEADERS = version.h
 
 # Add doc back when we have some real content.
-SUBDIRS = config m4 lib libelf libebl libdwelf libdwfl libdw libcpu libasm \
-	  backends src po tests
+SUBDIRS = config m4 po tests
+
+if HAVE_LIBEU
+SUBDIRS += lib
+endif
+
+if HAVE_LIBEBL
+SUBDIRS += libebl
+endif
+
+if HAVE_LIBELF
+SUBDIRS += libelf
+endif
+
+if HAVE_LIBDW
+SUBDIRS += libdwelf libdwfl libdw
+endif
+
+if HAVE_LIBEBL
+SUBDIRS += libcpu backends
+endif
+
+if HAVE_LIBASM
+SUBDIRS += libasm
+endif
+
+if HAVE_TOOLS
+SUBDIRS += src
+endif
 
 EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
 	     COPYING COPYING-GPLV2 COPYING-LGPLV3
diff --git a/configure.ac b/configure.ac
index e5503f1..33e0df5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -214,6 +214,38 @@ AS_HELP_STRING([--enable-tests-rpath],[build $ORIGIN-using rpath into tests]),
 	       [tests_use_rpath=$enableval], [tests_use_rpath=no])
 AM_CONDITIONAL(TESTS_RPATH, test "$tests_use_rpath" = yes)
 
+AC_ARG_ENABLE([tools],
+AS_HELP_STRING([--disable-tools], [do not build tools]),
+	       [tools=$enableval], [tools=yes])
+
+AC_ARG_ENABLE([libasm],
+AS_HELP_STRING([--disable-libasm], [do not build libasm]),
+	       [libasm=$enableval], [libasm=yes])
+
+AC_ARG_ENABLE([libdw],
+AS_HELP_STRING([--disable-libdw], [do not build libdw]),
+	       [libdw=$enableval], [libdw=yes])
+
+AC_ARG_ENABLE([libebl],
+AS_HELP_STRING([--disable-libebl], [do not build libebl]),
+	       [libebl=$enableval], [libebl=yes])
+
+AC_ARG_ENABLE([libelf],
+AS_HELP_STRING([--disable-libelf], [do not build libelf]),
+	       [libelf=$enableval], [libelf=yes])
+
+AS_IF([test "$libasm" = yes -a "$libdw$libebl" != yesyes],
+      [AC_MSG_ERROR([libasm requires libdw and libebl])])
+
+AS_IF([test "$libdw" = yes -a "$libebl$libelf" != yesyes],
+      [AC_MSG_ERROR([libdw requires libebl and libelf])])
+
+AS_IF([test "$libebl" = yes -a "$libdw$libelf" != yesyes],
+      [AC_MSG_ERROR([libebl requires libdw and libelf])])
+
+AS_IF([test "$tools" = yes -a "$libasm$libdw$libelf$libebl" != yesyesyesyes],
+      [AC_MSG_ERROR([tools requires libasm, libdw, libelf, and libebl])])
+
 LIBEBL_SUBDIR="$PACKAGE"
 AC_ARG_ENABLE([libebl-subdir],
 AS_HELP_STRING([--enable-libebl-subdir=DIR],
@@ -306,30 +338,32 @@ CFLAGS="$old_CFLAGS"])
 AM_CONDITIONAL(HAVE_NULL_DEREFERENCE_WARNING,
 	       [test "x$ac_cv_null_dereference" != "xno"])
 
-dnl Check if we have argp available from our libc
-AC_LINK_IFELSE(
-	[AC_LANG_PROGRAM(
-		[#include <argp.h>],
-		[int argc=1; char *argv[]={"test"}; argp_parse(0,argc,&argv,0,0,0); return 0;]
-		)],
-	[libc_has_argp="true"],
-	[libc_has_argp="false"]
-)
-
-dnl If our libc doesn't provide argp, then test for libargp
-if test "$libc_has_argp" = "false" ; then
-	AC_MSG_WARN("libc does not have argp")
-	AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
-
-	if test "$have_argp" = "false"; then
-		AC_MSG_ERROR("no libargp found")
+if test "$libdw" = yes ; then
+	dnl Check if we have argp available from our libc
+	AC_LINK_IFELSE(
+		[AC_LANG_PROGRAM(
+			[#include <argp.h>],
+			[int argc=1; char *argv[]={"test"}; argp_parse(0,argc,&argv,0,0,0); return 0;]
+			)],
+		[libc_has_argp="true"],
+		[libc_has_argp="false"]
+	)
+
+	dnl If our libc doesn't provide argp, then test for libargp
+	if test "$libc_has_argp" = "false" ; then
+		AC_MSG_WARN("libc does not have argp")
+		AC_CHECK_LIB([argp], [argp_parse], [have_argp="true"], [have_argp="false"])
+
+		if test "$have_argp" = "false"; then
+			AC_MSG_ERROR("no libargp found")
+		else
+			argp_LDADD="-largp"
+		fi
 	else
-		argp_LDADD="-largp"
+		argp_LDADD=""
 	fi
-else
-	argp_LDADD=""
+	AC_SUBST([argp_LDADD])
 fi
-AC_SUBST([argp_LDADD])
 
 dnl Check if we have <linux/bpf.h> for EM_BPF disassembly.
 AC_CHECK_HEADERS(linux/bpf.h)
@@ -342,35 +376,61 @@ dnl Commented out for now.
 dnl AC_CONFIG_FILES([doc/Makefile])
 
 dnl Support library.
-AC_CONFIG_FILES([lib/Makefile])
+AM_CONDITIONAL(HAVE_LIBEU, test "$libdw" = yes -o "$libebl" = yes)
+if test "$libdw" = yes -o "$libebl" = yes ; then
+	AC_CONFIG_FILES([lib/Makefile])
+fi
 
 dnl ELF library.
+AM_CONDITIONAL(HAVE_LIBELF, test "$libelf" = yes)
 AC_CONFIG_FILES([libelf/Makefile])
 
 dnl Higher-level ELF support library.
-AC_CONFIG_FILES([libebl/Makefile])
+AM_CONDITIONAL(HAVE_LIBEBL, test "$libebl" = yes)
+if test "$libebl" = yes ; then
+	AC_CONFIG_FILES([libebl/Makefile])
+fi
+
+AM_CONDITIONAL(HAVE_LIBDW, test "$libdw" = yes)
 
 dnl DWARF-ELF Lower-level Functions support library.
-AC_CONFIG_FILES([libdwelf/Makefile])
+if test "$libdw" = yes; then
+	AC_CONFIG_FILES([libdwelf/Makefile])
+fi
 
 dnl DWARF library.
-AC_CONFIG_FILES([libdw/Makefile])
+if test "$libdw" = yes; then
+	AC_CONFIG_FILES([libdw/Makefile])
+fi
 
 dnl Higher-level DWARF support library.
-AC_CONFIG_FILES([libdwfl/Makefile])
+if test "$libdw" = yes; then
+	AC_CONFIG_FILES([libdwfl/Makefile])
+fi
 
 dnl CPU handling library.
-AC_CONFIG_FILES([libcpu/Makefile])
+if test "$libebl" = yes; then
+	AC_CONFIG_FILES([libcpu/Makefile])
+fi
 
 dnl Assembler library.
-AM_CONDITIONAL(HAVE_LIBASM, true)dnl Used in tests/Makefile.am, which see.
-AC_CONFIG_FILES([libasm/Makefile])
+AM_CONDITIONAL(HAVE_LIBASM, test "$libasm" = yes)dnl Used in tests/Makefile.am, which see.
+if test "$libasm" = yes; then
+	AC_CONFIG_FILES([libasm/Makefile])
+fi
 
 dnl CPU-specific backend libraries.
-AC_CONFIG_FILES([backends/Makefile])
+if test "$libebl" = yes; then
+	AC_CONFIG_FILES([backends/Makefile])
+fi
 
 dnl Tools.
-AC_CONFIG_FILES([src/Makefile po/Makefile.in])
+AM_CONDITIONAL(HAVE_TOOLS, test "$tools" = yes)
+if test "$tools" = yes ; then
+	AC_CONFIG_FILES([src/Makefile])
+fi
+
+AC_CONFIG_FILES([po/Makefile.in])
 
 dnl Test suite.
 AM_CONDITIONAL(STANDALONE, false)dnl Used in tests/Makefile.am, which see.
@@ -384,6 +444,11 @@ AC_CONFIG_FILES([config/libelf.pc config/libdw.pc])
 AC_SUBST(USE_NLS, yes)
 AM_PO_SUBDIRS
 
+AH_TEMPLATE([ENABLE_ARGP], [Defined if argp is enabled.])
+if test "$libdw" = yes ; then
+	AC_DEFINE([ENABLE_ARGP])
+fi
+
 dnl Appended to the config.h file.
 dnl We hide all kinds of configuration magic in lib/eu-config.h.
 AH_BOTTOM([#include <eu-config.h>])
diff --git a/lib/system.h b/lib/system.h
index f31cfd0..d8aa33a 100644
--- a/lib/system.h
+++ b/lib/system.h
@@ -29,7 +29,12 @@
 #ifndef LIB_SYSTEM_H
 #define LIB_SYSTEM_H	1
 
-#include <argp.h>
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+#ifdef ENABLE_ARGP
+# include <argp.h>
+#endif
 #include <stddef.h>
 #include <stdint.h>
 #include <endian.h>
@@ -126,6 +131,7 @@ pread_retry (int fd, void *buf, size_t len, off_t off)
 }
 
 
+#ifdef ENABLE_ARGP
 /* We need define two variables, argp_program_version_hook and
    argp_program_bug_address, in all programs.  argp.h declares these
    variables as non-const (which is correct in general).  But we can
@@ -136,6 +142,7 @@ pread_retry (int fd, void *buf, size_t len, off_t off)
    __asm ("argp_program_version_hook")
 #define ARGP_PROGRAM_BUG_ADDRESS_DEF \
   const char *const apba__ __asm ("argp_program_bug_address")
+#endif
 
 
 /* The demangler from libstdc++.  */
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e331cb5..5a99d2d 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -36,28 +36,99 @@ else
 tests_rpath = no
 endif
 
-check_PROGRAMS = arextract arsymtest newfile saridx scnnames sectiondump \
-		  showptable update1 update2 update3 update4 test-nlist \
-		  show-die-info get-files get-lines get-pubnames \
-		  get-aranges allfcts line2addr addrscopes funcscopes \
-		  show-abbrev hash newscn ecp dwflmodtest \
-		  find-prologues funcretval allregs rdwrmmap \
-		  dwfl-bug-addr-overflow arls dwfl-bug-fd-leak \
-		  dwfl-addr-sect dwfl-bug-report early-offscn \
-		  dwfl-bug-getmodules dwarf-getmacros dwarf-ranges addrcfi \
-		  test-flag-nobits dwarf-getstring rerequest_tag \
-		  alldts md5-sha1-test typeiter typeiter2 low_high_pc \
-		  test-elf_cntl_gelf_getshdr dwflsyms dwfllines \
-		  dwfl-report-elf-align varlocs backtrace backtrace-child \
-		  backtrace-data backtrace-dwarf debuglink debugaltlink \
-		  buildid deleted deleted-lib.so aggregate_size vdsosyms \
-		  getsrc_die strptr newdata elfstrtab dwfl-proc-attach \
-		  elfshphehdr elfstrmerge dwelfgnucompressed elfgetchdr \
-		  elfgetzdata elfputzdata zstrptr emptyfile vendorelf
+check_PROGRAMS =  early-offscn test-elf_cntl_gelf_getshdr deleted deleted-lib.so
 
 asm_TESTS = asm-tst1 asm-tst2 asm-tst3 asm-tst4 asm-tst5 \
 	    asm-tst6 asm-tst7 asm-tst8 asm-tst9
 
+dw_TESTS = update3 update4 dwfl-bug-addr-overflow dwfl-bug-fd-leak \
+	   dwfl-bug-report dwfl-proc-attach vdsosyms
+
+dw_TESTPROGRAMS = $(dw_TESTS) show-die-info get-pubnames show-abbrev \
+		  get-lines get-files get-aranges allfcts line2addr addrscopes \
+		  funcscopes funcretval allregs find-prologues dwflmodtest \
+		  dwfl-addr-sect dwarf-getmacros dwarf-ranges addrcfi \
+		  dwarf-getstring rerequest_tag alldts typeiter \
+		  low_high_pc dwfllines dwfl-report-elf-align varlocs \
+		  backtrace backtrace-child backtrace-data backtrace-dwarf \
+		  debuglink debugaltlink buildid aggregate_size getsrc_die \
+		  elfstrmerge dwelfgnucompressed elfgetchdr
+
+dw_TESTRUNNERS = $(dw_TESTS) run-show-die-info.sh \
+		 run-get-pubnames.sh run-show-abbrev.sh \
+		 run-get-lines.sh run-get-files.sh \
+		 run-get-aranges.sh run-allfcts.sh run-allfcts-multi.sh \
+		 run-line2addr.sh run-addrscopes.sh \
+		 run-funcscopes.sh run-funcretval.sh \
+		 run-allregs.sh run-native-test.sh run-find-prologues.sh \
+		 run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
+		 run-dwarf-getmacros.sh run-dwarf-ranges.sh \
+		 run-addrcfi.sh run-dwarf-getstring.sh \
+		 run-rerequest_tag.sh run-alldts.sh \
+		 run-typeiter.sh run-low_high_pc.sh \
+		 run-dwfllines.sh run-dwfl-report-elf-align.sh \
+		 run-varlocs.sh run-backtrace-native.sh \
+		 run-backtrace-data.sh run-backtrace-dwarf.sh \
+		 run-backtrace-native-biarch.sh run-backtrace-native-core.sh \
+		 run-backtrace-native-core-biarch.sh \
+		 run-backtrace-core-x86_64.sh run-backtrace-core-x32.sh \
+		 run-backtrace-core-i386.sh run-backtrace-core-ppc.sh \
+		 run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
+		 run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \
+		 run-backtrace-demangle.sh \
+		 run-debuglink.sh run-debugaltlink.sh \
+		 run-buildid.sh run-aggregate-size.sh \
+		 run-getsrc-die.sh run-elfstrmerge-test.sh \
+		 run-dwelfgnucompressed.sh run-elfgetchdr.sh
+
+elf_TESTS = newfile hash test-nlist newscn update1 update2 newdata elfstrtab \
+	    elfshphehdr emptyfile vendorelf
+
+elf_TESTPROGRAMS = $(elf_TESTS) arextract arsymtest ecp rdwrmmap \
+		   test-flag-nobits strptr elfgetzdata elfputzdata \
+		   zstrptr
+
+elf_TESTRUNNERS = $(elf_TESTS) run-arextract.sh \
+		   run-arsymtest.sh run-ecp-test.sh \
+		   run-ecp-test2.sh run-bug1-test.sh \
+		   run-test-flag-nobits.sh run-strptr.sh \
+		   run-elfgetzdata.sh run-elfputzdata.sh \
+		   run-zstrptr.sh
+
+tools_TESTRUNNERS = run-strip-test.sh run-strip-test2.sh \
+		    run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
+		    run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
+		    run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
+		    run-strip-groups.sh run-strip-reloc.sh \
+		    run-strip-strmerge.sh run-strip-nobitsalign.sh \
+		    run-unstrip-test.sh run-unstrip-test2.sh \
+		    run-unstrip-test3.sh run-unstrip-M.sh \
+		    run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
+		    run-ranlib-test2.sh run-ranlib-test3.sh \
+		    run-ranlib-test4.sh run-strings-test.sh \
+		    run-nm-self.sh run-readelf-self.sh \
+		    run-readelf-test1.sh run-readelf-test2.sh \
+		    run-readelf-test3.sh run-readelf-test4.sh \
+		    run-readelf-twofiles.sh run-readelf-macro.sh \
+		    run-readelf-loc.sh run-readelf-aranges.sh \
+		    run-readelf-line.sh run-readelf-z.sh \
+		    run-addrname-test.sh \
+		    run-disasm-x86.sh run-disasm-x86-64.sh \
+		    run-prelink-addr-test.sh \
+		    run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \
+		    run-macro-test.sh run-test-archive64.sh \
+		    run-readelf-vmcoreinfo.sh \
+		    run-readelf-mixed-corenote.sh \
+		    run-addr2line-test.sh \
+		    run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \
+		    run-addr2line-i-demangle-test.sh \
+		    run-addr2line-alt-debugpath.sh \
+		    run-stack-d-test.sh run-stack-i-test.sh \
+		    run-stack-demangled-test.sh run-readelf-zx.sh \
+		    run-readelf-zp.sh run-readelf-dwz-multi.sh run-deleted.sh \
+		    run-linkmap-cut.sh run-readelf-A.sh run-compress-test.sh \
+		    run-readelf-zdebug.sh run-readelf-zdebug-rel.sh
+
 if BIARCH
 check_PROGRAMS += backtrace-child-biarch
 endif
@@ -70,64 +141,7 @@ backtrace-child-biarch$(EXEEXT): backtrace-child.c
 		     $(AM_LDFLAGS) $(LDFLAGS) $(backtrace_child_LDFLAGS) \
 		     -o $@ $<
 
-TESTS = run-arextract.sh run-arsymtest.sh newfile test-nlist \
-	update1 update2 update3 update4 \
-	run-show-die-info.sh run-get-files.sh run-get-lines.sh \
-	run-get-pubnames.sh run-get-aranges.sh run-allfcts.sh \
-	run-show-abbrev.sh run-line2addr.sh hash \
-	newscn run-strip-test.sh run-strip-test2.sh \
-	run-strip-test3.sh run-strip-test4.sh run-strip-test5.sh \
-	run-strip-test6.sh run-strip-test7.sh run-strip-test8.sh \
-	run-strip-test9.sh run-strip-test10.sh run-strip-test11.sh \
-	run-strip-groups.sh run-strip-reloc.sh run-strip-strmerge.sh \
-	run-strip-nobitsalign.sh \
-	run-unstrip-test.sh run-unstrip-test2.sh \
-	run-unstrip-test3.sh run-unstrip-M.sh run-elfstrmerge-test.sh \
-	run-ecp-test.sh run-ecp-test2.sh run-alldts.sh \
-	run-elflint-test.sh run-elflint-self.sh run-ranlib-test.sh \
-	run-ranlib-test2.sh run-ranlib-test3.sh run-ranlib-test4.sh \
-	run-addrscopes.sh run-strings-test.sh run-funcscopes.sh \
-	run-find-prologues.sh run-allregs.sh run-addrcfi.sh \
-	run-nm-self.sh run-readelf-self.sh \
-	run-readelf-test1.sh run-readelf-test2.sh run-readelf-test3.sh \
-	run-readelf-test4.sh run-readelf-twofiles.sh \
-	run-readelf-macro.sh run-readelf-loc.sh \
-	run-readelf-aranges.sh run-readelf-line.sh run-readelf-z.sh \
-	run-native-test.sh run-bug1-test.sh \
-	run-debuglink.sh run-debugaltlink.sh run-buildid.sh \
-	dwfl-bug-addr-overflow run-addrname-test.sh \
-	dwfl-bug-fd-leak dwfl-bug-report \
-	run-dwfl-bug-offline-rel.sh run-dwfl-addr-sect.sh \
-	run-disasm-x86.sh run-disasm-x86-64.sh \
-	run-early-offscn.sh run-dwarf-getmacros.sh run-dwarf-ranges.sh \
-	run-test-flag-nobits.sh run-prelink-addr-test.sh \
-	run-dwarf-getstring.sh run-rerequest_tag.sh run-typeiter.sh \
-	run-readelf-d.sh run-readelf-gdb_index.sh run-unstrip-n.sh \
-	run-low_high_pc.sh run-macro-test.sh run-elf_cntl_gelf_getshdr.sh \
-	run-test-archive64.sh run-readelf-vmcoreinfo.sh \
-	run-readelf-mixed-corenote.sh run-dwfllines.sh \
-	run-dwfl-report-elf-align.sh run-addr2line-test.sh \
-	run-addr2line-i-test.sh run-addr2line-i-lex-test.sh \
-	run-addr2line-i-demangle-test.sh run-addr2line-alt-debugpath.sh \
-	run-varlocs.sh run-funcretval.sh \
-	run-backtrace-native.sh run-backtrace-data.sh run-backtrace-dwarf.sh \
-	run-backtrace-native-biarch.sh run-backtrace-native-core.sh \
-	run-backtrace-native-core-biarch.sh run-backtrace-core-x86_64.sh \
-	run-backtrace-core-x32.sh \
-	run-backtrace-core-i386.sh run-backtrace-core-ppc.sh \
-	run-backtrace-core-s390x.sh run-backtrace-core-s390.sh \
-	run-backtrace-core-aarch64.sh run-backtrace-core-sparc.sh \
-	run-backtrace-demangle.sh run-stack-d-test.sh run-stack-i-test.sh \
-	run-stack-demangled-test.sh run-readelf-zx.sh run-readelf-zp.sh \
-	run-readelf-dwz-multi.sh run-allfcts-multi.sh run-deleted.sh \
-	run-linkmap-cut.sh run-aggregate-size.sh vdsosyms run-readelf-A.sh \
-	run-getsrc-die.sh run-strptr.sh newdata elfstrtab dwfl-proc-attach \
-	elfshphehdr run-lfs-symbols.sh run-dwelfgnucompressed.sh \
-	run-elfgetchdr.sh \
-	run-elfgetzdata.sh run-elfputzdata.sh run-zstrptr.sh \
-	run-compress-test.sh \
-	run-readelf-zdebug.sh run-readelf-zdebug-rel.sh \
-	emptyfile vendorelf
+TESTS = run-early-offscn.sh run-elf_cntl_gelf_getshdr.sh run-lfs-symbols.sh
 
 if !BIARCH
 export ELFUTILS_DISABLE_BIARCH = 1
@@ -138,12 +152,22 @@ export ELFUTILS_DISABLE_DEMANGLE = 1
 endif
 
 if !STANDALONE
-check_PROGRAMS += msg_tst md5-sha1-test system-elf-libelf-test
-TESTS += msg_tst md5-sha1-test system-elf-libelf-test
+check_PROGRAMS += msg_tst system-elf-libelf-test
+TESTS += msg_tst system-elf-libelf-test
+if HAVE_LIBEU
+check_PROGRAMS += md5-sha1-test
+TESTS += md5-sha1-test
+endif
 endif
 
 if LZMA
-TESTS += run-readelf-s.sh run-dwflsyms.sh
+if HAVE_LIBDW
+check_PROGRAMS += dwflsyms
+TESTS += run-dwflsyms.sh
+endif
+if HAVE_TOOLS
+TESTS += run-readelf-s.sh
+endif
 endif
 
 if HAVE_LIBASM
@@ -154,10 +178,24 @@ TESTS += run-disasm-bpf.sh
 endif
 endif
 
+if HAVE_LIBDW
+check_PROGRAMS += $(dw_TESTPROGRAMS)
+TESTS += $(dw_TESTRUNNERS)
+endif
+
+if HAVE_LIBELF
+check_PROGRAMS += $(elf_TESTPROGRAMS)
+TESTS += $(elf_TESTRUNNERS)
+endif
+
+if HAVE_TOOLS
+TESTS += $(tools_TESTRUNNERS)
+endif
+
 EXTRA_DIST = run-arextract.sh run-arsymtest.sh \
 	     run-show-die-info.sh run-get-files.sh run-get-lines.sh \
 	     run-get-pubnames.sh run-get-aranges.sh \
-	     run-show-abbrev.sh run-strip-test.sh \
+	     run-strip-test.sh \
 	     run-strip-test2.sh run-ecp-test.sh run-ecp-test2.sh \
 	     testfile.bz2 testfile2.bz2 testfile3.bz2 testfile4.bz2 \
 	     testfile5.bz2 testfile6.bz2 testfile7.bz2 testfile8.bz2 \
@@ -395,10 +433,6 @@ endif !STANDALONE
 arextract_LDADD = $(libelf)
 arsymtest_LDADD = $(libelf)
 newfile_LDADD = $(libelf)
-saridx_LDADD = $(libelf)
-scnnames_LDADD = $(libelf)
-sectiondump_LDADD = $(libelf)
-showptable_LDADD = $(libelf)
 hash_LDADD = $(libelf)
 test_nlist_LDADD = $(libelf)
 msg_tst_LDADD = $(libelf)
@@ -435,10 +469,8 @@ asm_tst9_LDADD = $(libasm) $(libebl) $(libelf) $(libdw) -ldl
 dwflmodtest_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl
 rdwrmmap_LDADD = $(libelf)
 dwfl_bug_addr_overflow_LDADD = $(libdw) $(libebl) $(libelf) -ldl
-arls_LDADD = $(libelf)
 dwfl_bug_fd_leak_LDADD = $(libdw) $(libebl) $(libelf) -ldl
 dwfl_bug_report_LDADD = $(libdw) $(libebl) $(libelf) -ldl
-dwfl_bug_getmodules_LDADD = $(libdw) $(libebl) $(libelf) -ldl
 dwfl_addr_sect_LDADD = $(libdw) $(libebl) $(libelf) $(argp_LDADD) -ldl
 dwarf_getmacros_LDADD = $(libdw)
 dwarf_ranges_LDADD = $(libdw)
@@ -449,7 +481,6 @@ rerequest_tag_LDADD = $(libdw)
 alldts_LDADD = $(libdw) $(libelf)
 md5_sha1_test_LDADD = $(libeu)
 typeiter_LDADD = $(libdw) $(libelf)
-typeiter2_LDADD = $(libdw) $(libelf)
 low_high_pc_LDADD = $(libdw) $(libelf) $(argp_LDADD)
 test_elf_cntl_gelf_getshdr_LDADD = $(libelf)
 dwflsyms_LDADD = $(libdw) $(libelf) $(argp_LDADD)
diff --git a/tests/run-low_high_pc.sh b/tests/run-low_high_pc.sh
index ab5f2c3..46597bd 100755
--- a/tests/run-low_high_pc.sh
+++ b/tests/run-low_high_pc.sh
@@ -27,8 +27,8 @@ testfiles testfile_low_high_pc
 
 testrun ${abs_builddir}/low_high_pc -e ./testfile_low_high_pc
 testrun ${abs_builddir}/low_high_pc -e ${abs_builddir}/low_high_pc
-testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip
-testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip.o
+test -f ${abs_top_builddir}/src/strip && testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip
+test -f ${abs_top_builddir}/src/strip.o && testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/src/strip.o
 testrun ${abs_builddir}/low_high_pc -e ${abs_top_builddir}/libelf/libelf.so
 
 exit 0
diff --git a/tests/test-subr.sh b/tests/test-subr.sh
index f397aed..c74478c 100644
--- a/tests/test-subr.sh
+++ b/tests/test-subr.sh
@@ -131,7 +131,8 @@ testrun_on_self()
   exit_status=0
 
   for file in $self_test_files; do
-      testrun $* $file \
+      test ! -f $file \
+          || testrun $* $file \
 	  || { echo "*** failure in $* $file"; exit_status=1; }
   done
 
-- 
2.10.0

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]