Prebuild command that runs make

General questions regarding the usage of CodeLite
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Prebuild command that runs make

Post by tankist02 »

When I have the following pre-build command:
cd ../linux;make -f Makefile.proto;cd -

I get the following warning:
warning: jobserver unavailable: using -j1. Add `+' to parent make rule.

After I changed the command to this:
cd ../linux;make -j5 -f Makefile.proto;cd -

I got this warning:
warning: -jN forced in submake: disabling jobserver mode.

This is not a critical error - the job is done correctly. Still it would be nice to get rid of build warnings.
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Prebuild command that runs make

Post by eranif »

It is make errors - not codelite errors..
The problem is somewhere in your makefile Makefile.proto

Eran
Make sure you have read the HOW TO POST thread
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Prebuild command that runs make

Post by tankist02 »

When I run the Makefile.proto from shell (not from inside CL) like this:

Code: Select all

make -f Makefile.proto
or this:

Code: Select all

make -j5 -f Makefile.proto
I don't get any errors.

Does CL run external Makefiles somewhat differently?
User avatar
eranif
CodeLite Plugin
Posts: 6373
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Prebuild command that runs make

Post by eranif »

codelite is executing the prebuild command from inside a makefile, in this case, your make command is a recursive one.
To avoid this error, you should change your command to (not tested yet):

Code: Select all

$(MAKE) -f Makefile.proto
As described here:
http://sunsite.ualberta.ca/Documentatio ... html#SEC51

Like always, when you get build errors, please submit the *full* build log - not only the part you think are relevant
as described here:
viewtopic.php?f=3&t=804

Eran
Make sure you have read the HOW TO POST thread
tankist02
CodeLite Veteran
Posts: 56
Joined: Thu Sep 22, 2011 11:29 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: Prebuild command that runs make

Post by tankist02 »

Thanks a lot, Eran, works as charm.
Post Reply