[Omake] P.S.

Benjamin Pierce bcpierce at cis.upenn.edu
Mon Jun 12 10:02:08 PDT 2006


On Jun 12, 2006, at 12:42 PM, Jason Hickey wrote:

> Benjamin Pierce wrote:
>> Actually, this raises a small syntactic point...
>> Since
>>    FOO =
>>      bar
>>      baz
>> is a syntactic error anyway
>
> Actually, it is not a syntax error.  Variable definitions are  
> allowed to have a body.  The syntax and evaluation are the same as  
> for other indented bodies.
>
>    # Contrived example
>    FOO =
>        if $(DEBUG)
>            value -g
>        else
>            value -O2

I see.  And the

    FOO = bar baz

form is syntactic sugar for

   FOO =
     value bar baz

?

> Quick note, this is how I would write the last part of your config.
>
> COMMON_SOURCES[] =
>     $(addprefix $(TOOLSDIR)/, $(SRC2FCL_SOURCES))
>     $(addprefix $(SRCDIR)/ubase/, $(UBASE_LIB_SOURCES))
>     $(addprefix $(SRCDIR)/, $(BASE_SOURCES))
>     $(addprefix $(LENSESDIR)/, $(NATIVE_LENS_SOURCES))
>     $(addprefix $(SRCDIR)/, $(TOPLEVEL_SOURCES)))
>
> # Turn them into filenames (optional, if you do not refer
> # to them outside the current directory).
> COMMON_SOURCES = $(file $(COMMON_SOURCES))

Thanks!

    - B




More information about the Omake mailing list