X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=modules%2Fpthread;h=eef4b07165505cba27dcd8e778aaabdf90d6f6c9;hb=f8fea966d67a6ba06231689e63f668bd55ee5797;hp=9b930b1be543230193b1e3781c5acfb3ce9a922e;hpb=7f2ece896984db0787f92ce2d95462d41eef442f;p=gnulib.git diff --git a/modules/pthread b/modules/pthread index 9b930b1be..eef4b0716 100644 --- a/modules/pthread +++ b/modules/pthread @@ -17,9 +17,26 @@ BUILT_SOURCES += $(PTHREAD_H) # We need the following in order to create 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 $@ -MOSTLYCLEANFILES += pthread.h +if GL_GENERATE_PTHREAD_H +pthread.h: pthread.in.h $(top_builddir)/config.status + $(AM_V_GEN)rm -f $@-t $@ && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ + sed -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + -e 's|@''HAVE_PTHREAD_H''@|$(HAVE_PTHREAD_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_PTHREAD_H''@|$(NEXT_PTHREAD_H)|g' \ + -e 's|@''HAVE_PTHREAD_T''@|$(HAVE_PTHREAD_T)|g' \ + -e 's|@''HAVE_PTHREAD_SPINLOCK_T''@|$(HAVE_PTHREAD_SPINLOCK_T)|g' \ + < $(srcdir)/pthread.in.h; \ + } > $@-t && \ + mv $@-t $@ +else +pthread.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += pthread.h pthread.h-t Include: