The parallel-tests option was introduced in automake 1.11 and is the default since automake 1.13. All tests can now be ran in parallel with make check -j. To enable this all tests are ran in their own temporary directory so they don't stomp on each others input or output files. On my machine (4 cores) make check takes ~20 seconds, but now with make check -j8 takes only ~4 seconds.
ChangeLog:
* configure.ac (AM_INIT_AUTOMAKE): Require version 1.11 and parallel-tests.
tests/ChangeLog:
* Makefile.am (installed_TESTS_ENVIRONMENT): Export environment, remove wrapper. (TESTS_ENVIRONMENT): Likewise. (installed_LOG_COMPILER): New variable defining wrapper. (LOG_COMPILER): Likewise. * run-*.sh: Fixup location of input and output files. * test-subr.sh: Create test_dir, pushd to execute test in. (trap): Remove test_dir. (self_test_files): Adjust path. test-wrapper.sh: Set and export srcdir for use in test scripts. --- ChangeLog | 5 +++++ configure.ac | 2 +- tests/ChangeLog | 13 +++++++++++++ tests/Makefile.am | 23 +++++++++++++---------- tests/run-addrname-test.sh | 20 ++++++++++---------- tests/run-addrscopes.sh | 4 ++-- tests/run-alldts.sh | 4 ++-- tests/run-allfcts.sh | 2 +- tests/run-allregs.sh | 2 +- tests/run-arextract.sh | 2 +- tests/run-arsymtest.sh | 4 ++-- tests/run-bug1-test.sh | 4 ++-- tests/run-disasm-x86-64.sh | 2 +- tests/run-disasm-x86.sh | 2 +- tests/run-dwarf-getmacros.sh | 4 ++-- tests/run-dwarf-getstring.sh | 2 +- tests/run-dwfl-addr-sect.sh | 4 ++-- tests/run-dwfl-bug-offline-rel.sh | 2 +- tests/run-dwfl-report-elf-align.sh | 2 +- tests/run-dwfllines.sh | 6 +++--- tests/run-dwflsyms.sh | 12 ++++++------ tests/run-early-offscn.sh | 2 +- tests/run-ecp-test.sh | 2 +- tests/run-ecp-test2.sh | 2 +- tests/run-elf_cntl_gelf_getshdr.sh | 6 +++--- tests/run-elflint-self.sh | 2 +- tests/run-elflint-test.sh | 12 ++++++------ tests/run-find-prologues.sh | 18 +++++++++--------- tests/run-funcscopes.sh | 2 +- tests/run-get-aranges.sh | 2 +- tests/run-get-files.sh | 2 +- tests/run-get-lines.sh | 2 +- tests/run-get-pubnames.sh | 2 +- tests/run-line2addr.sh | 10 +++++----- tests/run-low_high_pc.sh | 10 +++++----- tests/run-macro-test.sh | 4 ++-- tests/run-native-test.sh | 4 ++-- tests/run-nm-self.sh | 2 +- tests/run-prelink-addr-test.sh | 24 ++++++++++++------------ tests/run-ranlib-test.sh | 2 +- tests/run-ranlib-test2.sh | 2 +- tests/run-readelf-aranges.sh | 4 ++-- tests/run-readelf-d.sh | 2 +- tests/run-readelf-dwz-multi.sh | 6 +++--- tests/run-readelf-gdb_index.sh | 4 ++-- tests/run-readelf-line.sh | 4 ++-- tests/run-readelf-loc.sh | 6 +++--- tests/run-readelf-macro.sh | 2 +- tests/run-readelf-mixed-corenote.sh | 6 +++--- tests/run-readelf-s.sh | 20 ++++++++++---------- tests/run-readelf-self.sh | 2 +- tests/run-readelf-test1.sh | 2 +- tests/run-readelf-test2.sh | 2 +- tests/run-readelf-test3.sh | 2 +- tests/run-readelf-test4.sh | 2 +- tests/run-readelf-twofiles.sh | 2 +- tests/run-readelf-vmcoreinfo.sh | 2 +- tests/run-rerequest_tag.sh | 4 ++-- tests/run-show-abbrev.sh | 2 +- tests/run-show-die-info.sh | 2 +- tests/run-strings-test.sh | 2 +- tests/run-strip-groups.sh | 8 ++++---- tests/run-strip-reloc.sh | 16 ++++++++-------- tests/run-strip-test.sh | 12 ++++++------ tests/run-test-archive64.sh | 2 +- tests/run-test-flag-nobits.sh | 2 +- tests/run-typeiter.sh | 2 +- tests/run-unstrip-n.sh | 4 ++-- tests/run-unstrip-test.sh | 8 ++++---- tests/test-subr.sh | 16 +++++++++++----- tests/test-wrapper.sh | 8 ++++++-- 71 files changed, 210 insertions(+), 179 deletions(-)
diff --git a/ChangeLog b/ChangeLog index a05ebdf..3920033 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-04-25 Mark Wielaard mjw@redhat.com + + * configure.ac (AM_INIT_AUTOMAKE): Require version 1.11 and + parallel-tests. + 2012-10-01 Mark Wielaard mjw@redhat.com
* configure.ac: Add --enable-valgrind check. diff --git a/configure.ac b/configure.ac index 52a2322..d7c75ce 100644 --- a/configure.ac +++ b/configure.ac @@ -26,7 +26,7 @@ AC_COPYRIGHT([Copyright (C) 1996-2012 Red Hat, Inc.]) AC_PREREQ(2.63) dnl Minimum Autoconf version required.
dnl We use GNU make extensions; automake 1.10 defaults to -Wportability. -AM_INIT_AUTOMAKE([gnits 1.8 -Wno-portability dist-bzip2 no-dist-gzip]) +AM_INIT_AUTOMAKE([gnits 1.11 -Wno-portability dist-bzip2 no-dist-gzip parallel-tests]) AM_MAINTAINER_MODE
dnl Unique ID for this build. diff --git a/tests/ChangeLog b/tests/ChangeLog index 2da85cf..f159eba 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,16 @@ +2013-04-25 Mark Wielaard mjw@redhat.com + + * Makefile.am (installed_TESTS_ENVIRONMENT): Export environment, + remove wrapper. + (TESTS_ENVIRONMENT): Likewise. + (installed_LOG_COMPILER): New variable defining wrapper. + (LOG_COMPILER): Likewise. + * run-*.sh: Fixup location of input and output files. + * test-subr.sh: Create test_dir, pushd to execute test in. + (trap): Remove test_dir. + (self_test_files): Adjust path. + test-wrapper.sh: Set and export srcdir for use in test scripts. + 2013-03-25 Mark Wielaard mjw@redhat.com
* run-readelf-aranges.sh: New test. diff --git a/tests/Makefile.am b/tests/Makefile.am index 85ed678..259968e 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -204,19 +204,22 @@ if USE_VALGRIND valgrind_cmd="valgrind -q --trace-children=yes --error-exitcode=1 --run-libc-freeres=no" endif
-installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir) \ - bindir=$(DESTDIR)$(bindir) \ - LC_ALL=C LANG=C \ - VALGRIND_CMD=$(valgrind_cmd) \ - $(srcdir)/test-wrapper.sh \ - installed $(tests_rpath) \ - $(program_transform_name) + +installed_TESTS_ENVIRONMENT = libdir=$(DESTDIR)$(libdir); \ + bindir=$(DESTDIR)$(bindir); \ + LC_ALL=C; LANG=C; \ + VALGRIND_CMD=$(valgrind_cmd); +installed_LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \ + installed $(tests_rpath) \ + $(program_transform_name) if STANDALONE TESTS_ENVIRONMENT = $(installed_TESTS_ENVIRONMENT) +LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh else !STANDALONE -TESTS_ENVIRONMENT = LC_ALL=C LANG=C VALGRIND_CMD=$(valgrind_cmd) \ - $(srcdir)/test-wrapper.sh \ - ../libdw:../backends:../libelf:../libasm +TESTS_ENVIRONMENT = LC_ALL=C; LANG=C; VALGRIND_CMD=$(valgrind_cmd); \ + export LC_ALL; export LANG; export VALGRIND_CMD; +LOG_COMPILER = $(abs_srcdir)/test-wrapper.sh \ + ../../libdw:../../backends:../../libelf:../../libasm
installcheck-local: $(MAKE) $(AM_MAKEFLAGS) \ diff --git a/tests/run-addrname-test.sh b/tests/run-addrname-test.sh index 99abf9d..afe9bea 100755 --- a/tests/run-addrname-test.sh +++ b/tests/run-addrname-test.sh @@ -19,7 +19,7 @@
testfiles testfile34 testfile38 testfile41 testfile49
-testrun_compare ../src/addr2line -f -e testfile34 \ +testrun_compare ../../src/addr2line -f -e testfile34 \ 0x08048074 0x08048075 0x08048076 \ 0x08049078 0x08048080 0x08049080 <<\EOF foo @@ -36,7 +36,7 @@ _end ??:0 EOF
-testrun_compare ../src/addr2line -S -e testfile38 0x02 0x10a 0x211 0x31a <<\EOF +testrun_compare ../../src/addr2line -S -e testfile38 0x02 0x10a 0x211 0x31a <<\EOF t1_global_outer+0x2 ??:0 t2_global_symbol+0x2 @@ -47,7 +47,7 @@ t3_global_after_0+0x1 ??:0 EOF
-testrun_compare ../src/addr2line -S -e testfile41 0x1 0x104 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile41 0x1 0x104 <<\EOF small_global_at_large_global+0x1 ??:0 small_global_first_at_large_global+0x1 @@ -69,7 +69,7 @@ cat > testmaps <<EOF ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall] EOF
-testrun_compare ../src/addr2line -S -M testmaps 0x40047c 0x10009db <<\EOF +testrun_compare ../../src/addr2line -S -M testmaps 0x40047c 0x10009db <<\EOF caller+0x14 /home/drepper/local/elfutils-build/20050425/v.c:11 foo+0xb @@ -135,7 +135,7 @@ EOF # nop #10 # .size local_outer, . - local_outer # nop #11 -testrun_compare ../src/addr2line -S -e testfile49 \ +testrun_compare ../../src/addr2line -S -e testfile49 \ 0 1 2 3 4 5 6 7 8 9 \ 0x100 0x101 0x102 0x103 0x104 0x105 \ 0x106 0x107 0x108 0x109 0x10a 0x10b \ @@ -277,7 +277,7 @@ EOF # local l0local2, 0 # offset 12 testfiles testfile64 -testrun_compare ../src/addr2line -S -e testfile64 1 4 5 8 9 12 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile64 1 4 5 8 9 12 <<\EOF gglobal2 ??:0 g0global2 @@ -293,13 +293,13 @@ l0local2 EOF
testfiles testfile65 -testrun_compare ../src/addr2line -S --core=testfile65 0x7fff94bffa30 <<\EOF +testrun_compare ../../src/addr2line -S --core=testfile65 0x7fff94bffa30 <<\EOF __vdso_time ??:0 EOF
testfiles testfile69.core testfile69.so -testrun_compare ../src/addr2line --core=./testfile69.core -S 0x7f0bc6a33535 0x7f0bc6a33546 <<\EOF +testrun_compare ../../src/addr2line --core=./testfile69.core -S 0x7f0bc6a33535 0x7f0bc6a33546 <<\EOF libstatic+0x9 ??:0 libglobal+0x9 @@ -307,11 +307,11 @@ libglobal+0x9 EOF
testfiles testfile70.exec testfile70.core -testrun_compare ../src/addr2line -S -e testfile70.exec --core=testfile70.core 0x7ff2cfe9b6b5 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile70.exec --core=testfile70.core 0x7ff2cfe9b6b5 <<\EOF main+0x9 ??:0 EOF -testrun_compare ../src/addr2line -S --core=testfile70.core -e testfile70.exec 0x7ff2cfe9b6b5 <<\EOF +testrun_compare ../../src/addr2line -S --core=testfile70.core -e testfile70.exec 0x7ff2cfe9b6b5 <<\EOF main+0x9 ??:0 EOF diff --git a/tests/run-addrscopes.sh b/tests/run-addrscopes.sh index 38b9d88..25ee0ff 100755 --- a/tests/run-addrscopes.sh +++ b/tests/run-addrscopes.sh @@ -19,7 +19,7 @@
testfiles testfile22
-testrun_compare ./addrscopes -e testfile22 0x8048353 <<\EOF +testrun_compare ../addrscopes -e testfile22 0x8048353 <<\EOF 0x8048353: tests/foo.c (0x11): 0x8048348 (tests/foo.c:5) .. 0x804837e (tests/foo.c:16) global [ be] @@ -30,7 +30,7 @@ EOF test_cleanup
testfiles testfile24 -testrun_compare ./addrscopes -e testfile24 0x804834e <<\EOF +testrun_compare ../addrscopes -e testfile24 0x804834e <<\EOF 0x804834e: inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x8048364 (/home/roland/build/stock-elfutils/inline-test.c:16) add (0x1d): 0x804834e (/home/roland/build/stock-elfutils/inline-test.c:3) .. 0x8048350 (/home/roland/build/stock-elfutils/inline-test.c:9) diff --git a/tests/run-alldts.sh b/tests/run-alldts.sh index d8b87c2..f102498 100755 --- a/tests/run-alldts.sh +++ b/tests/run-alldts.sh @@ -18,9 +18,9 @@ . $srcdir/test-subr.sh
# This will produce "testfile-alldts" file -testrun ./alldts +testrun ../alldts
-testrun_compare ../src/readelf -d testfile-alldts <<\EOF +testrun_compare ../../src/readelf -d testfile-alldts <<\EOF
Dynamic segment contains 66 entries: Addr: 0x000001a0 Offset: 0x000078 Link to section: [ 0] '' diff --git a/tests/run-allfcts.sh b/tests/run-allfcts.sh index 4d0ec61..2431a17 100755 --- a/tests/run-allfcts.sh +++ b/tests/run-allfcts.sh @@ -20,7 +20,7 @@
testfiles testfile testfile2 testfile8
-testrun_compare ./allfcts testfile testfile2 testfile8 <<\EOF +testrun_compare ../allfcts testfile testfile2 testfile8 <<\EOF /home/drepper/gnu/new-bu/build/ttt/m.c:5:main /home/drepper/gnu/new-bu/build/ttt/b.c:4:bar /home/drepper/gnu/new-bu/build/ttt/f.c:3:foo diff --git a/tests/run-allregs.sh b/tests/run-allregs.sh index 7790fd0..8a68278 100755 --- a/tests/run-allregs.sh +++ b/tests/run-allregs.sh @@ -22,7 +22,7 @@ regs_test() tempfiles good.regs cat > good.regs testfiles "$@" - for f; do testrun_compare ./allregs -e $f < good.regs; done + for f; do testrun_compare ../allregs -e $f < good.regs; done test_cleanup }
diff --git a/tests/run-arextract.sh b/tests/run-arextract.sh index 668b363..9e67d97 100755 --- a/tests/run-arextract.sh +++ b/tests/run-arextract.sh @@ -27,7 +27,7 @@ if test -f $archive; then
# The files we are looking at. for f in ../libelf/*.o; do - testrun ./arextract $archive `basename $f` arextract.test || exit 1 + testrun ../arextract $archive `basename $f` arextract.test || exit 1 cmp $f arextract.test || { echo "Extraction of $1 failed" exit 1 diff --git a/tests/run-arsymtest.sh b/tests/run-arsymtest.sh index 89c7821..b081cad 100755 --- a/tests/run-arsymtest.sh +++ b/tests/run-arsymtest.sh @@ -18,7 +18,7 @@
. $srcdir/test-subr.sh
-lib=../libelf/libelf.a +lib=../../libelf/libelf.a okfile=arsymtest.ok tmpfile=arsymtest.tmp testfile=arsymtest.test @@ -33,7 +33,7 @@ if test -f $lib; then sort > $okfile
# Now run our program using libelf. - testrun ./arsymtest $lib $tmpfile || exit 1 + testrun ../arsymtest $lib $tmpfile || exit 1 sort $tmpfile > $testfile
# Compare the outputs. diff --git a/tests/run-bug1-test.sh b/tests/run-bug1-test.sh index f651051..9da8991 100755 --- a/tests/run-bug1-test.sh +++ b/tests/run-bug1-test.sh @@ -19,7 +19,7 @@
testfiles testfile28 testfile28.rdwr
-testrun ./rdwrmmap testfile28 +testrun ../rdwrmmap testfile28
cmp testfile28 testfile28.rdwr
@@ -27,7 +27,7 @@ test_cleanup
testfiles testfile29 testfile29.rdwr
-testrun ./rdwrmmap testfile29 +testrun ../rdwrmmap testfile29
cmp testfile29 testfile29.rdwr
diff --git a/tests/run-disasm-x86-64.sh b/tests/run-disasm-x86-64.sh index 96e14d9..644ef03 100755 --- a/tests/run-disasm-x86-64.sh +++ b/tests/run-disasm-x86-64.sh @@ -23,6 +23,6 @@ case "`uname -m`" in tempfiles testfile45.o testfiles testfile45.S testfile45.expect gcc -m64 -c -o testfile45.o testfile45.S - testrun_compare ../src/objdump -d testfile45.o < testfile45.expect + testrun_compare ../../src/objdump -d testfile45.o < testfile45.expect ;; esac diff --git a/tests/run-disasm-x86.sh b/tests/run-disasm-x86.sh index 399664c..ad9b0ff 100755 --- a/tests/run-disasm-x86.sh +++ b/tests/run-disasm-x86.sh @@ -23,6 +23,6 @@ case "`uname -m`" in tempfiles testfile44.o testfiles testfile44.S testfile44.expect gcc -m32 -c -o testfile44.o testfile44.S - testrun_compare ../src/objdump -d testfile44.o < testfile44.expect + testrun_compare ../../src/objdump -d testfile44.o < testfile44.expect ;; esac diff --git a/tests/run-dwarf-getmacros.sh b/tests/run-dwarf-getmacros.sh index b748b0f..aa8024b 100755 --- a/tests/run-dwarf-getmacros.sh +++ b/tests/run-dwarf-getmacros.sh @@ -19,7 +19,7 @@
testfiles testfile51
-testrun_compare ./dwarf-getmacros testfile51 0xb <<\EOF +testrun_compare ../dwarf-getmacros testfile51 0xb <<\EOF __STDC__ 1 __STDC_HOSTED__ 1 __GNUC__ 4 @@ -152,7 +152,7 @@ __DECIMAL_BID_FORMAT__ 1 macro1 ble EOF
-testrun_compare ./dwarf-getmacros testfile51 0x84 <<\EOF +testrun_compare ../dwarf-getmacros testfile51 0x84 <<\EOF __STDC__ 1 __STDC_HOSTED__ 1 __GNUC__ 4 diff --git a/tests/run-dwarf-getstring.sh b/tests/run-dwarf-getstring.sh index c765f75..1e32e90 100755 --- a/tests/run-dwarf-getstring.sh +++ b/tests/run-dwarf-getstring.sh @@ -19,7 +19,7 @@
testfiles testfile11
-testrun_compare ./dwarf-getstring testfile11 <<\EOF +testrun_compare ../dwarf-getstring testfile11 <<\EOF _ZNSbIwSt11char_traitsIwESaIwEE13_S_copy_charsEPwS3_S3_ itimerspec _G_int32_t diff --git a/tests/run-dwfl-addr-sect.sh b/tests/run-dwfl-addr-sect.sh index 85424fd..ef5a237 100755 --- a/tests/run-dwfl-addr-sect.sh +++ b/tests/run-dwfl-addr-sect.sh @@ -19,13 +19,13 @@
testfiles testfile43 testfile50
-testrun_compare ./dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF +testrun_compare ../dwfl-addr-sect -e testfile43 0x64 0x8 0x98 <<\EOF address 0x64 => module "" section 4 + 0 address 0x8 => module "" section 1 + 0x8 address 0x98 => module "" section 7 + 0 EOF
-testrun_compare ./dwfl-addr-sect -e testfile50 0x1 <<\EOF +testrun_compare ../dwfl-addr-sect -e testfile50 0x1 <<\EOF address 0x1 => module "" section 1 + 0x1 EOF
diff --git a/tests/run-dwfl-bug-offline-rel.sh b/tests/run-dwfl-bug-offline-rel.sh index 3e19a58..93feb71 100755 --- a/tests/run-dwfl-bug-offline-rel.sh +++ b/tests/run-dwfl-bug-offline-rel.sh @@ -19,7 +19,7 @@
testfiles testfile36 testfile36.debug
-testrun_compare ./dwflmodtest -e testfile36 <<\EOF +testrun_compare ../dwflmodtest -e testfile36 <<\EOF module: 00000000..00002308 testfile36 (null) module: 00000000 DWARF 0 (no error) module: 00000000..00002308 testfile36 testfile36.debug diff --git a/tests/run-dwfl-report-elf-align.sh b/tests/run-dwfl-report-elf-align.sh index d032aba..b92bef5 100755 --- a/tests/run-dwfl-report-elf-align.sh +++ b/tests/run-dwfl-report-elf-align.sh @@ -38,7 +38,7 @@ testfiles testfile-dwfl-report-elf-align-shlib.so # 0x7f3560c92585 = 0x7f3560c92000 + 0x585 # where 0x585 is any address inside the shlib function: 0x57c .. 0x57c + 11 -1
-testrun ./dwfl-report-elf-align ./testfile-dwfl-report-elf-align-shlib.so \ +testrun ../dwfl-report-elf-align ./testfile-dwfl-report-elf-align-shlib.so \ 0x7f3560c92000 0x7f3560c92585 shlib
exit 0 diff --git a/tests/run-dwfllines.sh b/tests/run-dwfllines.sh index df7d16f..d98ba05 100755 --- a/tests/run-dwfllines.sh +++ b/tests/run-dwfllines.sh @@ -19,7 +19,7 @@
testfiles testfile testfile2
-testrun_compare ./dwfllines -e testfile <<\EOF +testrun_compare ../dwfllines -e testfile <<\EOF mod: CU: [b] m.c 0 0x804842c /home/drepper/gnu/new-bu/build/ttt/m.c:5:0 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 @@ -51,7 +51,7 @@ mod: CU: [15fc] f.c time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 EOF
-testrun_compare ./dwfllines -e testfile2 <<\EOF +testrun_compare ../dwfllines -e testfile2 <<\EOF mod: CU: [b] b.c 0 0x10000470 /shoggoth/drepper/b.c:4:0 time: 0, len: 0, idx: 0, b: 1, e: 0, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 @@ -83,6 +83,6 @@ mod: CU: [9e4] m.c time: 0, len: 0, idx: 0, b: 1, e: 1, pe: 0, eb: 0, block: 0, isa: 0, disc: 0 EOF
-testrun_on_self_quiet ./dwfllines -e +testrun_on_self_quiet ../dwfllines -e
exit 0 diff --git a/tests/run-dwflsyms.sh b/tests/run-dwflsyms.sh index 56a7580..0d6749c 100755 --- a/tests/run-dwflsyms.sh +++ b/tests/run-dwflsyms.sh @@ -177,21 +177,21 @@ cat > testfile.minsym.in <<\EOF EOF
cat testfile.symtab.in \ - | testrun_compare ./dwflsyms -e testfilebaztab + | testrun_compare ../dwflsyms -e testfilebaztab
cat testfile.symtab.in \ - | testrun_compare ./dwflsyms -e testfilebazdbg + | testrun_compare ../dwflsyms -e testfilebazdbg
cat testfile.dynsym.in \ - | testrun_compare ./dwflsyms -e testfilebazdyn + | testrun_compare ../dwflsyms -e testfilebazdyn
cat testfile.symtab.in \ - | testrun_compare ./dwflsyms -e testfilebazmdb + | testrun_compare ../dwflsyms -e testfilebazmdb
cat testfile.minsym.in \ - | testrun_compare ./dwflsyms -e testfilebazmin + | testrun_compare ../dwflsyms -e testfilebazmin
-testrun_compare ./dwflsyms -e testfilebasmin <<\EOF +testrun_compare ../dwflsyms -e testfilebasmin <<\EOF 0: NOTYPE LOCAL (0) 0 1: FUNC LOCAL foo (18) 0x400168 2: SECTION LOCAL (0) 0x400120 diff --git a/tests/run-early-offscn.sh b/tests/run-early-offscn.sh index 55a38f9..7886bdb 100755 --- a/tests/run-early-offscn.sh +++ b/tests/run-early-offscn.sh @@ -19,6 +19,6 @@
testfiles testfile
-testrun ./early-offscn testfile 0x500 +testrun ../early-offscn testfile 0x500
exit 0 diff --git a/tests/run-ecp-test.sh b/tests/run-ecp-test.sh index d68a873..12ae02c 100755 --- a/tests/run-ecp-test.sh +++ b/tests/run-ecp-test.sh @@ -21,7 +21,7 @@ testfiles testfile10 tempfiles testfile10.tmp
-testrun ./ecp testfile10 testfile10.tmp +testrun ../ecp testfile10 testfile10.tmp
cmp testfile10 testfile10.tmp
diff --git a/tests/run-ecp-test2.sh b/tests/run-ecp-test2.sh index a9acbe9..88931a6 100755 --- a/tests/run-ecp-test2.sh +++ b/tests/run-ecp-test2.sh @@ -21,6 +21,6 @@ testfiles testfile2 tempfiles testfile2.tmp
-testrun ./ecp testfile2 testfile2.tmp +testrun ../ecp testfile2 testfile2.tmp
exit 0 diff --git a/tests/run-elf_cntl_gelf_getshdr.sh b/tests/run-elf_cntl_gelf_getshdr.sh index 41a7d15..9764a35 100755 --- a/tests/run-elf_cntl_gelf_getshdr.sh +++ b/tests/run-elf_cntl_gelf_getshdr.sh @@ -18,13 +18,13 @@ . $srcdir/test-subr.sh
# However we open the elf file, the shdrs should be the same. -testrun ./test-elf_cntl_gelf_getshdr READ test-elf_cntl_gelf_getshdr \ +testrun ../test-elf_cntl_gelf_getshdr READ ../test-elf_cntl_gelf_getshdr \
test_shdr.out
-testrun_compare ./test-elf_cntl_gelf_getshdr MMAP test-elf_cntl_gelf_getshdr \ +testrun_compare ../test-elf_cntl_gelf_getshdr MMAP ../test-elf_cntl_gelf_getshdr \ < test_shdr.out
-testrun_compare ./test-elf_cntl_gelf_getshdr FDREAD test-elf_cntl_gelf_getshdr \ +testrun_compare ../test-elf_cntl_gelf_getshdr FDREAD ../test-elf_cntl_gelf_getshdr \ < test_shdr.out
rm -f test_shdr.out diff --git a/tests/run-elflint-self.sh b/tests/run-elflint-self.sh index 4b01008..8f4e570 100755 --- a/tests/run-elflint-self.sh +++ b/tests/run-elflint-self.sh @@ -18,4 +18,4 @@
. $srcdir/test-subr.sh
-testrun_on_self ../src/elflint --quiet --gnu-ld +testrun_on_self ../../src/elflint --quiet --gnu-ld diff --git a/tests/run-elflint-test.sh b/tests/run-elflint-test.sh index 5a5c622..9adf951 100755 --- a/tests/run-elflint-test.sh +++ b/tests/run-elflint-test.sh @@ -20,24 +20,24 @@
testfiles testfile18
-testrun_compare ../src/elflint --gnu-ld testfile18 <<\EOF +testrun_compare ../../src/elflint --gnu-ld testfile18 <<\EOF section [ 8] '.rela.dyn': relocation 1: copy relocation against symbol of type FUNC EOF
testfiles testfile32 -testrun ../src/elflint -q testfile32 +testrun ../../src/elflint -q testfile32
testfiles testfile33 -testrun ../src/elflint -q testfile33 +testrun ../../src/elflint -q testfile33
testfiles testfile42 -testrun ../src/elflint -q --gnu-ld testfile42 +testrun ../../src/elflint -q --gnu-ld testfile42
testfiles testfile46 -testrun ../src/elflint -q testfile46 +testrun ../../src/elflint -q testfile46
# see also run-readelf-d.sh testfiles testlib_dynseg.so -testrun ../src/elflint -q --gnu-ld testlib_dynseg.so +testrun ../../src/elflint -q --gnu-ld testlib_dynseg.so
exit 0 diff --git a/tests/run-find-prologues.sh b/tests/run-find-prologues.sh index 78caa8c..4cf2c94 100755 --- a/tests/run-find-prologues.sh +++ b/tests/run-find-prologues.sh @@ -20,13 +20,13 @@ testfiles testfile testfile11 testfile22 testfile24 \ testfile25 testfile3 testfile4 testfile5 testfile6
-testrun_compare ./find-prologues -e testfile <<\EOF +testrun_compare ../find-prologues -e testfile <<\EOF main 0x000000000804842c 0x0000000008048432 bar 0x000000000804845c 0x000000000804845f foo 0x0000000008048468 0x000000000804846b EOF
-testrun_compare ./find-prologues -e testfile11 <<\EOF +testrun_compare ../find-prologues -e testfile11 <<\EOF main 0x00000000080489b8 0x00000000080489cd gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4 gnu_obj_3 0x0000000008048cd8 0x0000000008048cde @@ -37,27 +37,27 @@ gnu_obj_1 0x0000000008048d8a 0x0000000008048d8d ~invalid_argument 0x0000000008048db2 0x0000000008048db8 EOF
-testrun_compare ./find-prologues -e testfile22 <<\EOF +testrun_compare ../find-prologues -e testfile22 <<\EOF function 0x0000000008048348 0x000000000804834e main 0x000000000804835b 0x0000000008048377 EOF
-testrun_compare ./find-prologues -e testfile24 <<\EOF +testrun_compare ../find-prologues -e testfile24 <<\EOF incr 0x0000000008048348 0x000000000804834e main 0x0000000008048354 0x0000000008048360 EOF
-testrun_compare ./find-prologues -e testfile25 <<\EOF +testrun_compare ../find-prologues -e testfile25 <<\EOF incr 0x0000000008048348 0x000000000804834c EOF
-testrun_compare ./find-prologues -e testfile3 <<\EOF +testrun_compare ../find-prologues -e testfile3 <<\EOF main 0x000000000804842c 0x0000000008048433 bar 0x0000000008048458 0x000000000804845b foo 0x0000000008048464 0x0000000008048467 EOF
-testrun_compare ./find-prologues -e testfile4 <<\EOF +testrun_compare ../find-prologues -e testfile4 <<\EOF get 0x00000000080493fc 0x0000000008049402 main 0x0000000008049498 0x000000000804949e a 0x000000000804d85c 0x000000000804d85c @@ -65,13 +65,13 @@ __tfPCc 0x000000000804d86c 0x000000000804d872 __tfCc 0x000000000804d8a4 0x000000000804d8a4 EOF
-testrun_compare ./find-prologues -e testfile5 <<\EOF +testrun_compare ../find-prologues -e testfile5 <<\EOF bar 0x000000000804842c 0x000000000804842f foo 0x0000000008048438 0x000000000804843b main 0x0000000008048444 0x000000000804844a EOF
-testrun_compare ./find-prologues -e testfile6 <<\EOF +testrun_compare ../find-prologues -e testfile6 <<\EOF main 0x00000000080489b8 0x00000000080489cd gnu_obj_2 0x0000000008048c9e 0x0000000008048ca4 gnu_obj_3 0x0000000008048cd8 0x0000000008048cde diff --git a/tests/run-funcscopes.sh b/tests/run-funcscopes.sh index a0e48c1..5865ad8 100755 --- a/tests/run-funcscopes.sh +++ b/tests/run-funcscopes.sh @@ -19,7 +19,7 @@
testfiles testfile25
-testrun_compare ./funcscopes -e testfile25 incr <<\EOF +testrun_compare ../funcscopes -e testfile25 incr <<\EOF testfile25: 0x8048000 .. 0x8049528 inline-test.c (0x11): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9) incr (0x2e): 0x8048348 (/home/roland/build/stock-elfutils/inline-test.c:7) .. 0x804834f (/home/roland/build/stock-elfutils/inline-test.c:9) diff --git a/tests/run-get-aranges.sh b/tests/run-get-aranges.sh index f3949f4..a15c7cf 100755 --- a/tests/run-get-aranges.sh +++ b/tests/run-get-aranges.sh @@ -20,7 +20,7 @@
testfiles testfile testfile2
-testrun_compare ./get-aranges testfile testfile2 <<\EOF +testrun_compare ../get-aranges testfile testfile2 <<\EOF 0x804842b: not in range CU name: "m.c" CU name: "m.c" diff --git a/tests/run-get-files.sh b/tests/run-get-files.sh index 6eadcd5..55cb06c 100755 --- a/tests/run-get-files.sh +++ b/tests/run-get-files.sh @@ -20,7 +20,7 @@
testfiles testfile testfile2
-testrun_compare ./get-files testfile testfile2 <<\EOF +testrun_compare ../get-files testfile testfile2 <<\EOF cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 191 dirs[0] = "/home/drepper/gnu/new-bu/build/ttt" file[0] = "???" diff --git a/tests/run-get-lines.sh b/tests/run-get-lines.sh index 8c8c71e..c6cb57f 100755 --- a/tests/run-get-lines.sh +++ b/tests/run-get-lines.sh @@ -20,7 +20,7 @@
testfiles testfile testfile2
-testrun_compare ./get-lines testfile testfile2 <<\EOF +testrun_compare ../get-lines testfile testfile2 <<\EOF cuhl = 11, o = 0, asz = 4, osz = 4, ncu = 191 5 lines 804842c: /home/drepper/gnu/new-bu/build/ttt/m.c:5:0: is_stmt:yes, end_seq:no, bb:no, prologue:no, epilogue:no diff --git a/tests/run-get-pubnames.sh b/tests/run-get-pubnames.sh index a8a1759..ec4d8c7 100755 --- a/tests/run-get-pubnames.sh +++ b/tests/run-get-pubnames.sh @@ -20,7 +20,7 @@
testfiles testfile testfile2
-testrun_compare ./get-pubnames testfile testfile2 <<\EOF +testrun_compare ../get-pubnames testfile testfile2 <<\EOF [ 0] "main", die: 104, cu: 11 CU name: "m.c" object name: "main" diff --git a/tests/run-line2addr.sh b/tests/run-line2addr.sh index 768cf69..f69348f 100755 --- a/tests/run-line2addr.sh +++ b/tests/run-line2addr.sh @@ -20,28 +20,28 @@
testfiles testfile testfile2 testfile8 testfile14 testfile23
-testrun_compare ./line2addr -e testfile f.c:4 testfile f.c:8 <<\EOF +testrun_compare ../line2addr -e testfile f.c:4 testfile f.c:8 <<\EOF f.c:4 -> 0x804846b (/home/drepper/gnu/new-bu/build/ttt/f.c:4) EOF
-testrun_compare ./line2addr -e testfile2 m.c:6 b.c:1 <<\EOF +testrun_compare ../line2addr -e testfile2 m.c:6 b.c:1 <<\EOF m.c:6 -> 0x100004cc (/shoggoth/drepper/m.c:6) b.c:1 -> 0x10000470 (/shoggoth/drepper/b.c:4) EOF
-testrun_compare ./line2addr -e testfile8 strip.c:953 strip.c:365 <<\EOF +testrun_compare ../line2addr -e testfile8 strip.c:953 strip.c:365 <<\EOF strip.c:953 -> (.text)+0x169f (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:953) strip.c:953 -> (.text)+0x16aa (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:953) strip.c:365 -> (.text)+0x278b (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:365) strip.c:365 -> (.text)+0x2797 (/home/drepper/gnu/elfutils/build/src/../../src/strip.c:365) EOF
-testrun_compare ./line2addr -e testfile14 v.c:6 <<\EOF +testrun_compare ../line2addr -e testfile14 v.c:6 <<\EOF v.c:6 -> 0x400468 (/home/drepper/local/elfutils-build/20050425/v.c:6) v.c:6 -> 0x400487 (/home/drepper/local/elfutils-build/20050425/v.c:6) EOF
-testrun_compare ./line2addr -e testfile23 foo.c:2 foo.c:6 <<\EOF +testrun_compare ../line2addr -e testfile23 foo.c:2 foo.c:6 <<\EOF foo.c:2 -> (.init.text)+0xc (/home/roland/stock-elfutils-build/foo.c:2) foo.c:6 -> (.text)+0xc (/home/roland/stock-elfutils-build/foo.c:6) EOF diff --git a/tests/run-low_high_pc.sh b/tests/run-low_high_pc.sh index eb6f8cf..98ba43c 100755 --- a/tests/run-low_high_pc.sh +++ b/tests/run-low_high_pc.sh @@ -25,10 +25,10 @@ # gcc -g -o main main.c testfiles testfile_low_high_pc
-testrun ./low_high_pc -e ./testfile_low_high_pc -testrun ./low_high_pc -e ./low_high_pc -testrun ./low_high_pc -e ../src/strip -testrun ./low_high_pc -e ../src/strip.o -testrun ./low_high_pc -e ../libelf/libelf.so +testrun ../low_high_pc -e ./testfile_low_high_pc +testrun ../low_high_pc -e ../low_high_pc +testrun ../low_high_pc -e ../../src/strip +testrun ../low_high_pc -e ../../src/strip.o +testrun ../low_high_pc -e ../../libelf/libelf.so
exit 0 diff --git a/tests/run-macro-test.sh b/tests/run-macro-test.sh index 70a16ed..17b1e7b 100755 --- a/tests/run-macro-test.sh +++ b/tests/run-macro-test.sh @@ -34,14 +34,14 @@ testfiles testfile-macinfo testfile-macros
status=0
-testrun ../src/readelf --debug-dump=info testfile-macinfo \ +testrun ../../src/readelf --debug-dump=info testfile-macinfo \ | grep macro_info > readelf.macros.out || { echo "*** failure readelf --debug-dump=info testfile-macinfo"; status=1; } testrun_compare cat readelf.macros.out <<\EOF macro_info (sec_offset) 0 EOF
-testrun ../src/readelf --debug-dump=info testfile-macros \ +testrun ../../src/readelf --debug-dump=info testfile-macros \ | grep GNU_macros > readelf.macros.out || { echo "*** failure readelf --debug-dump=info testfile-macros"; status=1; } testrun_compare cat readelf.macros.out <<\EOF diff --git a/tests/run-native-test.sh b/tests/run-native-test.sh index ed7672f..9822ebf 100755 --- a/tests/run-native-test.sh +++ b/tests/run-native-test.sh @@ -70,8 +70,8 @@ native_test() test $native -eq 0 || testrun "$@" -p $native > /dev/null }
-native_test ./allregs -native_test ./funcretval +native_test ../allregs +native_test ../funcretval
# We do this explicitly rather than letting the trap 0 cover it, # because as of version 3.1 bash prints the "Killed" report for diff --git a/tests/run-nm-self.sh b/tests/run-nm-self.sh index 0fe0ec6..bbb7400 100755 --- a/tests/run-nm-self.sh +++ b/tests/run-nm-self.sh @@ -20,7 +20,7 @@ for what_arg in --debug-syms --defined-only --dynamic --extern-only; do for format_arg in --format=bsd --format=sysv --format=posix; do for out_arg in --numeric-sort --no-sort --reverse-sort; do - testrun_on_self_quiet ../src/nm $what_arg $format_arg $out_arg + testrun_on_self_quiet ../../src/nm $what_arg $format_arg $out_arg done done done diff --git a/tests/run-prelink-addr-test.sh b/tests/run-prelink-addr-test.sh index 588261f..62436e5 100755 --- a/tests/run-prelink-addr-test.sh +++ b/tests/run-prelink-addr-test.sh @@ -47,7 +47,7 @@ EOF # Prior to commit 1743d7f, libdwfl would fail on the second address, # because it didn't notice that prelink added a 0x20-byte offset from # what the .debug file reports. -testrun_compare ../src/addr2line -S -M testmaps52-32 \ +testrun_compare ../../src/addr2line -S -M testmaps52-32 \ 0x11140c 0x4100042d 0x4200040e <<\EOF foo /home/jistone/src/elfutils/tests/testfile52-32.c:2 @@ -76,7 +76,7 @@ cat > testmaps52-64 <<EOF 3800200000-3800201000 rw-p 00000000 fd:11 3 `pwd`/testfile52-64.noshdrs.so EOF
-testrun_compare ../src/addr2line -S -M testmaps52-64 \ +testrun_compare ../../src/addr2line -S -M testmaps52-64 \ 0x100000056c 0x300000056d 0x380000056e <<\EOF foo /home/jistone/src/elfutils/tests/testfile52-64.c:2 @@ -97,7 +97,7 @@ EOF # prelink -N testfile53-32.prelink testfiles testfile53-32 testfile53-32.debug testfile53-32.prelink
-testrun_compare ../src/addr2line -S -e testfile53-32 0x8048394 0x8048395 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile53-32 0x8048394 0x8048395 <<\EOF main /home/jistone/src/elfutils/tests/testfile53-32.c:2 main+0x1 @@ -105,7 +105,7 @@ main+0x1 EOF
# prelink shuffled some of the sections, but .text is in the same place. -testrun_compare ../src/addr2line -S -e testfile53-32.prelink 0x8048396 0x8048397 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile53-32.prelink 0x8048396 0x8048397 <<\EOF main+0x2 /home/jistone/src/elfutils/tests/testfile53-32.c:2 main+0x3 @@ -116,14 +116,14 @@ EOF # prelink section shuffling. testfiles testfile53-64 testfile53-64.debug testfile53-64.prelink
-testrun_compare ../src/addr2line -S -e testfile53-64 0x400474 0x400475 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile53-64 0x400474 0x400475 <<\EOF main /home/jistone/src/elfutils/tests/testfile53-64.c:2 main+0x1 /home/jistone/src/elfutils/tests/testfile53-64.c:2 EOF
-testrun_compare ../src/addr2line -S -e testfile53-64.prelink 0x400476 0x400477 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile53-64.prelink 0x400476 0x400477 <<\EOF main+0x2 /home/jistone/src/elfutils/tests/testfile53-64.c:2 main+0x3 @@ -159,7 +159,7 @@ cat > testmaps54-32 <<EOF 42001000-42002000 rw-p 00000000 fd:01 3 `pwd`/testfile54-32.noshdrs.so EOF
-testrun_compare ../src/addr2line -S -M testmaps54-32 \ +testrun_compare ../../src/addr2line -S -M testmaps54-32 \ 0x1111fc 0x1122a4 0x410001fd 0x410012a5 0x420001fe <<\EOF foo ??:0 @@ -193,7 +193,7 @@ cat > testmaps54-64 <<EOF 3800200000-3800201000 rw-p 00000000 fd:11 3 `pwd`/testfile54-64.noshdrs.so EOF
-testrun_compare ../src/addr2line -S -M testmaps54-64 \ +testrun_compare ../../src/addr2line -S -M testmaps54-64 \ 0x10000002f8 0x1000200448 0x30000002f9 0x3000200449 0x38000002fa <<\EOF foo ??:0 @@ -218,7 +218,7 @@ EOF # prelink -N testfile55-32.prelink testfiles testfile55-32 testfile55-32.debug testfile55-32.prelink
-testrun_compare ../src/addr2line -S -e testfile55-32 0x80483b4 0x80483b5 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile55-32 0x80483b4 0x80483b5 <<\EOF main /home/jistone/src/elfutils/tests/testfile55-32.c:2 main+0x1 @@ -227,7 +227,7 @@ EOF
# prelink splits .bss into .dynbss+.bss, so the start of .bss changes, but the # total size remains the same, and .text doesn't move at all. -testrun_compare ../src/addr2line -S -e testfile55-32.prelink 0x80483b6 0x80483b7 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile55-32.prelink 0x80483b6 0x80483b7 <<\EOF main+0x2 /home/jistone/src/elfutils/tests/testfile55-32.c:2 main+0x3 @@ -237,14 +237,14 @@ EOF # Repeat testfile55 in 64-bit testfiles testfile55-64 testfile55-64.debug testfile55-64.prelink
-testrun_compare ../src/addr2line -S -e testfile55-64 0x4004b4 0x4004b5 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile55-64 0x4004b4 0x4004b5 <<\EOF main /home/jistone/src/elfutils/tests/testfile55-64.c:2 main+0x1 /home/jistone/src/elfutils/tests/testfile55-64.c:2 EOF
-testrun_compare ../src/addr2line -S -e testfile55-64.prelink 0x4004b6 0x4004b7 <<\EOF +testrun_compare ../../src/addr2line -S -e testfile55-64.prelink 0x4004b6 0x4004b7 <<\EOF main+0x2 /home/jistone/src/elfutils/tests/testfile55-64.c:2 main+0x3 diff --git a/tests/run-ranlib-test.sh b/tests/run-ranlib-test.sh index ce109cf..0242ac8 100755 --- a/tests/run-ranlib-test.sh +++ b/tests/run-ranlib-test.sh @@ -30,7 +30,7 @@ EOF
cp ranlib-test.a ranlib-test.a-copy
-testrun ../src/ranlib ranlib-test.a +testrun ../../src/ranlib ranlib-test.a
# The ranlib call should not have changed anything. cmp ranlib-test.a ranlib-test.a-copy diff --git a/tests/run-ranlib-test2.sh b/tests/run-ranlib-test2.sh index 75d00b3..3619866 100755 --- a/tests/run-ranlib-test2.sh +++ b/tests/run-ranlib-test2.sh @@ -23,7 +23,7 @@ indexed=${indexed:-testfile19.index}
testfiles $original $indexed
-testrun ../src/ranlib $original +testrun ../../src/ranlib $original
if test -z "$noindex"; then # The date in the index is different. The reference file has it blanked diff --git a/tests/run-readelf-aranges.sh b/tests/run-readelf-aranges.sh index a610fca..38cb9c7 100755 --- a/tests/run-readelf-aranges.sh +++ b/tests/run-readelf-aranges.sh @@ -111,7 +111,7 @@
testfiles testfilefoobarbaz
-testrun_compare ../src/readelf --debug-dump=aranges testfilefoobarbaz <<EOF +testrun_compare ../../src/readelf --debug-dump=aranges testfilefoobarbaz <<EOF
DWARF section [27] '.debug_aranges' at offset 0x1044:
@@ -148,7 +148,7 @@ Table at offset 72: 0x08048340 <nobaz>..0x0804834a <nobaz+0xa> EOF
-testrun_compare ../src/readelf --debug-dump=decodedaranges testfilefoobarbaz <<\EOF +testrun_compare ../../src/readelf --debug-dump=decodedaranges testfilefoobarbaz <<\EOF
DWARF section [27] '.debug_aranges' at offset 0x1044 contains 5 entries: [0] start: 0x080482f0, length: 52, CU DIE offset: 11 diff --git a/tests/run-readelf-d.sh b/tests/run-readelf-d.sh index 3e4b7bf..e01a837 100755 --- a/tests/run-readelf-d.sh +++ b/tests/run-readelf-d.sh @@ -32,7 +32,7 @@
testfiles testlib_dynseg.so
-testrun_compare ../src/readelf -d testlib_dynseg.so <<\EOF +testrun_compare ../../src/readelf -d testlib_dynseg.so <<\EOF
Dynamic segment contains 28 entries: Addr: 0x00000000000017e0 Offset: 0x0007e0 Link to section: [ 3] '.dynstr' diff --git a/tests/run-readelf-dwz-multi.sh b/tests/run-readelf-dwz-multi.sh index ca939f3..7592e43 100755 --- a/tests/run-readelf-dwz-multi.sh +++ b/tests/run-readelf-dwz-multi.sh @@ -78,7 +78,7 @@ testfiles libtestfile_multi_shared.so testfile_multi_main testfile_multi.dwz testfiles testfile-dwzstr testfile-dwzstr.multi
-testrun_compare ../src/readelf --debug-dump=info testfile_multi_main <<\EOF +testrun_compare ../../src/readelf --debug-dump=info testfile_multi_main <<\EOF
DWARF section [28] '.debug_info' at offset 0x1078: [Offset] @@ -136,7 +136,7 @@ DWARF section [28] '.debug_info' at offset 0x1078: type (ref_udata) [ 2b] EOF
-testrun_compare ../src/readelf --debug-dump=info libtestfile_multi_shared.so <<\EOF +testrun_compare ../../src/readelf --debug-dump=info libtestfile_multi_shared.so <<\EOF
DWARF section [25] '.debug_info' at offset 0x106c: [Offset] @@ -173,7 +173,7 @@ DWARF section [25] '.debug_info' at offset 0x106c: [ 0] fbreg -24 EOF
-testrun_compare ../src/readelf --debug-dump=info testfile-dwzstr <<\EOF +testrun_compare ../../src/readelf --debug-dump=info testfile-dwzstr <<\EOF
DWARF section [28] '.debug_info' at offset 0x1088: [Offset] diff --git a/tests/run-readelf-gdb_index.sh b/tests/run-readelf-gdb_index.sh index 31c94c1..200a0a3 100755 --- a/tests/run-readelf-gdb_index.sh +++ b/tests/run-readelf-gdb_index.sh @@ -65,7 +65,7 @@
testfiles testfilegdbindex5 testfilegdbindex7
-testrun_compare ../src/readelf --debug-dump=gdb_index testfilegdbindex5 <<\EOF +testrun_compare ../../src/readelf --debug-dump=gdb_index testfilegdbindex5 <<\EOF
GDB section [33] '.gdb_index' at offset 0xe76 contains 8383 bytes : Version: 5 @@ -96,7 +96,7 @@ GDB section [33] '.gdb_index' at offset 0xe76 contains 8383 bytes : [ 754] symbol: int, CUs: 0 EOF
-testrun_compare ../src/readelf --debug-dump=gdb_index testfilegdbindex7 <<\EOF +testrun_compare ../../src/readelf --debug-dump=gdb_index testfilegdbindex7 <<\EOF
GDB section [33] '.gdb_index' at offset 0xe76 contains 8399 bytes : Version: 7 diff --git a/tests/run-readelf-line.sh b/tests/run-readelf-line.sh index f0e491d..786fb7d 100755 --- a/tests/run-readelf-line.sh +++ b/tests/run-readelf-line.sh @@ -22,7 +22,7 @@
testfiles testfilefoobarbaz
-testrun_compare ../src/readelf --debug-dump=line testfilefoobarbaz <<EOF +testrun_compare ../../src/readelf --debug-dump=line testfilefoobarbaz <<EOF
DWARF section [30] '.debug_line' at offset 0x15f6:
@@ -197,7 +197,7 @@ Line number statements: [ 10e] extended opcode 1: end of sequence EOF
-testrun_compare ../src/readelf --debug-dump=decodedline testfilefoobarbaz <<\EOF +testrun_compare ../../src/readelf --debug-dump=decodedline testfilefoobarbaz <<\EOF
DWARF section [30] '.debug_line' at offset 0x15f6:
diff --git a/tests/run-readelf-loc.sh b/tests/run-readelf-loc.sh index 6612e7d..dfb1491 100755 --- a/tests/run-readelf-loc.sh +++ b/tests/run-readelf-loc.sh @@ -59,7 +59,7 @@ testfiles testfileloc
# Process values as offsets from base addresses and resolve to symbols. -testrun_compare ../src/readelf --debug-dump=loc --debug-dump=ranges \ +testrun_compare ../../src/readelf --debug-dump=loc --debug-dump=ranges \ testfileloc<<\EOF
DWARF section [33] '.debug_loc' at offset 0xd2a: @@ -75,7 +75,7 @@ DWARF section [34] '.debug_ranges' at offset 0xd94: EOF
# Don't resolve addresses to symbols. -testrun_compare ../src/readelf -N --debug-dump=loc --debug-dump=ranges \ +testrun_compare ../../src/readelf -N --debug-dump=loc --debug-dump=ranges \ testfileloc<<\EOF
DWARF section [33] '.debug_loc' at offset 0xd2a: @@ -91,7 +91,7 @@ DWARF section [34] '.debug_ranges' at offset 0xd94: EOF
# Produce "raw" unprocessed content. -testrun_compare ../src/readelf -U --debug-dump=loc --debug-dump=ranges \ +testrun_compare ../../src/readelf -U --debug-dump=loc --debug-dump=ranges \ testfileloc<<\EOF
DWARF section [33] '.debug_loc' at offset 0xd2a: diff --git a/tests/run-readelf-macro.sh b/tests/run-readelf-macro.sh index c65992b..6c8f9ad 100755 --- a/tests/run-readelf-macro.sh +++ b/tests/run-readelf-macro.sh @@ -59,7 +59,7 @@
testfiles testfilemacro
-testrun_compare ../src/readelf --debug-dump=macro testfilemacro <<\EOF +testrun_compare ../../src/readelf --debug-dump=macro testfilemacro <<\EOF
DWARF section [32] '.debug_macro' at offset 0x2480:
diff --git a/tests/run-readelf-mixed-corenote.sh b/tests/run-readelf-mixed-corenote.sh index 3c4ec51..ee8947d 100755 --- a/tests/run-readelf-mixed-corenote.sh +++ b/tests/run-readelf-mixed-corenote.sh @@ -19,7 +19,7 @@
testfiles testfile63
-testrun_compare ../src/readelf -n testfile63 <<\EOF +testrun_compare ../../src/readelf -n testfile63 <<\EOF
Note segment of 892 bytes at offset 0x274: Owner Data size Type @@ -85,7 +85,7 @@ Note segment of 892 bytes at offset 0x274: EOF
testfiles testfile67 -testrun_compare ../src/readelf -n testfile67 <<\EOF +testrun_compare ../../src/readelf -n testfile67 <<\EOF
Note segment of 1044 bytes at offset 0xe8: Owner Data size Type @@ -150,7 +150,7 @@ Note segment of 1044 bytes at offset 0xe8: EOF
testfiles testfile68 -testrun_compare ../src/readelf -n testfile68 <<\EOF +testrun_compare ../../src/readelf -n testfile68 <<\EOF
Note segment of 852 bytes at offset 0x94: Owner Data size Type diff --git a/tests/run-readelf-s.sh b/tests/run-readelf-s.sh index bad31cf..bd442fa 100755 --- a/tests/run-readelf-s.sh +++ b/tests/run-readelf-s.sh @@ -251,33 +251,33 @@ Symbol table [27] '.symtab' contains 35 entries: EOF
cat testfile.dynsym.in testfile.symtab.in \ - | testrun_compare ../src/readelf -s testfilebaztab + | testrun_compare ../../src/readelf -s testfilebaztab
cat testfile.dynsym.in \ - | testrun_compare ../src/readelf -s testfilebazdbg + | testrun_compare ../../src/readelf -s testfilebazdbg
cat testfile.symtab.in \ - | testrun_compare ../src/readelf -s testfilebazdbg.debug + | testrun_compare ../../src/readelf -s testfilebazdbg.debug
cat testfile.dynsym.in \ - | testrun_compare ../src/readelf -s testfilebazdyn + | testrun_compare ../../src/readelf -s testfilebazdyn
cat testfile.dynsym.in \ - | testrun_compare ../src/readelf -s testfilebazmdb + | testrun_compare ../../src/readelf -s testfilebazmdb
cat testfile.minsym.in \ - | testrun_compare ../src/readelf --elf-section -s testfilebazmdb + | testrun_compare ../../src/readelf --elf-section -s testfilebazmdb
cat testfile.dynsym.in \ - | testrun_compare ../src/readelf -s testfilebazmin + | testrun_compare ../../src/readelf -s testfilebazmin
cat testfile.minsym.in \ - | testrun_compare ../src/readelf --elf-section -s testfilebazmin + | testrun_compare ../../src/readelf --elf-section -s testfilebazmin
-testrun_compare ../src/readelf -s testfilebasmin <<EOF +testrun_compare ../../src/readelf -s testfilebasmin <<EOF EOF
-testrun_compare ../src/readelf --elf-section -s testfilebasmin <<\EOF +testrun_compare ../../src/readelf --elf-section -s testfilebasmin <<\EOF
Symbol table [ 6] '.symtab' contains 9 entries: 6 local symbols String table: [ 7] '.strtab' diff --git a/tests/run-readelf-self.sh b/tests/run-readelf-self.sh index 4602712..69d7aab 100755 --- a/tests/run-readelf-self.sh +++ b/tests/run-readelf-self.sh @@ -18,4 +18,4 @@ . $srcdir/test-subr.sh
# Just makes sure readelf doesn't crash -testrun_on_self_quiet ../src/readelf -a -w +testrun_on_self_quiet ../../src/readelf -a -w diff --git a/tests/run-readelf-test1.sh b/tests/run-readelf-test1.sh index b64103e..4a1ba47 100755 --- a/tests/run-readelf-test1.sh +++ b/tests/run-readelf-test1.sh @@ -26,7 +26,7 @@ testfiles testfile3
tempfiles testfile.temp
-testrun ../src/readelf -r testfile3 > testfile.temp +testrun ../../src/readelf -r testfile3 > testfile.temp
diff -u - testfile.temp <<EOF
diff --git a/tests/run-readelf-test2.sh b/tests/run-readelf-test2.sh index 676fcde..6e9d226 100755 --- a/tests/run-readelf-test2.sh +++ b/tests/run-readelf-test2.sh @@ -19,7 +19,7 @@
testfiles testfile28
-testrun_compare ../src/readelf -x .strtab testfile28 <<\EOF +testrun_compare ../../src/readelf -x .strtab testfile28 <<\EOF
Hex dump of section [6] '.strtab', 1 bytes at offset 0x290: 0x00000000 00 . diff --git a/tests/run-readelf-test3.sh b/tests/run-readelf-test3.sh index 15f0ba5..ba82b23 100755 --- a/tests/run-readelf-test3.sh +++ b/tests/run-readelf-test3.sh @@ -19,7 +19,7 @@
testfiles testfile40.debug
-testrun_compare ../src/readelf -n testfile40.debug <<\EOF +testrun_compare ../../src/readelf -n testfile40.debug <<\EOF
Note section [ 6] '.note' of 60 bytes at offset 0x120: Owner Data size Type diff --git a/tests/run-readelf-test4.sh b/tests/run-readelf-test4.sh index 16cf802..f5063cd 100755 --- a/tests/run-readelf-test4.sh +++ b/tests/run-readelf-test4.sh @@ -19,7 +19,7 @@
testfiles testfile19.index
-testrun_compare ../src/readelf -c testfile19.index <<\EOF +testrun_compare ../../src/readelf -c testfile19.index <<\EOF
Index of archive 'testfile19.index' has 4 entries: Archive member 'u1.o' contains: diff --git a/tests/run-readelf-twofiles.sh b/tests/run-readelf-twofiles.sh index d12f57f..a068ce9 100755 --- a/tests/run-readelf-twofiles.sh +++ b/tests/run-readelf-twofiles.sh @@ -19,6 +19,6 @@
testfiles testfile14
-testrun >/dev/null ../src/readelf -w testfile14 testfile14 +testrun >/dev/null ../../src/readelf -w testfile14 testfile14
exit 0 diff --git a/tests/run-readelf-vmcoreinfo.sh b/tests/run-readelf-vmcoreinfo.sh index da361c8..39b69ed 100755 --- a/tests/run-readelf-vmcoreinfo.sh +++ b/tests/run-readelf-vmcoreinfo.sh @@ -19,7 +19,7 @@
testfiles testfile62
-testrun_compare ../src/readelf -n testfile62 <<\EOF +testrun_compare ../../src/readelf -n testfile62 <<\EOF
Note segment of 2104 bytes at offset 0x158: Owner Data size Type diff --git a/tests/run-rerequest_tag.sh b/tests/run-rerequest_tag.sh index 3a4cb1c..e942cdf 100755 --- a/tests/run-rerequest_tag.sh +++ b/tests/run-rerequest_tag.sh @@ -19,7 +19,7 @@
testfiles testfile56 testfile57
-testrun ./rerequest_tag testfile56 -testrun ./rerequest_tag testfile57 +testrun ../rerequest_tag testfile56 +testrun ../rerequest_tag testfile57
exit 0 diff --git a/tests/run-show-abbrev.sh b/tests/run-show-abbrev.sh index 351730f..8d5a07e 100755 --- a/tests/run-show-abbrev.sh +++ b/tests/run-show-abbrev.sh @@ -20,7 +20,7 @@
testfiles testfile testfile2
-testrun_compare ./show-abbrev testfile testfile2 <<\EOF +testrun_compare ../show-abbrev testfile testfile2 <<\EOF abbrev[0]: code = 1, tag = 17, children = 1 abbrev[0]: attr[0]: code = 16, form = 6, offset = 0 abbrev[0]: attr[1]: code = 18, form = 1, offset = 2 diff --git a/tests/run-show-die-info.sh b/tests/run-show-die-info.sh index cbe60f9..4482664 100755 --- a/tests/run-show-die-info.sh +++ b/tests/run-show-die-info.sh @@ -20,7 +20,7 @@
testfiles testfile5 testfile2
-testrun_compare ./show-die-info testfile5 testfile2 <<\EOF +testrun_compare ../show-die-info testfile5 testfile2 <<\EOF file: testfile5 New CU: off = 0, hsize = 11, ab = 0, as = 4, os = 4 DW_TAG_compile_unit diff --git a/tests/run-strings-test.sh b/tests/run-strings-test.sh index 6bfc87e..d879d60 100755 --- a/tests/run-strings-test.sh +++ b/tests/run-strings-test.sh @@ -21,7 +21,7 @@ files="testfile `seq 2 9 | while read n; do echo testfile$n; done`" testfiles $files
-testrun_compare ../src/strings -tx -f $files <<\EOF +testrun_compare ../../src/strings -tx -f $files <<\EOF testfile: f4 /lib/ld-linux.so.2 testfile: 1c9 __gmon_start__ testfile: 1d8 libc.so.6 diff --git a/tests/run-strip-groups.sh b/tests/run-strip-groups.sh index 86d1d44..931a94d 100755 --- a/tests/run-strip-groups.sh +++ b/tests/run-strip-groups.sh @@ -49,7 +49,7 @@ dbgfile=$infile.debug testfiles $infile tempfiles $outfile $dbgfile
-testrun ../src/strip -o $outfile -f $dbgfile $infile -testrun ../src/elflint -q $infile -testrun ../src/elflint -q $outfile -testrun ../src/elflint -q -d $dbgfile +testrun ../../src/strip -o $outfile -f $dbgfile $infile +testrun ../../src/elflint -q $infile +testrun ../../src/elflint -q $outfile +testrun ../../src/elflint -q -d $dbgfile diff --git a/tests/run-strip-reloc.sh b/tests/run-strip-reloc.sh index 603fb7c..4e073c4 100755 --- a/tests/run-strip-reloc.sh +++ b/tests/run-strip-reloc.sh @@ -28,18 +28,18 @@ runtest() { outfile2=out.stripped2 debugfile2=out.debug2
- testrun ../src/strip -o $outfile1 -f $debugfile1 $infile || + testrun ../../src/strip -o $outfile1 -f $debugfile1 $infile || { echo "*** failure strip $infile"; status=1; }
- testrun ../src/strip --reloc-debug-sections -o $outfile2 \ + testrun ../../src/strip --reloc-debug-sections -o $outfile2 \ -f $debugfile2 $infile || { echo "*** failure strip --reloc-debug-sections $infile"; status=1; }
# shouldn't make any difference for stripped files. - testrun ../src/readelf -a $outfile1 > readelf.out || + testrun ../../src/readelf -a $outfile1 > readelf.out || { echo "*** failure readelf -a outfile1 $infile"; status=1; }
- testrun_compare ../src/readelf -a $outfile2 < readelf.out || + testrun_compare ../../src/readelf -a $outfile2 < readelf.out || { echo "*** failure compare stripped files $infile"; status=1; }
# debug files however should be smaller, when ET_REL. @@ -51,11 +51,11 @@ runtest() {
# Strip of DWARF section lines, offset will not match. # Everything else should match. - testrun ../src/readelf -w $debugfile1 \ + testrun ../../src/readelf -w $debugfile1 \ | grep -v ^DWARF\ section > readelf.out1 || { echo "*** failure readelf -w debugfile1 $infile"; status=1; }
- testrun ../src/readelf -w $debugfile2 \ + testrun ../../src/readelf -w $debugfile2 \ | grep -v ^DWARF\ section > readelf.out2 || { echo "*** failure readelf -w debugfile2 $infile"; status=1; }
@@ -101,7 +101,7 @@ runtest hello_ppc64.ko 1 runtest hello_s390.ko 1
# self test, shouldn't impact non-ET_REL files at all. -runtest ../src/strip 0 -runtest ../src/strip.o 1 +runtest ../../src/strip 0 +runtest ../../src/strip.o 1
exit $status diff --git a/tests/run-strip-test.sh b/tests/run-strip-test.sh index c6c7c09..ebc8ec3 100755 --- a/tests/run-strip-test.sh +++ b/tests/run-strip-test.sh @@ -27,30 +27,30 @@ test x$stripped = xtestfile.temp || testfiles $stripped $debugfile
tempfiles testfile.temp testfile.debug.temp testfile.unstrip
-testrun ../src/strip -o testfile.temp $debugout $original +testrun ../../src/strip -o testfile.temp $debugout $original
status=0
cmp $stripped testfile.temp || status=$?
# Check elflint and the expected result. -testrun ../src/elflint -q testfile.temp || status=$? +testrun ../../src/elflint -q testfile.temp || status=$?
test -z "$debugfile" || { cmp $debugfile testfile.debug.temp || status=$?
# Check elflint and the expected result. -testrun ../src/elflint -q -d testfile.debug.temp || status=$? +testrun ../../src/elflint -q -d testfile.debug.temp || status=$?
# Now test unstrip recombining those files. -testrun ../src/unstrip -o testfile.unstrip testfile.temp testfile.debug.temp +testrun ../../src/unstrip -o testfile.unstrip testfile.temp testfile.debug.temp
# Check that it came back whole. -testrun ../src/elfcmp --hash-inexact $original testfile.unstrip +testrun ../../src/elfcmp --hash-inexact $original testfile.unstrip }
tempfiles testfile.sections -testrun ../src/readelf -S testfile.temp > testfile.sections || status=$? +testrun ../../src/readelf -S testfile.temp > testfile.sections || status=$? fgrep ' .debug_' testfile.sections && status=1
exit $status diff --git a/tests/run-test-archive64.sh b/tests/run-test-archive64.sh index 26552ac..810aa44 100755 --- a/tests/run-test-archive64.sh +++ b/tests/run-test-archive64.sh @@ -26,7 +26,7 @@ # ar cru testarchive64.a aaa.o bbb.o ccc.o testfiles testarchive64.a
-testrun_compare ../src/readelf -c testarchive64.a <<\EOF +testrun_compare ../../src/readelf -c testarchive64.a <<\EOF
Index of archive 'testarchive64.a' has 7 entries: Archive member 'aaa.o' contains: diff --git a/tests/run-test-flag-nobits.sh b/tests/run-test-flag-nobits.sh index 1566756..5c72e25 100755 --- a/tests/run-test-flag-nobits.sh +++ b/tests/run-test-flag-nobits.sh @@ -19,4 +19,4 @@
testfiles testfile
-testrun ./test-flag-nobits testfile +testrun ../test-flag-nobits testfile diff --git a/tests/run-typeiter.sh b/tests/run-typeiter.sh index 3a453ab..8998c9b 100755 --- a/tests/run-typeiter.sh +++ b/tests/run-typeiter.sh @@ -43,7 +43,7 @@
testfiles testfile59
-testrun_compare ./typeiter testfile59 <<\EOF +testrun_compare ../typeiter testfile59 <<\EOF ok EOF
diff --git a/tests/run-unstrip-n.sh b/tests/run-unstrip-n.sh index 1353b1d..b9592a4 100755 --- a/tests/run-unstrip-n.sh +++ b/tests/run-unstrip-n.sh @@ -33,7 +33,7 @@
testfiles testcore-rtlib testcore-rtlib-ppc
-testrun_compare ../src/unstrip -n --core=testcore-rtlib <<\EOF +testrun_compare ../../src/unstrip -n --core=testcore-rtlib <<\EOF 0x8048000+0x2000 f1c600bc36cb91bf01f9a63a634ecb79aa4c3199@0x8048178 . - [exe] 0xf77d6000+0x1000 676560b1b765cde9c2e53f134f4ee354ea894747@0xf77d6210 . - linux-gate.so.1 0xf77b3000+0x9000 c6c5b5e35ab9589d4762ac85b4bd56b1b2720e37@0xf77b3164 /lib/librt.so.1 - librt.so.1 @@ -42,7 +42,7 @@ testrun_compare ../src/unstrip -n --core=testcore-rtlib <<\EOF 0xf77d7000+0x21000 6d2cb32650054f1c176d01d48713a4a5e5e84c1a@0xf77d7124 /lib/ld-linux.so.2 - ld-linux.so.2 EOF
-testrun_compare ../src/unstrip -n --core=testcore-rtlib-ppc <<\EOF +testrun_compare ../../src/unstrip -n --core=testcore-rtlib-ppc <<\EOF 0x10000000+0x20000 979b7a26747cc09bd84a42b311b5288c704baea5@0x10000174 . - [exe] 0x100000+0x10000 708b900b05176964512a6b0fe90c2a0c9d73d726@0x100334 . - linux-vdso32.so.1 0xfd50000+0x30000 3f7d21508470322d2f47acddc20ab10516edba99@0xfd50164 /lib/librt.so.1 - librt.so.1 diff --git a/tests/run-unstrip-test.sh b/tests/run-unstrip-test.sh index 3654943..7d1457e 100755 --- a/tests/run-unstrip-test.sh +++ b/tests/run-unstrip-test.sh @@ -29,15 +29,15 @@ tempfiles testfile.unstrip testfile.inplace # stripped sections that shrank in the stripped file. strip # no longer does that, but unstrip must still handle it.
-testrun ../src/unstrip -o testfile.unstrip $stripped $debugfile +testrun ../../src/unstrip -o testfile.unstrip $stripped $debugfile
-testrun ../src/elfcmp --hash-inexact $original testfile.unstrip +testrun ../../src/elfcmp --hash-inexact $original testfile.unstrip
# Also test modifying the file in place.
rm -f testfile.inplace cp $debugfile testfile.inplace chmod 644 testfile.inplace -testrun ../src/unstrip $stripped testfile.inplace +testrun ../../src/unstrip $stripped testfile.inplace
-testrun ../src/elfcmp --hash-inexact $original testfile.inplace +testrun ../../src/elfcmp --hash-inexact $original testfile.inplace diff --git a/tests/test-subr.sh b/tests/test-subr.sh index 19a9836..a21ff42 100644 --- a/tests/test-subr.sh +++ b/tests/test-subr.sh @@ -22,11 +22,16 @@
set -e
+# Each test runs in its own directory to make sure they can run in parallel. +test_dir="test-$$" +mkdir -p "$test_dir" +pushd "$test_dir" > /dev/null + #LC_ALL=C #export LC_ALL
remove_files= -trap 'rm -f $remove_files' 0 +trap 'rm -f $remove_files; popd > /dev/null; rmdir $test_dir' 0
tempfiles() { @@ -104,10 +109,11 @@ program_transform() echo "$*" | sed "${program_transform_name}" }
-self_test_files=`echo ../src/addr2line ../src/elfcmp ../src/elflint \ -../src/findtextrel ../src/ld ../src/nm ../src/objdump ../src/readelf \ -../src/size ../src/strip ../libelf/libelf.so ../libdw/libdw.so \ -../libasm/libasm.so ../backends/libebl_*.so` +self_test_files=`echo ../../src/addr2line ../../src/elfcmp ../../src/elflint \ +../../src/findtextrel ../../src/ld ../../src/nm ../../src/objdump \ +../../src/readelf \ +../../src/size ../../src/strip ../../libelf/libelf.so ../../libdw/libdw.so \ +../../libasm/libasm.so ../../backends/libebl_*.so`
# Provide a command to run on all self-test files with testrun. testrun_on_self() diff --git a/tests/test-wrapper.sh b/tests/test-wrapper.sh index 09b4d49..187080d 100755 --- a/tests/test-wrapper.sh +++ b/tests/test-wrapper.sh @@ -21,9 +21,13 @@ # the library path at this build.
# This wrapper script is called by the makefile, in one of two ways: -# $(srcdir)/test-wrapper.sh ../libelf:... run-test.sh ... +# $(abs_srcdir)/test-wrapper.sh ../libelf:... run-test.sh ... # or: -# $(srcdir)/test-wrapper.sh installed s,^,eu-, run-test.sh ... +# $(abs_srcdir)/test-wrapper.sh installed s,^,eu-, run-test.sh ... + +# Make sure all scripts see the absolute directory name as srcdir. +srcdir=$(dirname "$0") +export srcdir
if [ "$1" = installed ]; then shift
autoreconf will install config/test-driver, ignore it. Update gettext m4 and po files to version 0.18.2. Use AM_CPPFLAGS instead of INCLUDES. All changes are backward compatible with Automake 1.11. --- .gitignore | 1 + ChangeLog | 4 + backends/ChangeLog | 4 + backends/Makefile.am | 2 +- config/ChangeLog | 4 + config/eu.am | 2 +- lib/ChangeLog | 4 + lib/Makefile.am | 2 +- libasm/ChangeLog | 4 + libasm/Makefile.am | 2 +- libcpu/ChangeLog | 4 + libcpu/Makefile.am | 2 +- libdw/ChangeLog | 4 + libdw/Makefile.am | 2 +- libdwfl/ChangeLog | 4 + libdwfl/Makefile.am | 2 +- libebl/ChangeLog | 4 + libebl/Makefile.am | 2 +- m4/ChangeLog | 6 ++ m4/gettext.m4 | 96 ++++++++++++++++++------------ m4/iconv.m4 | 164 ++++++++++++++++++++++++++++++++++++++------------ m4/po.m4 | 39 +++++++------ po/ChangeLog | 4 + po/Makefile.in.in | 56 ++++++++++++----- src/ChangeLog | 4 + src/Makefile.am | 2 +- tests/ChangeLog | 4 + tests/Makefile.am | 2 +- 28 files changed, 310 insertions(+), 120 deletions(-)
diff --git a/.gitignore b/.gitignore index 6cfcc7c..d463556 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,7 @@ config/config.sub config/depcomp config/install-sh config/missing +config/test-driver config/ylwrap configure elfutils.spec diff --git a/ChangeLog b/ChangeLog index 3920033..1acb13e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2013-04-25 Mark Wielaard mjw@redhat.com
+ * .gitignore: Add config/test-driver as installed by automake 1.13. + +2013-04-25 Mark Wielaard mjw@redhat.com + * configure.ac (AM_INIT_AUTOMAKE): Require version 1.11 and parallel-tests.
diff --git a/backends/ChangeLog b/backends/ChangeLog index 5fd3b6d..4f7480d 100644 --- a/backends/ChangeLog +++ b/backends/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2013-02-06 Mark Wielaard mjw@redhat.com
* libebl_CPU.h (DWARF_TAG_OR_RETURN): New macro. diff --git a/backends/Makefile.am b/backends/Makefile.am index 283bbfc..1923702 100644 --- a/backends/Makefile.am +++ b/backends/Makefile.am @@ -28,7 +28,7 @@ ## the GNU Lesser General Public License along with this program. If ## not, see http://www.gnu.org/licenses/. include $(top_srcdir)/config/eu.am -INCLUDES += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ +AM_CPPFLAGS += -I$(top_srcdir)/libebl -I$(top_srcdir)/libasm \ -I$(top_srcdir)/libelf -I$(top_srcdir)/libdw
diff --git a/config/ChangeLog b/config/ChangeLog index 02ecd97..a3fba25 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * eu.am: Use AM_CPPFLAGS instead of INCLUDES. + 2012-08-27 Mark Wielaard mjw@redhat.com
* config/elfutils.spec.in: Update for 0.155. diff --git a/config/eu.am b/config/eu.am index 95e6520..86e5a4e 100644 --- a/config/eu.am +++ b/config/eu.am @@ -30,7 +30,7 @@ ##
DEFS = -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"${localedir}"' -INCLUDES = -I. -I$(srcdir) -I$(top_srcdir)/lib -I.. +AM_CPPFLAGS = -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) \ diff --git a/lib/ChangeLog b/lib/ChangeLog index 525528a..b97aba3 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2012-10-09 Adam Markey adam@etinternational.com
* system.h: Changed pwrite_retry, write_retry, and pread_retry to diff --git a/lib/Makefile.am b/lib/Makefile.am index 740dd0f..97f295e 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -29,7 +29,7 @@ ## include $(top_srcdir)/config/eu.am AM_CFLAGS += -fpic -INCLUDES += -I$(srcdir)/../libelf +AM_CPPFLAGS += -I$(srcdir)/../libelf
noinst_LIBRARIES = libeu.a
diff --git a/libasm/ChangeLog b/libasm/ChangeLog index f9a863d..1afc342 100644 --- a/libasm/ChangeLog +++ b/libasm/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2011-02-08 Roland McGrath roland@redhat.com
* asm_newscn.c (asm_newscn): Remove unused variable. diff --git a/libasm/Makefile.am b/libasm/Makefile.am index abe5468..e16d4be 100644 --- a/libasm/Makefile.am +++ b/libasm/Makefile.am @@ -28,7 +28,7 @@ ## not, see http://www.gnu.org/licenses/. ## include $(top_srcdir)/config/eu.am -INCLUDES += -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw +AM_CPPFLAGS += -I$(top_srcdir)/libelf -I$(top_srcdir)/libebl -I$(top_srcdir)/libdw
GCC_INCLUDE = -I$(shell $(CC) -print-file-name=include) VERSION = 1 diff --git a/libcpu/ChangeLog b/libcpu/ChangeLog index 5f7ed04..ef9d775 100644 --- a/libcpu/ChangeLog +++ b/libcpu/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2012-10-10 Roland McGrath roland@hack.frob.com
* Makefile.am (%_defs, $(srcdir)/%_dis.h): Redirect to temp file, diff --git a/libcpu/Makefile.am b/libcpu/Makefile.am index 1ef8801..13e3671 100644 --- a/libcpu/Makefile.am +++ b/libcpu/Makefile.am @@ -28,7 +28,7 @@ ## not, see http://www.gnu.org/licenses/. ## include $(top_srcdir)/config/eu.am -INCLUDES += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ +AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libasm AM_CFLAGS += -fpic -fdollars-in-identifiers LEXCOMPILE = $(LEX) $(LFLAGS) $(AM_LFLAGS) -P$(<F:lex.l=) diff --git a/libdw/ChangeLog b/libdw/ChangeLog index ae266d4..b4d9dc3 100644 --- a/libdw/ChangeLog +++ b/libdw/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2013-04-10 Mark Wielaard mjw@redhat.com
* dwarf_formref_die.c (dwarf_formref_die): Reference size is only diff --git a/libdw/Makefile.am b/libdw/Makefile.am index c6ac264..71a006f 100644 --- a/libdw/Makefile.am +++ b/libdw/Makefile.am @@ -32,7 +32,7 @@ DEFS += -DIS_LIBDW if BUILD_STATIC AM_CFLAGS += -fpic endif -INCLUDES += -I$(srcdir)/../libelf +AM_CPPFLAGS += -I$(srcdir)/../libelf VERSION = 1
lib_LIBRARIES = libdw.a diff --git a/libdwfl/ChangeLog b/libdwfl/ChangeLog index 41fc84b..e8285d1 100644 --- a/libdwfl/ChangeLog +++ b/libdwfl/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2013-03-20 Jan Kratochvil jan.kratochvil@redhat.com
* dwfl_report_elf.c (__libdwfl_report_elf): Remove BASE aligning. diff --git a/libdwfl/Makefile.am b/libdwfl/Makefile.am index 0ef4928..3ef4dd6 100644 --- a/libdwfl/Makefile.am +++ b/libdwfl/Makefile.am @@ -30,7 +30,7 @@ ## not, see http://www.gnu.org/licenses/. ## include $(top_srcdir)/config/eu.am -INCLUDES += -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ +AM_CPPFLAGS += -I$(srcdir) -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw VERSION = 1
diff --git a/libebl/ChangeLog b/libebl/ChangeLog index e881ce7..78f6b69 100644 --- a/libebl/ChangeLog +++ b/libebl/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2012-10-12 Jan Kratochvil jan.kratochvil@redhat.com
* ebl-hooks.h (abi_cfi): Extend its comment for return value. diff --git a/libebl/Makefile.am b/libebl/Makefile.am index 65e6b5b..4d62fad 100644 --- a/libebl/Makefile.am +++ b/libebl/Makefile.am @@ -29,7 +29,7 @@ ## include $(top_srcdir)/config/eu.am AM_CFLAGS += -fpic -INCLUDES += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm +AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libdw -I$(srcdir)/../libasm VERSION = 1 LIBEBL_SUBDIR = @LIBEBL_SUBDIR@
diff --git a/m4/ChangeLog b/m4/ChangeLog index d4f2bc1..f82b0ca 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,9 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * gettext.m4: Upgrade to gettext-0.18.2. + * iconv.m4: Upgrade to gettext-0.18.2. + * po.m4: Upgrade to gettext-0.18.2. + 2010-04-14 Roland McGrath roland@redhat.com
* gettext.m4: Upgrade to gettext-0.17. diff --git a/m4/gettext.m4 b/m4/gettext.m4 index c9ae1f7..8d1f066 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -1,5 +1,5 @@ -# gettext.m4 serial 60 (gettext-0.17) -dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +# gettext.m4 serial 66 (gettext-0.18.2) +dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -15,7 +15,7 @@ dnl They are *not* in the public domain.
dnl Authors: dnl Ulrich Drepper drepper@cygnus.com, 1995-2000. -dnl Bruno Haible haible@clisp.cons.org, 2000-2006. +dnl Bruno Haible haible@clisp.cons.org, 2000-2006, 2008-2010.
dnl Macro to add for using GNU gettext.
@@ -35,7 +35,7 @@ dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, -dnl the value `$(top_builddir)/intl/' is used. +dnl the value '$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled @@ -60,6 +60,8 @@ AC_DEFUN([AM_GNU_GETTEXT], ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) + ifelse(ifelse([$1], [], [old])[]ifelse([$1], [no-libtool], [old]), [old], + [AC_DIAGNOSE([obsolete], [Use of AM_GNU_GETTEXT without [external] argument is deprecated.])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) @@ -95,7 +97,7 @@ AC_DEFUN([AM_GNU_GETTEXT], AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ])
- dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation. + dnl Sometimes, on Mac OS X, libintl requires linking with CoreFoundation. gt_INTL_MACOSX
dnl Set USE_NLS. @@ -123,11 +125,11 @@ AC_DEFUN([AM_GNU_GETTEXT], gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) - AC_ARG_WITH(included-gettext, + AC_ARG_WITH([included-gettext], [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) - AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) + AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then @@ -155,12 +157,18 @@ changequote([,])dnl fi
AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc], - [AC_TRY_LINK([#include <libintl.h> + [AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include <libintl.h> $gt_revision_test_code extern int _nl_msg_cat_cntr; -extern int *_nl_domain_bindings;], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings], +extern int *_nl_domain_bindings; + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings + ]])], [eval "$gt_func_gnugettext_libc=yes"], [eval "$gt_func_gnugettext_libc=no"])])
@@ -181,35 +189,47 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_b gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. - AC_TRY_LINK([#include <libintl.h> + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include <libintl.h> $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif -const char *_nl_expand_alias (const char *);], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], +const char *_nl_expand_alias (const char *); + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ]])], [eval "$gt_func_gnugettext_libintl=yes"], [eval "$gt_func_gnugettext_libintl=no"]) dnl Now see whether libintl exists and depends on libiconv. if { eval "gt_val=$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include <libintl.h> + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include <libintl.h> $gt_revision_test_code extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif -const char *_nl_expand_alias (const char *);], - [bindtextdomain ("", ""); -return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")], - [LIBINTL="$LIBINTL $LIBICONV" - LTLIBINTL="$LTLIBINTL $LTLIBICONV" - eval "$gt_func_gnugettext_libintl=yes" - ]) +const char *_nl_expand_alias (const char *); + ]], + [[ +bindtextdomain ("", ""); +return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") + ]])], + [LIBINTL="$LIBINTL $LIBICONV" + LTLIBINTL="$LTLIBINTL $LTLIBICONV" + eval "$gt_func_gnugettext_libintl=yes" + ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) @@ -267,7 +287,7 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, + AC_DEFINE([ENABLE_NLS], [1], [Define to 1 if translation of program messages to the user's native language is requested.]) else @@ -301,9 +321,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a fi
dnl For backward compatibility. Some packages may be using this. - AC_DEFINE(HAVE_GETTEXT, 1, + AC_DEFINE([HAVE_GETTEXT], [1], [Define if the GNU gettext() function is already present or preinstalled.]) - AC_DEFINE(HAVE_DCGETTEXT, 1, + AC_DEFINE([HAVE_DCGETTEXT], [1], [Define if the GNU dcgettext() function is already present or preinstalled.]) fi
@@ -319,9 +339,9 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a fi
dnl Make all variables we use known to autoconf. - AC_SUBST(BUILD_INCLUDED_LIBINTL) - AC_SUBST(USE_INCLUDED_LIBINTL) - AC_SUBST(CATOBJEXT) + AC_SUBST([BUILD_INCLUDED_LIBINTL]) + AC_SUBST([USE_INCLUDED_LIBINTL]) + AC_SUBST([CATOBJEXT])
dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= @@ -329,36 +349,36 @@ return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_a
dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share - AC_SUBST(DATADIRNAME) + AC_SUBST([DATADIRNAME])
dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo - AC_SUBST(INSTOBJEXT) + AC_SUBST([INSTOBJEXT])
dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat - AC_SUBST(GENCAT) + AC_SUBST([GENCAT])
dnl For backward compatibility. Some Makefiles may be using this. INTLOBJS= if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="$(GETTOBJS)" fi - AC_SUBST(INTLOBJS) + AC_SUBST([INTLOBJS])
dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix - AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) + AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX]) ])
dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" - AC_SUBST(INTLLIBS) + AC_SUBST([INTLLIBS])
dnl Make all documented variables known to autoconf. - AC_SUBST(LIBINTL) - AC_SUBST(LTLIBINTL) - AC_SUBST(POSUB) + AC_SUBST([LIBINTL]) + AC_SUBST([LTLIBINTL]) + AC_SUBST([POSUB]) ])
diff --git a/m4/iconv.m4 b/m4/iconv.m4 index 66bc76f..a503646 100644 --- a/m4/iconv.m4 +++ b/m4/iconv.m4 @@ -1,5 +1,5 @@ -# iconv.m4 serial AM6 (gettext-0.17) -dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc. +# iconv.m4 serial 18 (gettext-0.18.2) +dnl Copyright (C) 2000-2002, 2007-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -30,44 +30,55 @@ AC_DEFUN([AM_ICONV_LINK], dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first - dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. + dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
- AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [ + AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no - AC_TRY_LINK([#include <stdlib.h> -#include <iconv.h>], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], - am_cv_func_iconv=yes) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include <stdlib.h> +#include <iconv.h> + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_func_iconv=yes]) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" - AC_TRY_LINK([#include <stdlib.h> -#include <iconv.h>], - [iconv_t cd = iconv_open("",""); - iconv(cd,NULL,NULL,NULL,NULL); - iconv_close(cd);], - am_cv_lib_iconv=yes - am_cv_func_iconv=yes) + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [[ +#include <stdlib.h> +#include <iconv.h> + ]], + [[iconv_t cd = iconv_open("",""); + iconv(cd,NULL,NULL,NULL,NULL); + iconv_close(cd);]])], + [am_cv_lib_iconv=yes] + [am_cv_func_iconv=yes]) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then - AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [ - dnl This tests against bugs in AIX 5.1 and HP-UX 11.11. + AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [ + dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11, + dnl Solaris 10. am_save_LIBS="$LIBS" if test $am_cv_lib_iconv = yes; then LIBS="$LIBS $LIBICONV" fi - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include <iconv.h> #include <string.h> int main () { + int result = 0; /* Test against AIX 5.1 bug: Failures are not distinguishable from successful returns. */ { @@ -84,7 +95,47 @@ int main () (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if (res == 0) - return 1; + result |= 1; + iconv_close (cd_utf8_to_88591); + } + } + /* Test against Solaris 10 bug: Failures are not distinguishable from + successful returns. */ + { + iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); + if (cd_ascii_to_88591 != (iconv_t)(-1)) + { + static const char input[] = "\263"; + char buf[10]; + const char *inptr = input; + size_t inbytesleft = strlen (input); + char *outptr = buf; + size_t outbytesleft = sizeof (buf); + size_t res = iconv (cd_ascii_to_88591, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res == 0) + result |= 2; + iconv_close (cd_ascii_to_88591); + } + } + /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ + { + iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); + if (cd_88591_to_utf8 != (iconv_t)(-1)) + { + static const char input[] = "\304"; + static char buf[2] = { (char)0xDE, (char)0xAD }; + const char *inptr = input; + size_t inbytesleft = 1; + char *outptr = buf; + size_t outbytesleft = 1; + size_t res = iconv (cd_88591_to_utf8, + (char **) &inptr, &inbytesleft, + &outptr, &outbytesleft); + if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) + result |= 4; + iconv_close (cd_88591_to_utf8); } } #if 0 /* This bug could be worked around by the caller. */ @@ -103,7 +154,8 @@ int main () (char **) &inptr, &inbytesleft, &outptr, &outbytesleft); if ((int)res > 0) - return 1; + result |= 8; + iconv_close (cd_88591_to_utf8); } } #endif @@ -117,13 +169,19 @@ int main () && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) /* Try HP-UX names. */ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) - return 1; - return 0; -}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no], - [case "$host_os" in + result |= 16; + return result; +}]])], + [am_cv_func_iconv_works=yes], + [am_cv_func_iconv_works=no], + [ +changequote(,)dnl + case "$host_os" in aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; *) am_cv_func_iconv_works="guessing yes" ;; - esac]) + esac +changequote([,])dnl + ]) LIBS="$am_save_LIBS" ]) case "$am_cv_func_iconv_works" in @@ -134,7 +192,7 @@ int main () am_func_iconv=no am_cv_lib_iconv=no fi if test "$am_func_iconv" = yes; then - AC_DEFINE(HAVE_ICONV, 1, + AC_DEFINE([HAVE_ICONV], [1], [Define if you have the iconv() function and it works.]) fi if test "$am_cv_lib_iconv" = yes; then @@ -147,34 +205,64 @@ int main () LIBICONV= LTLIBICONV= fi - AC_SUBST(LIBICONV) - AC_SUBST(LTLIBICONV) + AC_SUBST([LIBICONV]) + AC_SUBST([LTLIBICONV]) ])
-AC_DEFUN([AM_ICONV], +dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to +dnl avoid warnings like +dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required". +dnl This is tricky because of the way 'aclocal' is implemented: +dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN. +dnl Otherwise aclocal's initial scan pass would miss the macro definition. +dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions. +dnl Otherwise aclocal would emit many "Use of uninitialized value $1" +dnl warnings. +m4_define([gl_iconv_AC_DEFUN], + m4_version_prereq([2.64], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [m4_ifdef([gl_00GNULIB], + [[AC_DEFUN_ONCE( + [$1], [$2])]], + [[AC_DEFUN( + [$1], [$2])]])])) +gl_iconv_AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) - AC_CACHE_VAL(am_cv_proto_iconv, [ - AC_TRY_COMPILE([ + AC_CACHE_VAL([am_cv_proto_iconv], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[ #include <stdlib.h> #include <iconv.h> extern #ifdef __cplusplus "C" #endif -#if defined(__STDC__) || defined(__cplusplus) +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif -], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") + ]], + [[]])], + [am_cv_proto_iconv_arg1=""], + [am_cv_proto_iconv_arg1="const"]) am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` - AC_MSG_RESULT([$]{ac_t:- - }[$]am_cv_proto_iconv) - AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, + AC_MSG_RESULT([ + $am_cv_proto_iconv]) + AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1], [Define as const if the declaration of iconv() needs const.]) + dnl Also substitute ICONV_CONST in the gnulib generated <iconv.h>. + m4_ifdef([gl_ICONV_H_DEFAULTS], + [AC_REQUIRE([gl_ICONV_H_DEFAULTS]) + if test -n "$am_cv_proto_iconv_arg1"; then + ICONV_CONST="const" + fi + ]) fi ]) diff --git a/m4/po.m4 b/m4/po.m4 index 0734762..f395723 100644 --- a/m4/po.m4 +++ b/m4/po.m4 @@ -1,5 +1,5 @@ -# po.m4 serial 15 (gettext-0.17) -dnl Copyright (C) 1995-2007 Free Software Foundation, Inc. +# po.m4 serial 20 (gettext-0.18.2) +dnl Copyright (C) 1995-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -17,19 +17,19 @@ dnl Authors: dnl Ulrich Drepper drepper@cygnus.com, 1995-2000. dnl Bruno Haible haible@clisp.cons.org, 2000-2003.
-AC_PREREQ(2.50) +AC_PREREQ([2.60])
dnl Checks for all prerequisites of the po subdirectory. AC_DEFUN([AM_PO_SUBDIRS], [ AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl - AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake + AC_REQUIRE([AC_PROG_MKDIR_P])dnl AC_REQUIRE([AM_NLS])dnl
dnl Release version of the gettext macros. This is used to ensure that dnl the gettext macros and po/Makefile.in.in are in sync. - AC_SUBST([GETTEXT_MACRO_VERSION], [0.17]) + AC_SUBST([GETTEXT_MACRO_VERSION], [0.18])
dnl Perform the following tests also if --disable-nls has been given, dnl because they are needed for "make dist" to work. @@ -41,7 +41,7 @@ AC_DEFUN([AM_PO_SUBDIRS], [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 && (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], :) - AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
dnl Test whether it is GNU msgfmt >= 0.15. changequote(,)dnl @@ -102,7 +102,7 @@ changequote([,])dnl case "$ac_file" in */Makefile.in) # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -118,7 +118,8 @@ changequote([,])dnl if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then rm -f "$ac_dir/POTFILES" test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" - cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*$/d" -e "s,.*, $top_srcdir/& \\," | sed -e "$s/(.*) \\/\1/" > "$ac_dir/POTFILES" + gt_tab=`printf '\t'` + cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*$/d" -e "s,.*, $top_srcdir/& \\," | sed -e "$s/(.*) \\/\1/" > "$ac_dir/POTFILES" POMAKEFILEDEPS="POTFILES.in" # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend # on $ac_dir but don't depend on user-specified configuration @@ -129,12 +130,12 @@ changequote([,])dnl test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" fi ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" else # The set of available languages was given in configure.in. - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' fi # Compute POFILES @@ -226,7 +227,7 @@ AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], changequote(,)dnl # Adjust a relative srcdir. ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` - ac_dir_suffix="/`echo "$ac_dir"|sed 's%^./%%'`" + ac_dir_suffix=/`echo "$ac_dir"|sed 's%^./%%'` ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` # In autoconf-2.13 it is called $ac_given_srcdir. # In autoconf-2.50 it is called $srcdir. @@ -254,6 +255,7 @@ EOT fi
# A sed script that extracts the value of VARIABLE from a Makefile. + tab=`printf '\t'` sed_x_variable=' # Test if the hold space is empty. x @@ -261,9 +263,9 @@ s/P/P/ x ta # Yes it was empty. Look if we have the expected variable definition. -/^[ ]*VARIABLE[ ]*=/{ +/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=/{ # Seen the first line of the variable definition. - s/^[ ]*VARIABLE[ ]*=// + s/^['"${tab}"' ]*VARIABLE['"${tab}"' ]*=// ba } bd @@ -315,7 +317,7 @@ changequote([,])dnl sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'` ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"` fi - # Hide the ALL_LINGUAS assigment from automake < 1.5. + # Hide the ALL_LINGUAS assignment from automake < 1.5. eval 'ALL_LINGUAS''=$ALL_LINGUAS_' # Compute POFILES # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) @@ -405,14 +407,15 @@ changequote([,])dnl fi
sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp" + tab=`printf '\t'` if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then # Add dependencies that cannot be formulated as a simple suffix rule. for lang in $ALL_LINGUAS; do frobbedlang=`echo $lang | sed -e 's/..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'` cat >> "$ac_file.tmp" <<EOF $frobbedlang.msg: $lang.po - @echo "$(MSGFMT) -c --tcl -d $(srcdir) -l $lang $srcdirpre$lang.po"; \ - $(MSGFMT) -c --tcl -d "$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "$(srcdir)/$frobbedlang.msg"; exit 1; } +${tab}@echo "$(MSGFMT) -c --tcl -d $(srcdir) -l $lang $srcdirpre$lang.po"; \ +${tab}$(MSGFMT) -c --tcl -d "$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "$(srcdir)/$frobbedlang.msg"; exit 1; } EOF done fi @@ -422,8 +425,8 @@ EOF frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'` cat >> "$ac_file.tmp" <<EOF $frobbedlang/$(DOMAIN).resources.dll: $lang.po - @echo "$(MSGFMT) -c --csharp -d $(srcdir) -l $lang $srcdirpre$lang.po -r $(DOMAIN)"; \ - $(MSGFMT) -c --csharp -d "$(srcdir)" -l $lang $srcdirpre$lang.po -r "$(DOMAIN)" || { rm -f "$(srcdir)/$frobbedlang.msg"; exit 1; } +${tab}@echo "$(MSGFMT) -c --csharp -d $(srcdir) -l $lang $srcdirpre$lang.po -r $(DOMAIN)"; \ +${tab}$(MSGFMT) -c --csharp -d "$(srcdir)" -l $lang $srcdirpre$lang.po -r "$(DOMAIN)" || { rm -f "$(srcdir)/$frobbedlang.msg"; exit 1; } EOF done fi diff --git a/po/ChangeLog b/po/ChangeLog index a90f4ad..326bd67 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.in.in: Upgrade to gettext-0.18.2. + 2012-08-27 Mark Wielaard mjw@redhat.com
* *.po: Update for 0.155. diff --git a/po/Makefile.in.in b/po/Makefile.in.in index fecf500..fce63a6 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -1,5 +1,5 @@ # Makefile for PO directory in any package using GNU gettext. -# Copyright (C) 1995-1997, 2000-2007 by Ulrich Drepper drepper@gnu.ai.mit.edu +# Copyright (C) 1995-1997, 2000-2007, 2009-2010 by Ulrich Drepper drepper@gnu.ai.mit.edu # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public @@ -8,8 +8,8 @@ # Please note that the actual code of GNU gettext is covered by the GNU # General Public License and is *not* in the public domain. # -# Origin: gettext-0.17 -GETTEXT_MACRO_VERSION = 0.17 +# Origin: gettext-0.18.2 +GETTEXT_MACRO_VERSION = 0.18
PACKAGE = @PACKAGE@ VERSION = @VERSION@ @@ -88,22 +88,22 @@ CATALOGS = @CATALOGS@ .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo + echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o $${lang}.gmo $${lang}.po"; \ + cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics --verbose -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
.sin.sed: sed -e '/^#/d' $< > t-$@ mv t-$@ $@
-all: check-macro-version all-@USE_NLS@ +all: all-@USE_NLS@
all-yes: stamp-po all-no:
# Ensure that the gettext macros and this Makefile.in.in are in sync. -check-macro-version: - @test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ +CHECK_MACRO_VERSION = \ + test "$(GETTEXT_MACRO_VERSION)" = "@GETTEXT_MACRO_VERSION@" \ || { echo "*** error: gettext infrastructure mismatch: using a Makefile.in.in from gettext version $(GETTEXT_MACRO_VERSION) but the autoconf macros are from gettext version @GETTEXT_MACRO_VERSION@" 1>&2; \ exit 1; \ } @@ -123,6 +123,7 @@ check-macro-version: # $(POFILES) has been designed to not touch files that don't need to be # changed. stamp-po: $(srcdir)/$(DOMAIN).pot + @$(CHECK_MACRO_VERSION) test ! -f $(srcdir)/$(DOMAIN).pot || \ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES) @test ! -f $(srcdir)/$(DOMAIN).pot || { \ @@ -137,8 +138,16 @@ stamp-po: $(srcdir)/$(DOMAIN).pot
# This target rebuilds $(DOMAIN).pot; it is an expensive operation. # Note that $(DOMAIN).pot is not touched if it doesn't need to be changed. +# The determination of whether the package xyz is a GNU one is based on the +# heuristic whether some file in the top level directory mentions "GNU xyz". +# If GNU 'find' is available, we avoid grepping through monster files. $(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed - if LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null | grep -v 'libtool:' >/dev/null; then \ + if { if (LC_ALL=C find --version) 2>/dev/null | grep GNU >/dev/null; then \ + LC_ALL=C find -L $(top_srcdir) -maxdepth 1 -type f -size -10000000c -exec grep 'GNU @PACKAGE@' /dev/null '{}' ';' 2>/dev/null; \ + else \ + LC_ALL=C grep 'GNU @PACKAGE@' $(top_srcdir)/* 2>/dev/null; \ + fi; \ + } | grep -v 'libtool:' >/dev/null; then \ package_gnu='GNU '; \ else \ package_gnu=''; \ @@ -193,8 +202,15 @@ $(POFILES): $(srcdir)/$(DOMAIN).pot @lang=`echo $@ | sed -e 's,.*/,,' -e 's/.po$$//'`; \ if test -f "$(srcdir)/$${lang}.po"; then \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \ - cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \ + echo "$${cdcmd}$(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot"; \ + cd $(srcdir) \ + && { case `$(MSGMERGE_UPDATE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) $${lang}.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE_UPDATE) $(MSGMERGE_OPTIONS) --lang=$${lang} $${lang}.po $(DOMAIN).pot;; \ + esac; \ + }; \ else \ $(MAKE) $${lang}.po-create; \ fi @@ -217,7 +233,6 @@ install-data: install-data-@USE_NLS@ fi install-data-no: all install-data-yes: all - $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ @@ -269,7 +284,6 @@ installdirs-data: installdirs-data-@USE_NLS@ fi installdirs-data-no: installdirs-data-yes: - $(mkdir_p) $(DESTDIR)$(datadir) @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ @@ -395,9 +409,15 @@ update-po: Makefile tmpdir=`pwd`; \ echo "$$lang:"; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ + echo "$${cdcmd}$(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \ cd $(srcdir); \ - if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \ + if { case `$(MSGMERGE) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ + '' | 0.[0-9] | 0.[0-9].* | 0.1[0-7] | 0.1[0-7].*) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + *) \ + $(MSGMERGE) $(MSGMERGE_OPTIONS) --lang=$$lang -o $$tmpdir/$$lang.new.po $$lang.po $(DOMAIN).pot;; \ + esac; \ + }; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ @@ -418,9 +438,13 @@ $(DUMMYPOFILES): update-gmo: Makefile $(GMOFILES) @:
+# Recreate Makefile by invoking config.status. Explicitly invoke the shell, +# because execution permission bits may not work on the current file system. +# Use @SHELL@, which is the shell determined by autoconf for the use by its +# scripts, not $(SHELL) which is hardwired to /bin/sh and may be deficient. Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@ cd $(top_builddir) \ - && $(SHELL) ./config.status $(subdir)/$@.in po-directories + && @SHELL@ ./config.status $(subdir)/$@.in po-directories
force:
diff --git a/src/ChangeLog b/src/ChangeLog index ec65611..5c3bf65 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2013-03-25 Mark Wielaard mjw@redhat.com
* readelf.c (argp_options): Add decodedline. diff --git a/src/Makefile.am b/src/Makefile.am index cf4875e..674846d 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -19,7 +19,7 @@ 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 \ +AM_CPPFLAGS += -I$(srcdir)/../libelf -I$(srcdir)/../libebl \ -I$(srcdir)/../libdw -I$(srcdir)/../libdwfl \ -I$(srcdir)/../libasm
diff --git a/tests/ChangeLog b/tests/ChangeLog index f159eba..fe34cde 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +2013-04-24 Mark Wielaard mjw@redhat.com + + * Makefile.am: Use AM_CPPFLAGS instead of INCLUDES. + 2013-04-25 Mark Wielaard mjw@redhat.com
* Makefile.am (installed_TESTS_ENVIRONMENT): Export environment, diff --git a/tests/Makefile.am b/tests/Makefile.am index 259968e..521a7fd 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -26,7 +26,7 @@ endif AM_LDFLAGS =
if !STANDALONE -INCLUDES += -I$(top_srcdir)/libasm -I$(top_srcdir)/libdw \ +AM_CPPFLAGS += -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..
I just skimmed but it seems fine. If that's all compatible with 1.11, then I think you should do this, along with putting 1.11 in AM_INIT_AUTOMAKE, before the parallel-tests changes. This should be a no-op cleanup change, so it makes more sense to do it before functional changes than paired with them.
Thanks, Roland
On Thu, 2013-04-25 at 14:21 -0700, Roland McGrath wrote:
I just skimmed but it seems fine. If that's all compatible with 1.11, then I think you should do this, along with putting 1.11 in AM_INIT_AUTOMAKE, before the parallel-tests changes. This should be a no-op cleanup change, so it makes more sense to do it before functional changes than paired with them.
Done and pushed. I had written the parallel-tests change first, since I wanted to make sure that was easy to do. But git easily lets me rewrite history as if the order was reversed :)
Cheers,
Mark
Looks generally OK. A few potential clean-ups:
I think it will keep everyone saner in the long run if canonical variables like srcdir have their canonical meanings everywhere. So if you really need them to use an absolute directory name, then make them use abs_srcdir as the variable name for that.
Rather than various numbers of ../ prefixes, perhaps it would become easier to read and to maintain if all those were rewritten in terms of builddir and/or top_builddir (i.e. $top_builddir/src/readelf, etc.).
Thanks, Roland
On Thu, 2013-04-25 at 14:19 -0700, Roland McGrath wrote:
Looks generally OK. A few potential clean-ups:
I think it will keep everyone saner in the long run if canonical variables like srcdir have their canonical meanings everywhere. So if you really need them to use an absolute directory name, then make them use abs_srcdir as the variable name for that.
Yes, that is cleaner. I export abs_srcdir from the Makefile now and use that instead of (relative) paths from srcdir.
Rather than various numbers of ../ prefixes, perhaps it would become easier to read and to maintain if all those were rewritten in terms of builddir and/or top_builddir (i.e. $top_builddir/src/readelf, etc.).
Yes, the multiple ../ prefixes might not be as easy to read/understand immediately. Since we are using abs_srcdir above already I paired it with abs_builddir and reference all input files in the run-test*sh scripts. So everything in the tests should now be referenced either from the current test directory, using abs_srcdir or abs_builddir.
Thanks,
Mark
Don't use $abs_builddir/../src and the like. Use $abs_top_builddir/src instead. Then it's not assuming where it sits in the tree either, just where the named thing sits.
You're still using ../.. in the library path, which is also bad.
On Fri, 2013-04-26 at 09:53 -0700, Roland McGrath wrote:
Don't use $abs_builddir/../src and the like. Use $abs_top_builddir/src instead. Then it's not assuming where it sits in the tree either, just where the named thing sits.
Done.
You're still using ../.. in the library path, which is also bad.
Missed that one, changed. No more /../ paths anywhere.
Also fixed make installcheck to work properly again by adding LOG_COMPILER.
Thanks,
Mark
If check and installcheck both work (and it's verified they are really loading the right backend libraries) then it's fine by me.
elfutils-devel@lists.fedorahosted.org