>>>>> "Alex" == Alex Hornby <[EMAIL PROTECTED]> writes:

Alex> + (read_main_am_file): call expand_contents to output
Alex> + variables.

I'm concerned about this (referenced) part of the patch.

Suppose we have a Makefile.am like this:

    if FOO
    var = a b c
    else
    var = d e f
    endif

    derived = $(var:%=%.c)

Will this work correctly?  In this situation we have to give `derived'
the same conditions as `var'.

This quickly gets very hairy if you consider that `var' might depend
on things with conditions, or that `derived' might be derived from
several conditional variables, or that `var' might be undefined in
some condition (whereas we must always unconditionally define
`derived' in the above example).


I'm also concerned that using &expand_contents from &read_main_am_file
will prematurely expand variables into Makefile.in.  For instance
this:

    a = b
    foo = $(a) b

... shouldn't end up in the Makefile.in like so:

    a = b
    foo = b b

Probably we'd need to do a separate expansion that handles only
patsubst.  (But is that even possible?  The mind boggles at some of
the oddities that might encounter.)


This is all fairly hideous, probably more so than you were
anticipating.  Sorry.  I do like the idea of letting automake handle
patsubst somehow.


Finally, the doc fix and NEWS entry seem to have been dropped from the
patch.  Could you restore them?

Tom

Reply via email to