[commit: ghc] master: Fix mkdirhier.sh on OS X 10.9 (#8139) (feb7638)

git at git.haskell.org git
Sat Oct 12 05:54:52 UTC 2013


Repository : ssh://git at git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/feb76385b6eb88ceb8c3bd0a21d9723a607e2944/ghc

>---------------------------------------------------------------

commit feb76385b6eb88ceb8c3bd0a21d9723a607e2944
Author: Darin Morrison <darinmorrison+git at gmail.com>
Date:   Thu Sep 26 00:08:28 2013 -0600

    Fix mkdirhier.sh on OS X 10.9 (#8139)
    
    Mac OS X 10.9 mkdir is apparently stricter than the Mac OS X 10.8
    mkdir about which paths are considered valid arguments. For example,
    in a typical build on Mac OS X 10.9, the first of the following
    invocations of mkdirhier.sh will succeed but the second will fail:
    
    "inplace/bin/mkdirhier"   utils/ghc-cabal/dist/build/tmp//.  # WORKS
    "inplace/bin/mkdirhier"   bootstrapping/.                    # FAILS
    
    Simply prefixing the path arguments with "./" causes both to succeed:
    
    "inplace/bin/mkdirhier" ./utils/ghc-cabal/dist/build/tmp//.  # WORKS
    "inplace/bin/mkdirhier" ./bootstrapping/.                    # WORKS
    
    Testing indicates failure on paths satisfying all of these criteria:
    
    - path is suffixed with "/."
    - path is only 1 level deep (e.g., "foo/."; _not_ "foo/bar/.")
    - path is _not_ prefixed with "./"
    
    This workaround prefixes "./" to the path argument passed to mkdir.
    
    Signed-off-by: Austin Seipp <austin at well-typed.com>


>---------------------------------------------------------------

feb76385b6eb88ceb8c3bd0a21d9723a607e2944
 utils/mkdirhier/mkdirhier.sh |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utils/mkdirhier/mkdirhier.sh b/utils/mkdirhier/mkdirhier.sh
index 4c5d5f7..80762f4 100644
--- a/utils/mkdirhier/mkdirhier.sh
+++ b/utils/mkdirhier/mkdirhier.sh
@@ -1,4 +1,4 @@
 #!/bin/sh
 
-mkdir -p ${1+"$@"}
+mkdir -p ${1+"./$@"}
 




More information about the ghc-commits mailing list