[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ylwrap should be included for any Yacc compilations.
From: |
Alexandre Duret-Lutz |
Subject: |
Re: ylwrap should be included for any Yacc compilations. |
Date: |
Tue, 19 Apr 2005 00:20:26 +0200 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) |
Hi Derek,
Sorry for the long delay.
>>> "Derek" == Derek Price <address@hidden> writes:
Derek> Glancing at the inline rule which was being used:
Derek> ~ sed '/^#/ s|y\.tab\.c|$@|' y.tab.c >address@hidden && mv
address@hidden $@
Derek> Only the filename portion of the path is being replaced here. The
Derek> ylwrap script actually replaces an absolute path in the #line
Derek> directive with just the filename:
Thank you, that's clear to me now. Sorry I was so dense.
Using ylwrap in all cases is already planed for automake-1.10
for other reasons, so I guess that will be OK with you.
For the meantime an easy way to trick automake-1.9 into using
ylwrap is
yourprogram_SOURCES = ... real_parser.yy ...
nodist_EXTRA_yourprogram_SOURCES = dummy.yy
(The end of Section `Libtool Convenience Libraries' (sic)
explains a similar trick.)
Derek> ...
Derek> ~ # Quote $INPUT_DIR so we can use it in a regexp.
Derek> ~ # FIXME: really we should care about more than `.' and `\'.
Derek> ~ input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'`
If there wasn't that FIXME I'd inject this line in the inline
rule of branch-1-9. I've made a note to fix that in 1.10 as well.
I'm sure libtool has some requoting machinery we can steal.
--
Alexandre Duret-Lutz