News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Custom Build Commands - Variables not expanded

Started by speedsnail, April 04, 2006, 10:42:39 AM

Previous topic - Next topic

speedsnail

I am trying to use custom build commands, but the variables don't get expanded.

What I am missing?

Is there any documentation available of how the custom build is supposed to work?

Thank you,
Roland

thomas

QuoteI am trying to use custom build commands, but the variables don't get expanded.
Parse error: topic: 1 : expected version near expression "trying to".
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

speedsnail

Am I expected to understand this, or is this a bug of the forum code?

Michael

Quote from: speedsnail on April 04, 2006, 11:48:19 AM
Am I expected to understand this, or is this a bug of the forum code?

Hello,

No, no bug in the forum :). Thomas just asks your for the revision number of the C::B you are using. May be this post could be of some help when you post.

Best wishes,
Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

speedsnail

Oh, I see. I am trying to use 1 RC2 Build: Oct 24 2005, the official release version.

I was omitting this in the first place because I tought this was a version independent question.
I already found some posts related to: variable not expanded. But in my case no variables are expanded, not just the $FILES variable.

I also was seeking for some information of how the custom build is expected to work.
Is the custom dependencies just standard make rules? Are they simply copied to the
on the fly generated Makefile that lives in temp?

Thank you for your patience,
Roland


Michael

Quote from: speedsnail on April 04, 2006, 12:06:06 PM
Oh, I see. I am trying to use 1 RC2 Build: Oct 24 2005, the official release version.

You should give a try to the latest nightly build and see if it works as you expected. RC2 is a bit old now.

Quote from: speedsnail on April 04, 2006, 12:06:06 PM
I was omitting this in the first place because I tought this was a version independent question.
I already found some posts related to: variable not expanded. But in my case no variables are expanded, not just the $FILES variable.

I am not sure that is it version independent, because as the development of C::B is very fast (and very good) things can change rather quickly.

Quote from: speedsnail on April 04, 2006, 12:06:06 PM
I also was seeking for some information of how the custom build is expected to work.
Is the custom dependencies just standard make rules? Are they simply copied to the
on the fly generated Makefile that lives in temp?

I do not use a lot custom build myself. I use it just for some files that need to be pre-processed by external tools before being added to the project. You can find some info here.

Best wishes,
Michael
[url="http://img207.imageshack.us/img207/9728/411948picture4em.png"]http://img207.imageshack.us/img207/9728/411948picture4em.png[/url]

thomas

Variable substitution has been greatly overhauled after RC2. There was a misnaming issue at some point in between (the names listed in the dialog did not match the actual names to use, that was the reason why $FILE was not being substituted, too), but that was fixed 3-4 weeks ago.

Regarding makefiles, the present build system does not use makefiles, instead the tools you speficy (whatever they may be) are called directly (with proper variable expansion and dependencies etc).
You can optionally specify a custom makefile if you absolutely want (obviously, most people do not want to do that). In that case, the IDE runs the makefile but does nothing apart from that.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

speedsnail

I wouldn't want to use makefiles either. Does Code::Blocks have a way to define default rules and the like? Repeating the custom build settings e.g. for *.y or *.ui files seems tedious.

Roland