mkdir errors when running `make sdist`
Hi. Newcomer here. I was taking a look at #9095 (closed) and I get the following errors when running make sdist
.
"rm" -f sdistprep/ghc-7.9.20141208-windows-extra-src.tar.bz2
mkdir sdistprep
mkdir: cannot create directory ‘sdistprep’: File exists
make[1]: [sdist-windows-tarballs-prep] Error 1 (ignored)
mkdir sdistprep/windows-tarballs
mkdir sdistprep/windows-tarballs/ghc-7.9.20141208
mkdir sdistprep/windows-tarballs/ghc-7.9.20141208/ghc-tarballs
cd sdistprep/windows-tarballs/ghc-7.9.20141208/ghc-tarballs && lndir /home/joe/src/ghc/ghc-tarballs
"rm" -rf sdistprep/windows-tarballs/ghc-7.9.20141208/ghc-tarballs/.git
cd sdistprep/windows-tarballs && "/bin/tar" chf - ghc-7.9.20141208 2> windows_extra_src_ghc_log | bzip2 -c > /home/joe/src/ghc/sdistprep/ghc-7.9.20141208-windows-extra-src.tar.bz2
"rm" -rf sdistprep/testsuite-ghc
"rm" -f sdistprep/ghc-7.9.20141208-testsuite.tar.bz2
mkdir sdistprep
mkdir: cannot create directory ‘sdistprep’: File exists
make[1]: [sdist-testsuite-prep] Error 1 (ignored)
Generally when using mkdir
in a Makefile I've found it best to always use mkdir -p
just like how you should always use rm -f
.
It's a simple fix. I'm submitting a patch for it.
Edited by joehillen