<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Use of built-in 'test' in /bin/sh is causing problems"
   href="http://llvm.org/bugs/show_bug.cgi?id=17541">17541</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Use of built-in 'test' in /bin/sh is causing problems
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Build scripts
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.2
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Sun
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Solaris
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Makefiles
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>phantall@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>