I've had a problem with my OSX 10.7 Lion install for some time and I finally took some time to investigate.
The issue is that when running make, I always get an error of the form:
/bin/sh: line 0: cd: [folder]: No such file or directory
This always comes as a surprise because the 'file or directory' is always quite clearly present in the directory and I'm able to cd into it with bash. I finally had the foresight to launch into /bin/sh to try cding into a local build directory. No surprise, it fails:
sh-3.2$ make
mkdir .dist
mkdir .dist/mdoc
tar cf - book.css book.ncx book.xml container.xml css/book.css
external.png full-head.xml full-tail.xml glossary.xml index.sgml [...]
commands.xml | tar -xf - -C .dist/mdoc
( cd .dist && tar zcf ../mdoc.source.tgz mdoc )
/bin/sh: line 0: cd: .dist: No such file or directory
make: *** [mdoc.source.tgz] Error 1
sh-3.2$ cd .dist
sh: cd: .dist: No such file or directory
sh-3.2$ cd ./.dist
sh-3.2$ pwd
/Users/msutherl/src/mdoc/.dist/mdoc/.dist
It turns out that I cannot specify paths implicitly with sh. Indeed I had been fixing Makefile by adding explicit paths everywhere by hand.
Does anybody know where this could come from? Could it be that I modified a sh config file somewhere by accident? Could it be a problem with my path?
