News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

Custom build commands and variables

Started by Jabber, March 21, 2006, 11:08:30 PM

Previous topic - Next topic

Jabber

Hi all,

I'm trying to add compilation support for a SWIG interface file (generating a Lua wrapper); to do so I added the following line in Options(for the .i file)->Build:
swig -c++ -lua $FILENAME

However, it seems that the variables like $FILENAME don't get substituted, the build log just says
Quoteswig -c++ -lua
(that call fails, of course).

I'm using the SVN rev 2218 on Windows XP; it looks like someone had a similiar problem a while back:
http://forums.next.codeblocks.org/index.php?topic=1485.msg10583#msg10583.

Am I doing something wrong or is this a bug?

Thanks,

Jabber

takeshimiya

Quote from: Jabber on March 21, 2006, 11:08:30 PM
Hi all,

I'm trying to add compilation support for a SWIG interface file (generating a Lua wrapper); to do so I added the following line in Options(for the .i file)->Build:
swig -c++ -lua $FILENAME

However, it seems that the variables like $FILENAME don't get substituted, the build log just says
Quoteswig -c++ -lua
(that call fails, of course).

I'm using the SVN rev 2218 on Windows XP; it looks like someone had a similiar problem a while back:
http://forums.next.codeblocks.org/index.php?topic=1485.msg10583#msg10583.

Am I doing something wrong or is this a bug?

Thanks,

Jabber


AFAIK, only variables in the form $(variable) or ${variable} are expanded.

Jabber

Hi,

Quote from: Takeshi Miya on March 21, 2006, 11:16:24 PM
AFAIK, only variables in the form $(variable) or ${variable} are expanded.

Yep, tried that too, but both versions don't work neither.

thomas

QuoteAFAIK, only variables in the form $(variable) or ${variable} are expanded.
Nope, they should be.

Where is that variable defined? If it is in the compiler's scope ( = global) then it does not work, that's a known bug.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Jabber

Hi,

Under Options(for the file)->Build it says
QuoteYou can use the following variables:
and then a list of variables like $FILENAME and so on, so I didn't define that variable, but C::B should have ;)

thomas

#5
But... $FILENAME is not a valid builtin (unless I am very mistaken).

Which file's name is it supposed to be (probably some header)?


EDIT: Aaaaaah.... now I see what you mean. Hmm... got no quick answer ready for that now, sorry. It appears that you are doing as you should.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Jabber

Well, I was just preparing an answer when I saw your edit ;)

Is this a bug then, or can anyone else confirm that it is working for him?

Jabber

Just as a short follow-up:

This is fixed in the 22.03.06 build at http://forums.next.codeblocks.org/index.php?topic=2690.0.
The correct variable is "$file".

A big thank you to the devs!