summaryrefslogtreecommitdiffstats
path: root/tests/Makefile.am
diff options
context:
space:
mode:
authorVincent Danjean <Vincent.Danjean@ens-lyon.org>2012-06-21 08:03:31 (GMT)
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-10 22:16:24 (GMT)
commit4f66601450ab246d1b3fb2f7fba106ca6c8af089 (patch)
tree849c2aae19ba513c155e5461f453338866f7a4be /tests/Makefile.am
parentf12f3c96916a12c2e80e9ce6890ec839f56b2a39 (diff)
downloadpatchelf-4f66601450ab246d1b3fb2f7fba106ca6c8af089.zip
patchelf-4f66601450ab246d1b3fb2f7fba106ca6c8af089.tar.gz
patchelf-4f66601450ab246d1b3fb2f7fba106ca6c8af089.tar.bz2
fix build *and check* out of tree
- use Makefile variables $< (and $@) so that sources are found correctly - use ${srcdir} in test scripts to find the sources This allows "make distcheck" to successfully pass
Diffstat (limited to 'tests/Makefile.am')
-rw-r--r--tests/Makefile.am8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 9d9b6bc..aa9e22b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,7 +18,7 @@ main-scoped: main.o libfoo-scoped.so
LD_LIBRARY_PATH=. gcc -Wl,--enable-new-dtags -o main-scoped main.o -L . -lfoo-scoped
main.o: main.c
- $(CC) -fpic -o main.o -c main.c
+ $(CC) -fpic -o $@ -c $<
libfoo.so: foo.o libbar.so
NIX_DONT_SET_RPATH=1 $(CC) -Wl,--disable-new-dtags -shared -o libfoo.so foo.o -L . -lbar
@@ -27,7 +27,7 @@ libfoo-scoped.so: foo.o libbar-scoped.so
NIX_DONT_SET_RPATH=1 $(CC) -Wl,--enable-new-dtags -shared -o libfoo-scoped.so foo.o -L . -lbar-scoped
foo.o: foo.c
- $(CC) -fpic -o foo.o -c foo.c
+ $(CC) -fpic -o $@ -c $<
libbar.so: bar.o
NIX_DONT_SET_RPATH=1 $(CC) -Wl,--disable-new-dtags -shared -o libbar.so bar.o -L . -Wl,-rpath,`pwd`/no-such-path
@@ -36,7 +36,7 @@ libbar-scoped.so: bar.o
NIX_DONT_SET_RPATH=1 $(CC) -Wl,--enable-new-dtags -shared -o libbar-scoped.so bar.o
bar.o: bar.c
- $(CC) -fpic -o bar.o -c bar.c
+ $(CC) -fpic -o $@ -c $<
big_dynstr_SOURCES = big-dynstr.c
@@ -45,7 +45,7 @@ big-dynstr: big-dynstr.o libfoo.so
LD_LIBRARY_PATH=. gcc -Wl,--disable-new-dtags -o big-dynstr big-dynstr.o -L . -lfoo
big-dynstr.c: main.c
- cat main.c > big-dynstr.c
+ cat $< > big-dynstr.c
for i in $$(seq 1 2000); do echo "void f$$i(void) { };" >> big-dynstr.c; done