[LLVMbugs] [Bug 17541] New: Use of built-in 'test' in /bin/sh is causing problems
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Thu Oct 10 15:11:11 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=17541
Bug ID: 17541
Summary: Use of built-in 'test' in /bin/sh is causing problems
Product: Build scripts
Version: 3.2
Hardware: Sun
OS: Solaris
Status: NEW
Severity: normal
Priority: P
Component: Makefiles
Assignee: unassignedbugs at nondot.org
Reporter: phantall at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Two files exhibit this issue: docs/Makefile (lines 80 & 116) and
tools/clang/docs/Makefile (line 76). This is from line 80 of docs/Makefile:
78: regendoc:
79: $(Echo) Building doxygen documentation
80:--> $(Verb) if test -e $(PROJ_OBJ_DIR)/doxygen ; then \
81: ${RM} -rf $(PROJ_OBJ_DIR)/doxygen ; \
82: fi
83: $(Verb) $(DOXYGEN) $(PROJ_OBJ_DIR)/doxygen.cfg
In solaris, /bin/sh defaults to a version of the bourne shell that is either
not fully POSIX compliant, or very old. It doesn't support the `-e` option
(according to the man page), though it /does/ support `-d` & `-f`.
Some examples:
~ /bin/sh -c 'test -e doesnotexist || echo FALSE'
/bin/sh: test: argument expected
~ /bin/sh -c '[ -e doesnotexist ] || echo FALSE'
/bin/sh: test: argument expected
~ /bin/sh -c '/usr/bin/test -e doesnotexist || echo FALSE'
FALSE
As a workaround for these kinds of issues it'd be nice if there were a
straightforward way to configure the build to use an alternative shell for all
shell/configure scripts and makefiles.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20131010/a175878d/attachment.html>
More information about the llvm-bugs
mailing list