Changes by: Jason Hickey (jyh at cs.caltech.edu)
Date: 2003-04-22 13:57:07 -0700 (Tue, 22 Apr 2003)
Revision: 33
Log message:
Added "export" command. I don't know if I like this so much, so we may need
to evolve a little.
Here's the idea. Suppose you have some variables that are configured
differently based on a flag. Since the omake language is scoped
and functional, the following code does not do the trick because the
variables inside the if are in a different scope.
if $(READLINE_ENABLED)
READLINE_CFLAGS =\
-DREADLINE\
-DRL_COMPLETION_MATCHES=@READLINE_PREFIX@completion_matches\
-DRL_CP_TYPE=@READLINE_CP_TYPE@\
-DRL_CPP_TYPE=@READLINE_CPP_TYPE@
READLINE_LDFLAGS = -cclib -lreadline -cclib -ltermcap
So the trick is to add an "export" command after the last line
in the if. This inlines the _entire_ environment defined in the if,
including variables, rules, etc.