Ticket #236 (reopened enhancement)

Opened 3 years ago

Last modified 3 years ago

[Windows] Environment variables in Bakefiles.bkgen do not work anymore

Reported by: Francesco Montorsi Owned by: Vaclav Slavik
Priority: major Milestone: 0.2.10
Component: bakefile_gen Version: trunk
Keywords: env vars Cc:

Description

On Windows I used to put in Bakefiles.bkgen lines like:

    <add-flags>-I %WXWIN%/build/bakefiles/wxpresets</add-flags>

However it looks that with the SVN trunk version this doesn't work anymore:

[1/9] generating msvs2008prj from usbpicprog.bkl
E:\upp_wx_thread\upp_wx\build\bakefile\usbpicprog.bkl (line unknown, install libxml2 to show it): error: can't find file 'presets/wx.bkl' in E:\upp_wx_thread\upp_wx\build\bakefile:%WXWIN%\build\bakefiles\wxpresets:E:\Bakefile\rules:E:\Bakefile\rules\modules:E:\Bakefile\output:E:\Bakefile

so it looks like %WXWIN% is not expanded... I remember it was in previous versions however.

Attachments

bakefile_gen_envvars.patch Download (3.6 KB) - added by Francesco Montorsi 3 years ago.
Adds envvar() function evaluation to bakefile_gen

Change History

in reply to: ↑ description   Changed 3 years ago by Vaclav Slavik

  • status changed from new to closed
  • resolution set to wontfix

Replying to frm:

I remember it was in previous versions however.

It never was -- not intentionally.

follow-up: ↓ 3   Changed 3 years ago by Francesco Montorsi

It would be nice to have this officially supported, then. Would you accept a patch adding this functionality?

in reply to: ↑ 2   Changed 3 years ago by anonymous

Replying to frm:

It would be nice to have this officially supported, then. Would you accept a patch adding this functionality?

If it was added in a way consistent with the way variables are used in Bakefile itself (i.e. definitely not some platform-specific syntax, but the syntax used in Bakefile, i.e. envvar()) and documented, then why not.

  Changed 3 years ago by Francesco Montorsi

  • status changed from closed to reopened
  • type changed from defect to enhancement
  • resolution wontfix deleted

I've created and tested the patch.

Note that I couldn't reuse expression evaluation functions from mk.py because otherwise the envvar() function defined in utils.py would be called, instead of the envvar() function defined in bakefile_gen.py...

Changed 3 years ago by Francesco Montorsi

Adds envvar() function evaluation to bakefile_gen

  Changed 3 years ago by Francesco Montorsi

The patch does not include changes in the docs... if the patch is ok I can make an additional patch for docs, too.

Add/Change #236 ([Windows] Environment variables in Bakefiles.bkgen do not work anymore)

Author


E-mail address and user name can be saved in the Preferences.


Change Properties
<Author field>
Action
as reopened
as The resolution will be set. Next status will be 'closed'
to The owner will change from vslavik. Next status will be 'assigned'
The owner will change from vslavik to anonymous. Next status will be 'accepted'
 
Note: See TracTickets for help on using tickets.