GNUmakfiles - sources must be in project's root?

View: New views
4 Messages — Rating Filter:   Alert me  

GNUmakfiles - sources must be in project's root?

by Ion Tichy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm trying to shoehorn GNUstep onto an existing project. During the creation of the GNUstep makefile (originally I had the luxury of cmake), I found I could not add sources like this:

foo_OBJC_FILES = src/App/main.mm \
src/App/Protocol.mm \
...

The result in calling make -f GNUmakefile is:

This is gnustep-make 2.2.0. Type 'make print-gnustep-make-help' for help.
Making all for objc_program foo...
make[2]: *** No rule to make target `obj/src/App/main.mm', needed by `obj/foo'.  Stop.

The question is: how do I add sourcefiles, which are organized in several subdirectories, to the GNUmakefile without having to create subprojects or reorganize the project layout? I perused the GNUstep module and application sources, I can't seem to find example.

Cheers.

_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@...
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Re: GNUmakfiles - sources must be in project's root?

by Richard Frith-Macdonald-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 26 Aug 2009, at 10:31, Juergen Lorenz Simon wrote:

> Hi,
>
> I'm trying to shoehorn GNUstep onto an existing project. During the  
> creation of the GNUstep makefile (originally I had the luxury of  
> cmake), I found I could not add sources like this:
>
> foo_OBJC_FILES = src/App/main.mm \
> src/App/Protocol.mm \
> ...
>
> The result in calling make -f GNUmakefile is:
>
> This is gnustep-make 2.2.0. Type 'make print-gnustep-make-help' for  
> help.
> Making all for objc_program foo...
> make[2]: *** No rule to make target `obj/src/App/main.mm', needed by  
> `obj/foo'.  Stop.
>
> The question is: how do I add sourcefiles, which are organized in  
> several subdirectories, to the GNUmakefile without having to create  
> subprojects or reorganize the project layout? I perused the GNUstep  
> module and application sources, I can't seem to find example.

I think the short answer is "you don't" ... that's what subprojects  
are for.  There's probably a way to do it, but part of what makes  
gnustep-make so simple and easy to use is conforming to the well  
defined and consistent patterns it uses.





_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@...
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Re: GNUmakfiles - sources must be in project's root?

by David Chisnall :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 26 Aug 2009, at 10:31, Juergen Lorenz Simon wrote:

> The question is: how do I add sourcefiles, which are organized in  
> several subdirectories, to the GNUmakefile without having to create  
> subprojects or reorganize the project layout? I perused the GNUstep  
> module and application sources, I can't seem to find example.
>

It's a frustrating limitation, because it makes good organisation  
hard, but you can work around it using subprojects.  Take a look in  
Étoilé svn for some examples; almost all of our frameworks use  
subprojects.  EtoileFoundation is probably the best example:

http://svn.gna.org/viewcvs/etoile/trunk/Etoile/Frameworks/EtoileFoundation/GNUmakefile?rev=5063&view=auto

David

_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@...
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Re: GNUmakfiles - sources must be in project's root?

by Nicola Pero-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On 26 Aug 2009, at 11:31, Juergen Lorenz Simon wrote:

> Hi,
>
> I'm trying to shoehorn GNUstep onto an existing project. During the  
> creation of the GNUstep makefile (originally I had the luxury of  
> cmake), I found I could not add sources like this:
>
> foo_OBJC_FILES = src/App/main.mm \
> src/App/Protocol.mm \
> ...
>
> The result in calling make -f GNUmakefile is:
>
> This is gnustep-make 2.2.0. Type 'make print-gnustep-make-help' for  
> help.
> Making all for objc_program foo...
> make[2]: *** No rule to make target `obj/src/App/main.mm', needed by  
> `obj/foo'.  Stop.
>
> The question is: how do I add sourcefiles, which are organized in  
> several subdirectories, to the GNUmakefile without having to create  
> subprojects or reorganize the project layout? I perused the GNUstep  
> module and application sources, I can't seem to find example.


Interesting ... I implemented support for it in gnustep-make (trunk).  
It now works for me.  Please try again if you have a chance. :-)

Thanks


_______________________________________________
Discuss-gnustep mailing list
Discuss-gnustep@...
http://lists.gnu.org/mailman/listinfo/discuss-gnustep