annotate automake snippets with $(AM_V_GEN) and $(AM_V_at)
[pspp] / modules / sys_select
index be92f4b557b8014e2da368cdcec6e229e53f862a..2f6bdaecac07ce57c9be6d2dc0d8d2c5d3f63082 100644 (file)
@@ -1,11 +1,15 @@
 Description:
-A <sys/select.h> for systems lacking it (e.g., Mingw).
+A <sys/select.h> for systems lacking it.
 
 Files:
+lib/sys_select.in.h
 m4/sys_select_h.m4
 
 Depends-on:
+include_next
+link-warning
 sys_socket
+sys_time
 
 configure.ac:
 gl_HEADER_SYS_SELECT
@@ -16,12 +20,20 @@ BUILT_SOURCES += $(SYS_SELECT_H)
 
 # We need the following in order to create <sys/select.h> when the system
 # doesn't have one that works with the given compiler.
-sys/select.h:
-       @MKDIR_P@ sys
-       rm -f $@-t $@
+sys/select.h: sys_select.in.h
+       $(AM_V_at)@MKDIR_P@ sys
+       $(AM_V_GEN)rm -f $@-t $@ && \
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
-         echo '#include <sys/socket.h>'; \
-       } > $@-t
+         sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+             -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+             -e 's|@''NEXT_SYS_SELECT_H''@|$(NEXT_SYS_SELECT_H)|g' \
+             -e 's|@''HAVE_SYS_SELECT_H''@|$(HAVE_SYS_SELECT_H)|g' \
+             -e 's|@''GNULIB_SELECT''@|$(GNULIB_SELECT)|g' \
+             -e 's|@''HAVE_WINSOCK2_H''@|$(HAVE_WINSOCK2_H)|g' \
+             -e 's|@''REPLACE_SELECT''@|$(REPLACE_SELECT)|g' \
+             -e '/definition of GL_LINK_WARNING/r $(LINK_WARNING_H)' \
+             < $(srcdir)/sys_select.in.h; \
+       } > $@-t && \
        mv $@-t $@
 MOSTLYCLEANFILES += sys/select.h sys/select.h-t
 MOSTLYCLEANDIRS += sys
@@ -30,7 +42,7 @@ Include:
 #include <sys/select.h>
 
 License:
-LGPL
+LGPLv2+
 
 Maintainer:
 Simon Josefsson