[erlang-questions] Macro expansion

Richard Carlsson richardc@REDACTED
Fri Aug 14 12:18:51 CEST 2009


Chandru wrote:
> Thanks Richard. I know about this feature, but I don't want to put the macro
> values in the Emakefile if I can help it. I want to be able to do 'erl
> -make' and then include the values for the macros on the command line. It
> seems to be possible, but I'm not able to figure out how I supply these on
> the command line.

Since 'erl -make' calls make:all(), it's not possible to pass parameters
that way, but you could use 'erl -eval "make:all(CompilerOptions)".
(Note: passing Erlang strings and tuples this way, you're bound to get
the shell quoting wrong the first dozen or so attempts. Don't give up.)

    /Richard


More information about the erlang-questions mailing list