texinfo-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[5197] Replace $(mkdir_p) with $(MKDIR_P).


From: Patrice Dumas
Subject: [5197] Replace $(mkdir_p) with $(MKDIR_P).
Date: Sat, 23 Feb 2013 13:06:22 +0000

Revision: 5197
          http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=5197
Author:   pertusus
Date:     2013-02-23 13:06:21 +0000 (Sat, 23 Feb 2013)
Log Message:
-----------
Replace $(mkdir_p) with $(MKDIR_P).
Avoid a race condition in directory creation in tp/t/test_utils.pl.

Modified Paths:
--------------
    trunk/tp/maintain/regenerate_docstr.sh
    trunk/tp/maintain/regenerate_file_lists.pl
    trunk/tp/t/test_utils.pl

Modified: trunk/tp/maintain/regenerate_docstr.sh
===================================================================
--- trunk/tp/maintain/regenerate_docstr.sh      2013-02-23 11:41:56 UTC (rev 
5196)
+++ trunk/tp/maintain/regenerate_docstr.sh      2013-02-23 13:06:21 UTC (rev 
5197)
@@ -47,7 +47,7 @@
        cd $(srcdir)/../po_document/ && $(MAKE) $(AM_MAKEFLAGS) '"$lingua.gmo"'
 
 LocaleData/'"$lingua"'/LC_MESSAGES/$(document_domain).mo: 
$(srcdir)/../po_document/'"$lingua"'.gmo
-       $(mkdir_p) `dirname address@hidden
+       $(MKDIR_P) `dirname address@hidden
        $(INSTALL_DATA) $(srcdir)/../po_document/'"$lingua"'.gmo $@
 
 ' >>$outfile

Modified: trunk/tp/maintain/regenerate_file_lists.pl
===================================================================
--- trunk/tp/maintain/regenerate_file_lists.pl  2013-02-23 11:41:56 UTC (rev 
5196)
+++ trunk/tp/maintain/regenerate_file_lists.pl  2013-02-23 13:06:21 UTC (rev 
5197)
@@ -87,7 +87,7 @@
 print INCLUDE "\n\n";
 
 print INCLUDE "t/include_dir:\n".
-   "\t".'$(mkdir_p) $@'."\n\n";
+   "\t".'$(MKDIR_P) $@'."\n\n";
 my $test_copied_include_files = 'test_copied_include_files =';
 foreach my $include_file (keys(%include_files)) {
   my $bfile = basename($include_file);

Modified: trunk/tp/t/test_utils.pl
===================================================================
--- trunk/tp/t/test_utils.pl    2013-02-23 11:41:56 UTC (rev 5196)
+++ trunk/tp/t/test_utils.pl    2013-02-23 13:06:21 UTC (rev 5197)
@@ -75,8 +75,12 @@
 
 our $output_files_dir = 't/output_files/';
 foreach my $dir ('t', 't/results', $output_files_dir) {
+  my $error;
+  # to avoid a race conditon, first create the dir then test that it
+  # exists
+  mkdir $dir or $error = $!;
   if (! -d $dir) {
-    mkdir $dir or die "mkdir $dir: $!\n";
+    die "mkdir $dir: $error\n";
   }
 }
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]