Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
authorJim Meyering <jim@meyering.net>
Thu, 18 Jan 2007 16:19:13 +0000 (16:19 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 18 Jan 2007 16:19:13 +0000 (16:19 +0000)
* modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
than the race-prone "test -d sys || mkdir sys".
(configure.ac): Use AC_PROG_MKDIR_P.
* modules/sys_select: Likewise.
* modules/sys_socket: Likewise.
* modules/sys_time: Likewise.

ChangeLog
modules/sys_select
modules/sys_socket
modules/sys_stat
modules/sys_time

index 6aabd47de0ce54870b7fe9ff049717062bbbb6a7..8825af1e2ead4e05cf83b4bacd218d14f41d381e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2007-01-18  Jim Meyering  <jim@meyering.net>
+
+       Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
+       * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
+       than the race-prone "test -d sys || mkdir sys".
+       (configure.ac): Use AC_PROG_MKDIR_P.
+       * modules/sys_select: Likewise.
+       * modules/sys_socket: Likewise.
+       * modules/sys_time: Likewise.
+
 2007-01-18  Eric Blake  <ebb9@byu.net>
 
        * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
index 76ae6f9a5eec8837c5eaaaa8d50ea35bb50901f7..3319c3cd8a2f65d1ed982dc380dc74906eb028b9 100644 (file)
@@ -9,6 +9,7 @@ sys_socket
 
 configure.ac:
 gl_HEADER_SYS_SELECT
+AC_PROG_MKDIR_P
 
 Makefile.am:
 BUILT_SOURCES += $(SYS_SELECT_H)
@@ -16,7 +17,7 @@ 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 '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          echo '#include <sys/socket.h>'; \
index 47d113cdf0a1f2f69468ad6427182171e3356a61..6b75a4e9388b273e3f4f83955bd93f0977211f33 100644 (file)
@@ -10,6 +10,7 @@ Depends-on:
 
 configure.ac:
 gl_HEADER_SYS_SOCKET
+AC_PROG_MKDIR_P
 
 Makefile.am:
 BUILT_SOURCES += $(SYS_SOCKET_H)
@@ -17,7 +18,7 @@ BUILT_SOURCES += $(SYS_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
+       $(MKDIR_P) sys
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          cat $(srcdir)/socket_.h; \
        } > $@-t
index 95ed32ba550049d949c7b7084f95ff26f3c01a3e..1b07c854f037ddd65fc3f96021dde7b2bf9a50cb 100644 (file)
@@ -10,6 +10,7 @@ absolute-header
 
 configure.ac:
 gl_HEADER_SYS_STAT_H
+AC_PROG_MKDIR_P
 
 Makefile.am:
 BUILT_SOURCES += $(SYS_STAT_H)
@@ -17,7 +18,7 @@ BUILT_SOURCES += $(SYS_STAT_H)
 # We need the following in order to create <sys/stat.h> when the system
 # has one that is incomplete.
 sys/stat.h: stat_.h
-       test -d sys || mkdir sys
+       $(MKDIR_P) sys
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \
index 16a227eb2b9031c0e55587617c8ce31ce6f649dc..48e4941ca8af6a93d7763617a504b9a563defaa8 100644 (file)
@@ -10,6 +10,7 @@ absolute-header
 
 configure.ac:
 gl_HEADER_SYS_TIME_H
+AC_PROG_MKDIR_P
 
 Makefile.am:
 BUILT_SOURCES += sys/time.h
@@ -17,7 +18,7 @@ BUILT_SOURCES += sys/time.h
 # We need the following in order to create <sys/time.h> when the system
 # doesn't have one that works with the given compiler.
 sys/time.h: sys_time_.h
-       test -d sys || mkdir sys
+       $(MKDIR_P) sys
        rm -f $@-t $@
        { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
          sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \