[Omake] Order of evaluation

Benjamin Pierce bcpierce at cis.upenn.edu
Tue Jun 13 11:11:50 PDT 2006


Very sneaky!  :-)

Thanks,

      Benjamin


On Jun 13, 2006, at 1:54 PM, Jason Hickey wrote:

> Benjamin Pierce wrote:
>> OK, here's today's question... :-)
>> One of the generated modules in the Harmony build can be  
>> constructed  in either of two ways:
>>    - When we're building a binary that's going to be installed   
>> elsewhere in the filesystem,
>>      this module gets built from a whole bunch of other files in  
>> a  complicated way.
>>    - When we're building a binary that's going to be used "in   
>> place" (i.e., during testing),
>>      we can get by with a stub version of this module that has no   
>> dependencies.
>
> This should be close to what you want.  The TARGETS variable  
> defines the targets that were passed on the command line, so you  
> can use that to decide what to do (documentation magically appeared  
> on the web site:).
>
> .PHONY: fast slow
>
> if $(mem fast, $(TARGETS))
>     slow:
>        eprintln(fast is not slow)
>        exit(1)
>     foo.ml: foo.ml.fast
>        cp $< $@
> else
>     fast:
>        eprintln(slow is not fast)
>        exit(1)
>     foo.ml: slow.cmo
>        echo "open Slow" > $@
>
> fast slow .DEFAULT: foo.ml
>
> Jason
>
> -- 
> Jason Hickey                  http://www.cs.caltech.edu/~jyh
> Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257
> _______________________________________________
> Omake mailing list
> Omake at metaprl.org
> https://lists.metaprl.org/mailman/listinfo/omake



More information about the Omake mailing list