<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>On 21 mars 08, at 21:02, Steve Kalkwarf wrote:<br class="Apple-interchange-newline"><blockquote type="cite"><blockquote type="cite">My questions are:<br></blockquote><blockquote type="cite">- how can I set OCAMLLIBDIR in the XCode interface to make it able to build?<br></blockquote><blockquote type="cite">- where is the black magic that adds this path to the building?<br></blockquote><blockquote type="cite">- does someone know how to extend the XCode project to include <br></blockquote><blockquote type="cite">a phase that figures out what this path is (as in the Makefile)?<br></blockquote><br>I don't have the time to check out all the assorted project <br>trees, but if you can point me at a disk image the source tree <br>you work from, I can probably sort out the Xcode dependencies <br>for you.<br></blockquote></div><br><div>Great, thanks a lot.</div><div><br></div><div>I put the sources for the 2.27 branch here:</div><div><a href="http://alan.petitepomme.net/2.27.tar.gz">http://alan.petitepomme.net/2.27.tar.gz</a></div><div><br></div><div>You don't need to have OCaml to help me, as the issue is purely in the XCode part, which is in the src/uimacnew directory.</div><div><br></div><div>The problem is: we use xcodebuild to build Unison from the command line, typically like this (in the src/uimacnew directory):</div><div>xcodebuild OCAMLLIBDIR="/Users/schmitta/godi/lib/ocaml/std-lib"</div><div>the argument given is when the include files for caml are, which are needed to compile MyController.c.</div><div><br></div><div>With such invocation, the gcc calls look like:</div><div><div>&nbsp;&nbsp; &nbsp;/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic -fmessage-length=0 -fvisibility=hidden -gdwarf-2 -I/Users/schmitta/src/unison/branches/2.27/src/uimacnew/build/uimac.build/Default/uimac.build/Unison.hmap -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -F/Users/schmitta/src/unison/branches/2.27/src/uimacnew/build/Default -F/Users/schmitta/src/unison/branches/2.27/src/uimacnew -I/Users/schmitta/src/unison/branches/2.27/src/uimacnew/build/Default/include -I/Users/schmitta/godi/lib/ocaml/std-lib -I/Users/schmitta/src/unison/branches/2.27/src/uimacnew/build/uimac.build/Default/uimac.build/DerivedSources -c /Users/schmitta/src/unison/branches/2.27/src/uimacnew/MyController.m -o /Users/schmitta/src/unison/branches/2.27/src/uimacnew/build/uimac.build/Default/uimac.build/Objects-normal/i386/MyController.o</div><div><br></div><div>(deep in the middle there is the "-I/Users/schmitta/godi/lib/ocaml/std-lib")</div><div><br></div><div>Now when using the "Build" button of XCode, compilation fails because these include files are not found, which makes sense as I do not say where they are. In order to debug, I want to build from XCode GUI, so I would like to either:</div><div>- specify OCAMLLIBDIR such that it is correctly set when building with XCode's GUI, or</div><div>- add an include path to the project</div><div><br></div><div>If you can explain me why positioning this variable result in adding the include path, it would even be better!</div><div><br></div><div>Thanks again,</div><div><br></div><div>Alan</div></div></body></html>