Author Topic: Custom Build Commands - Variables not expanded  (Read 6917 times)

speedsnail

  • Guest
Custom Build Commands - Variables not expanded
« on: April 04, 2006, 10:42:39 am »
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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Custom Build Commands - Variables not expanded
« Reply #1 on: April 04, 2006, 11:14:08 am »
Quote
I 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

  • Guest
Re: Custom Build Commands - Variables not expanded
« Reply #2 on: April 04, 2006, 11:48:19 am »
Am I expected to understand this, or is this a bug of the forum code?

Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Custom Build Commands - Variables not expanded
« Reply #3 on: April 04, 2006, 11:53:56 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

speedsnail

  • Guest
Re: Custom Build Commands - Variables not expanded
« Reply #4 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.

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


Offline Michael

  • Lives here!
  • ****
  • Posts: 1608
Re: Custom Build Commands - Variables not expanded
« Reply #5 on: April 04, 2006, 12:14:00 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.

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.

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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Custom Build Commands - Variables not expanded
« Reply #6 on: April 04, 2006, 12:53:36 pm »
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

  • Guest
Re: Custom Build Commands - Variables not expanded
« Reply #7 on: April 04, 2006, 04:05:57 pm »
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