views:

132

answers:

1

I'm trying to build an Xcode project with GNUStep-make. Right now the project is very small (3 classes) however it will grow to hundreds of classes over the coming weeks so I'm trying to get everything figured out and well-organised now.

Xcode creates a ProjectName_Prefix.pch file which is a header that: a) get precompiled and b) is prefixed to every file in my project; at least if I understand correctly.

Now, how do I tell GNUStep-make what to do with this file when it builds? I've added it to the XXX_PRECOMPILED_HEADERS variable.

Cioccolata_OBJC_PRECOMPILED_HEADERS = Cioccolata_Prefix.pch

With this in place the build fails with the error:

Making all for framework Cioccolata...
make[1]: *** No rule to make target `/Users/chris/Projects/Mac/Cioccolata/build/GNUStep/obj/PrecompiledHeaders/ObjC/Cioccolata_Prefix.pch', needed by `internal-precompile-headers'.  Stop.
make: *** [Cioccolata.all.framework.variables] Error 2

I've also got the following in my makefile:

ADDITIONAL_OBJC_FLAGS += -include Cioccolata_Prefix.pch -Winvalid-pch

I'm not sure what I've done wrong here. I basically have tried to follow the GNUStep documentation for precompiled headers.

None of my project's source files expressly include the Foundation framework since this header does that.

+1  A: 

Thanks for pointing our attention to this problem and for your patch! :-)

This is now fixed on gnustep-make trunk, and so will be fixed in gnustep-make 2.4.0 once released.

Nicola Pero (gnustep-make)

Nicola
No problem at all, thanks for the quick action :)
d11wtq