Mark generated files as "DO NOT EDIT".
[pspp] / modules / getopt
index 420250c3a171cd45cc6db0bfdf4017bf976ef31a..bf1da551218df7a6baf11245e744372224b2fad1 100644 (file)
@@ -10,6 +10,7 @@ m4/getopt.m4
 
 Depends-on:
 gettext-h
+unistd
 
 configure.ac:
 gl_GETOPT
@@ -21,8 +22,10 @@ EXTRA_DIST += getopt_.h getopt_int.h
 # We need the following in order to create <getopt.h> when the system
 # doesn't have one that works with the given compiler.
 getopt.h: getopt_.h
-       cp $(srcdir)/getopt_.h $@-t
-       mv $@-t $@
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/getopt_.h; \
+       } > $@-t
+       mv -f $@-t $@
 MOSTLYCLEANFILES += getopt.h getopt.h-t
 
 Include: