diff options
author | Guillem Jover <guillem@debian.org> | 2011-12-12 09:54:40 +0100 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2011-12-13 08:13:46 +0100 |
commit | 4803403a62716380237fbe074b7ce638b4bf862e (patch) | |
tree | 49e297fd9849e885f7b8ca6dd230d3af6fe2198b /scripts/Makefile.am | |
parent | 00f33e41b2c67669b08661885cf85f1cb81c0031 (diff) | |
download | dpkg-4803403a62716380237fbe074b7ce638b4bf862e.tar.gz |
build: Reintroduce objdump pattern and tag test case data files
Generating these at check time causes several problems. It requires a
system supporting versioned symbols and a GNU ld command line compatible
linker. Those are not available for example on Mac OS X.
Using libtool could have been an option to portably build the shared
libraries, although that still does not provide versioned symbols where
they are not available. The problem with libtool is that there's no sane
way to refer to the actual built shared library on the build tree.
Introduce a refresh-test-data target to be able to easily regenerate
those files when needed, e.g. when the test suite changes.
Reported-by: Stuart Ambler <stuart@zulazon.com>
Diffstat (limited to 'scripts/Makefile.am')
-rw-r--r-- | scripts/Makefile.am | 48 |
1 files changed, 27 insertions, 21 deletions
diff --git a/scripts/Makefile.am b/scripts/Makefile.am index 98d2950ff..46450d45a 100644 --- a/scripts/Makefile.am +++ b/scripts/Makefile.am @@ -49,6 +49,7 @@ EXTRA_DIST = \ CLEANFILES = \ + $(test_data_objects) \ $(bin_SCRIPTS) $(changelog_SCRIPTS) perllibdir = $(PERL_LIBDIR) @@ -191,11 +192,6 @@ test_cases = \ t/850_Dpkg_Compression.t \ t/910_merge_changelogs.t -check_DATA = \ - $(test_tmpdir)/200_Dpkg_Shlibs/objdump.basictags-amd64 \ - $(test_tmpdir)/200_Dpkg_Shlibs/objdump.basictags-i386 \ - $(test_tmpdir)/200_Dpkg_Shlibs/objdump.patterns - test_data = \ t/200_Dpkg_Shlibs/symbols.fake-1 \ t/200_Dpkg_Shlibs/symbols.fake-2 \ @@ -214,6 +210,9 @@ test_data = \ t/200_Dpkg_Shlibs/ld.so.conf.d/inf_recurse.conf \ t/200_Dpkg_Shlibs/ld.so.conf.d/recursive.conf \ t/200_Dpkg_Shlibs/objdump.space \ + t/200_Dpkg_Shlibs/objdump.basictags-amd64 \ + t/200_Dpkg_Shlibs/objdump.basictags-i386 \ + t/200_Dpkg_Shlibs/objdump.patterns \ t/200_Dpkg_Shlibs/objdump.glib-ia64 \ t/200_Dpkg_Shlibs/objdump.libc6-2.3 \ t/200_Dpkg_Shlibs/objdump.libc6-2.6 \ @@ -237,29 +236,36 @@ test_data = \ t/origins/default \ t/origins/ubuntu -objdump_lib_name = lib`basename $@`.so +test_data_objects = \ + t/200_Dpkg_Shlibs/libobjdump.basictags-amd64.so \ + t/200_Dpkg_Shlibs/libobjdump.basictags-i386.so \ + t/200_Dpkg_Shlibs/libobjdump.patterns.so -$(test_tmpdir)/200_Dpkg_Shlibs/objdump.basictags-amd64: $(srcdir)/t/200_Dpkg_Shlibs/basictags.c - $(mkdir_p) $(test_tmpdir)/200_Dpkg_Shlibs +$(srcdir)/t/200_Dpkg_Shlibs/libobjdump.basictags-amd64.so: $(srcdir)/t/200_Dpkg_Shlibs/basictags.c $(CC) $(CFLAGS) -shared -fPIC -Wl,-soname -Wl,libbasictags.so.1 $< \ - -DAMD64 -o $(objdump_lib_name) - objdump -w -f -p -T -R $(objdump_lib_name) > $@ - rm -f $(objdump_lib_name) + -DAMD64 -o $@ -$(test_tmpdir)/200_Dpkg_Shlibs/objdump.basictags-i386: $(srcdir)/t/200_Dpkg_Shlibs/basictags.c - $(mkdir_p) $(test_tmpdir)/200_Dpkg_Shlibs +$(srcdir)/t/200_Dpkg_Shlibs/libobjdump.basictags-i386.so: $(srcdir)/t/200_Dpkg_Shlibs/basictags.c $(CC) $(CFLAGS) -shared -fPIC -Wl,-soname -Wl,libbasictags.so.1 $< \ - -o $(objdump_lib_name) - objdump -w -f -p -T -R $(objdump_lib_name) > $@ - rm -f $(objdump_lib_name) + -o $@ -$(test_tmpdir)/200_Dpkg_Shlibs/objdump.patterns: $(srcdir)/t/200_Dpkg_Shlibs/patterns.cpp $(srcdir)/t/200_Dpkg_Shlibs/patterns.map - $(mkdir_p) $(test_tmpdir)/200_Dpkg_Shlibs +$(srcdir)/t/200_Dpkg_Shlibs/libobjdump.patterns.so: $(srcdir)/t/200_Dpkg_Shlibs/patterns.cpp $(srcdir)/t/200_Dpkg_Shlibs/patterns.map $(CXX) $(CXXFLAGS) -shared -fPIC -Wl,-soname -Wl,libpatterns.so.1 \ -Wl,--version-script=$(srcdir)/t/200_Dpkg_Shlibs/patterns.map $< \ - -o $(objdump_lib_name) - objdump -w -f -p -T -R $(objdump_lib_name) > $@ - rm -f $(objdump_lib_name) + -o $@ + +.PHONY: refresh-test-data + +OBJDUMP = objdump -w -f -p -T -R + +refresh-test-data: $(test_data_objects) + $(OBJDUMP) $(srcdir)/t/200_Dpkg_Shlibs/libobjdump.basictags-amd64.so \ + >$(srcdir)/t/200_Dpkg_Shlibs/objdump.basictags-amd64 + $(OBJDUMP) $(srcdir)/t/200_Dpkg_Shlibs/libobjdump.basictags-i386.so \ + >$(srcdir)/t/200_Dpkg_Shlibs/objdump.basictags-i386 + $(OBJDUMP) $(srcdir)/t/200_Dpkg_Shlibs/libobjdump.patterns.so \ + >$(srcdir)/t/200_Dpkg_Shlibs/objdump.patterns + $(OBJDUMP) `which ls` >$(srcdir)/t/200_Dpkg_Shlibs/objdump.ls include $(top_srcdir)/Makecheck.am |