RC-Paves3-build / plovr

Automatically exported from code.google.com/p/plovr
0 stars 0 forks source link

Add support for compilers --define flag #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Right now, I dont seem to find a way to make use of the --define flag.
Maybe I'm overlooking something?

If not, it would be great if this feature would be added. 

Original issue reported on code.google.com by carsten.kraus on 29 Sep 2010 at 2:28

GoogleCodeExporter commented 8 years ago
I don't believe it is documented, but you can add the following to the config 
file:

  "define": {
    "goog.DEBUG": false
  },

That is the equivalent of doing --define goog.DEBUG=false on the command line.

Original comment by bolinf...@gmail.com on 30 Sep 2010 at 7:50

GoogleCodeExporter commented 8 years ago

Original comment by bolinf...@gmail.com on 30 Sep 2010 at 7:52

GoogleCodeExporter commented 8 years ago
Cool, that works great, thanks.

The defines wont get evaluated in modes RAW & WHITESPACE, though.
That's as designed in the compiler, I guess?!

Original comment by carsten.kraus on 1 Oct 2010 at 3:42

GoogleCodeExporter commented 8 years ago
Unfortunately, yes, that's true.

I suppose the Compiler could be extended to support @define in those modes, 
though. WHITESPACE probably wouldn't be too bad, though I think RAW would be 
more difficult as the Compiler does not do any processing for RAW.

Original comment by bolinf...@gmail.com on 1 Oct 2010 at 3:52

GoogleCodeExporter commented 8 years ago
FYI, ultimately I want to introduce an annotation for the values in 
ConfigOption so that HTML documentation for options can automatically generated 
from 
http://code.google.com/p/plovr/source/browse/src/org/plovr/ConfigOption.java.

Original comment by bolinf...@gmail.com on 1 Oct 2010 at 3:53

GoogleCodeExporter commented 8 years ago
Ah, nice! Having the options in the html docs at plovr.com will surely help 
java noobs like me : )

Thanks again!

Original comment by carsten.kraus on 1 Oct 2010 at 4:01