Rename module xreadlink to xreadlink-with-size.
[gnulib.git] / modules / sys_socket
index aa86954..a1785aa 100644 (file)
@@ -10,19 +10,19 @@ Depends-on:
 
 configure.ac:
 gl_HEADER_SYS_SOCKET
+AC_PROG_MKDIR_P
 
 Makefile.am:
 BUILT_SOURCES += $(SYS_SOCKET_H)
-EXTRA_DIST += socket_.h
 
 # We need the following in order to create <sys/socket.h> when the system
 # doesn't have one that works with the given compiler.
 sys/socket.h: socket_.h
-       test -d sys || mkdir sys
-       rm -f $@-t $@
-       cp $(srcdir)/socket_.h $@-t
-       chmod a-x $@-t
-       mv $@-t $@
+       @MKDIR_P@ sys
+       { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+         cat $(srcdir)/socket_.h; \
+       } > $@-t
+       mv -f $@-t $@
 MOSTLYCLEANFILES += sys/socket.h sys/socket.h-t
 MOSTLYCLEANDIRS += sys