New module 'fchdir'.
[gnulib.git] / modules / unistd
index 177b95c..d04c80c 100644 (file)
@@ -3,6 +3,7 @@ A <unistd.h> for systems lacking it.
 
 Files:
 m4/unistd_h.m4
+lib/unistd_.h
 
 Depends-on:
 
@@ -14,11 +15,14 @@ BUILT_SOURCES += $(UNISTD_H)
 
 # We need the following in order to create an empty placeholder for
 # <unistd.h> when the system doesn't have one.
-unistd.h:
+unistd.h: unistd_.h
+       rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         echo '/* Empty placeholder for $@.  */'; \
-       } > $@
-MOSTLYCLEANFILES += unistd.h
+         sed -e 's|@''ABSOLUTE_UNISTD_H''@|$(ABSOLUTE_UNISTD_H)|g' \
+             < $(srcdir)/unistd_.h; \
+       } > $@-t
+       mv $@-t $@
+MOSTLYCLEANFILES += unistd.h unistd.h-t
 
 Include:
 #include <unistd.h>