Fix problems to do with make dist/make distcheck not finding the source
file vg_libpthread.so.0.c. Now:
* libpthread.so is built as just-another-so, like valgrind.so and
valgrinq.so.
* there is a new dummy target libpthread.so.0 which is build just
by a symlink.
Unfortunately for some reason, when the .so.0 is installed, it gets
a complete copy rather than just the symlink being copied. But it
works, at least.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@68 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am
index 6e1826a..91ad395 100644
--- a/coregrind/Makefile.am
+++ b/coregrind/Makefile.am
@@ -24,7 +24,10 @@
README_KDE3_FOLKS \
README_MISSING_SYSCALL_OR_IOCTL TODO
-val_PROGRAMS = valgrind.so valgrinq.so libpthread.so.0
+val_PROGRAMS = valgrind.so valgrinq.so libpthread.so libpthread.so.0
+
+libpthread_so_SOURCES = vg_libpthread.c
+libpthread_so_0_SOURCES = vg_libpthread.c
valgrinq_so_SOURCES = vg_valgrinq_dummy.c
@@ -79,12 +82,15 @@
vg_clientmalloc.o: vg_clientmalloc.c $(MANUAL_DEPS)
$(COMPILE) -fno-omit-frame-pointer -c $<
-libpthread.so.0: vg_libpthread.c $(MANUAL_DEPS)
- $(CC) -Wall -g -O -shared -fpic -o $@ $<
-
valgrind.so: $(valgrind_so_OBJECTS)
$(CC) $(CFLAGS) $(LDFLAGS) -shared -o valgrind.so \
$(valgrind_so_OBJECTS) $(valgrind_so_LDADD)
valgrinq.so: $(valgrinq_so_OBJECTS)
$(CC) $(CFLAGS) -shared -o valgrinq.so $(valgrinq_so_OBJECTS)
+
+libpthread.so: $(libpthread_so_OBJECTS)
+ $(CC) -Wall -g -O -shared -fpic -o libpthread.so $(libpthread_so_OBJECTS)
+
+libpthread.so.0: libpthread.so
+ ln -s libpthread.so libpthread.so.0