summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Danjean <Vincent.Danjean@ens-lyon.org>2012-06-21 10:03:31 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2012-07-10 18:16:24 -0400
commit4f66601450ab246d1b3fb2f7fba106ca6c8af089 (patch)
tree849c2aae19ba513c155e5461f453338866f7a4be
parentf12f3c96916a12c2e80e9ce6890ec839f56b2a39 (diff)
downloadpatchelf-4f66601450ab246d1b3fb2f7fba106ca6c8af089.tar.gz
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
-rw-r--r--tests/Makefile.am8
-rwxr-xr-xtests/no-rpath.sh2
2 files changed, 5 insertions, 5 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
diff --git a/tests/no-rpath.sh b/tests/no-rpath.sh
index c253952..7245317 100755
--- a/tests/no-rpath.sh
+++ b/tests/no-rpath.sh
@@ -3,7 +3,7 @@
rm -rf scratch
mkdir -p scratch
-cp no-rpath scratch/
+cp ${srcdir}/no-rpath scratch/
oldRPath=$(../src/patchelf --print-rpath scratch/no-rpath)
if test -n "$oldRPath"; then exit 1; fi