configure.ac:
gl_HEADER_SYS_SELECT
+AC_PROG_MKDIR_P
Makefile.am:
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:
- test -d sys || mkdir sys
+ @MKDIR_P@ sys
rm -f $@-t $@
- echo '#include <sys/socket.h>' >$@-t
- chmod a-w $@-t
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#include <sys/socket.h>'; \
+ } > $@-t
mv $@-t $@
MOSTLYCLEANFILES += sys/select.h sys/select.h-t
MOSTLYCLEANDIRS += sys