beardsvibe / buildfox

Minimalistic Ninja generator
MIT License
50 stars 8 forks source link

Environment variables support #178

Open xpac27 opened 8 years ago

xpac27 commented 8 years ago

If I do:

export CXX=clang++-3.8
bf

Then the executable used in build.ninja is still clang. Am I doing something wrong? Is there a way I could use the value of CXX in by build.fox file in order to do something like cxx = $CXX? Or could it be handled by buildfox?

den-mentiei commented 8 years ago

Ninja doesnt use any env variables (except NINJA_STATUS to control progress reporting), neither buildfox does.

Ninja rationale on that - ninja-files generator should support any env variables that are needed and generate corresponding ninja file.

I think we can handle it in buildfox - with syntax being close to your proposal. We should also include some sane and useful rules from the start (eg. usual CXX stuff, etc).

jimon commented 8 years ago

Yeah, we should do it, maybe just pass all env variables to buildfox space (before everything else) and be done with it :) Plus also related to #179 in a way.