| On Feb 15, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote:
| >         $ autoconf --trace AC_SUBST:$f:$l:$0:$1
| 
| > => configure.in:42:AC_SUBST:prefix

| Sounds good to me.  But are the `:' separators mandatory, or can we
| just choose any expansion to a given macro?  For example, we could
| make it like this:

Much freedom should be available.  The main problem will be with $@ I
guess, where some work from m4 will be required.  I'd like to find a
means to specify the seperator.  Something like

        --trace AC_SUBST:$0:$:@

I don't know...

| autoconf --trace 'AC_SUBST=some-junk $1 some-garbage'
| 
| So as to get:
| 
| some-junk prefix some-garbage

Should be possible, indeed.

| We could replace the m4trace prefix with define()s of, say, `FILE' and
| `LINENO', and leave it up to the user to place FILE or LINENO in the
| intended expansion, that, in the example above, would be defined as:
| 
| define([AC_SUBST], [some-junk $1 some-garbage])

In fact I think it won't be AC_SUBST, but trace__AC_SUBST or whatever,
to avoid clashes when macros `display' arguments that contain code.
The main means to avoid such clashes would be

     define([AC_SUBST], [[some-junk $1 some-garbage]])

but then you forbid helpy macros that could handle $:@ and the like.
OTOH, n-ary macros are not our main preoccupation.  But it would be a
pity to forget them.  Experiments will probably show what the sanest
solution.

As for LINENO, I don't know.  I don't feel it too well because of the
rules of expansion.  In the `define' right above, in spite of the
double quotation, the $1 *will* be expanded, but a LINENO would not.
$n is much easier to handle, much safer.

Akim

Reply via email to