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: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    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.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to