[OGo-MacOSX] Sope built on Tiger running on Panther

Helge Hess macosx@opengroupware.org
Thu, 15 Dec 2005 13:16:40 +0100


On 15. Dez 2005, at 05:25 Uhr, Mont Rothstein wrote:
> The snag I have hit is that in AJRDatabase's EOControl a number of the
> header files use the form
>
> #import <EOControl/somefilename.h>
>
> When make hits these it gives a warning "No such file or directory".

Hm, yes. Thats a difference to Xcode. Xcode copies all headers to a  
temporary build directory and include references are relative to  
that. gstep-make directly works on the source level.

> If I change one of these declarations to be simply
> #import "somefilename.h"

Do you only have the issue in implementation files (.m) or also in  
header files (.h)?
In other words, do the subprojects of AJR contain public header files?

If not, I would definitely change the imports in the .m, its IMHO the  
correct thing to do in any case.

If yes, I would recommend to move all public headers to a common  
directory. This is how its done in NGObjWeb (sope-appserver/NGObjWeb/ 
NGObjWeb contains all _public_ headers).

> I'd obviously prefer not to change everywhere this is done.

For .m files I would do this (with sed/bash/python, not by hand of  
course).

> Do you know what I need to do to get make to find header files
> described in this way?

If you really do not want to change the structure a bit (which I  
would really suggest, it doesn't hurt in Xcode but is better for  
gstep-make), you would need to tweak makefiles.

Bascially you would need a GNUmakefile.postamble at the top-level  
which copies (or links) all headers into a temporary directory.  
Something like this:

   AJR_HEADER_DIR = derived_src/EOControl
   ADDITIONAL_INCLUDE_DIRS += -I$(AJR_HEADER_DIR)

   copy-ajr-headers-to-tmpdir :
     $(MKDIRS) $(AJR_HEADER_DIR)
     cp `find . -name "*.h"` $(AJR_HEADER_DIR)/

   before-all :: copy-ajr-headers-to-tmpdir

Greets,
   Helge
-- 
http://docs.opengroupware.org/Members/helge/
OpenGroupware.org