[Omake] P.S.

Jason Hickey jyh at cs.caltech.edu
Mon Jun 12 09:42:09 PDT 2006


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

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))

Jason

-- 
Jason Hickey                  http://www.cs.caltech.edu/~jyh
Caltech Computer Science      Tel: 626-395-6568 FAX: 626-792-4257


More information about the Omake mailing list