pthread: fix pthread.h creation for srcdir != builddir
[gnulib.git] / modules / pthread
index 9b930b1..51d5dbb 100644 (file)
@@ -18,7 +18,8 @@ BUILT_SOURCES += $(PTHREAD_H)
 # We need the following in order to create <pthread.h> when the system
 # doesn't have one that works with the given compiler.
 pthread.h: pthread.in.h
-       $(AM_V_GEN)ln -f pthread.in.h $@ || cp pthread.in.h $@
+       $(AM_V_GEN)ln -f $(srcdir)/pthread.in.h $@ \
+          || cp $(srcdir)/pthread.in.h $@
 MOSTLYCLEANFILES += pthread.h
 
 Include: