This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Who knows m4?
- From: Thomas Koenig <Thomas dot Koenig at online dot de>
- To: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- Cc: fortran at gcc dot gnu dot org
- Date: Sun, 29 May 2005 11:02:47 +0200
- Subject: Re: Who knows m4?
- References: <20050528145642.GA12360@troutmask.apl.washington.edu>
On Sat, May 28, 2005 at 07:56:42AM -0700, Steve Kargl wrote:
I know m4, just enough to be dangerous (and m4 can be very dangerous
indeed :-).
> PR 21797 appears to be related to the m4 used
> to generate csqtf. I think the attach patch will
> fix 21797, but I have zero understanding of m4.
Yes, this looks good.
Basically, in m4, anything between ` and ' is quoted. The way to
include the variable var is to have
`sometexthere'var`someotherquotedtext'
In m4, you want to quote anything that might remotely look like
a variable.
The variable q is set up to be either f or nothing, depending on the
kind parameter in mtype.m4.
> BTW, what's the magic incantation to regenerate the
> generated files?
I have a horrible hack for this:
I make a second source tree with
( cd ../gcc-4.1 ; tar cf - . ) | tar xvf -
then do "configure --enable-maintainer-mode" in the libgfortran
subdirectory. The error messages from the configure can be ignored.
I then make the m4 changes there, do a "make generated/*.c" and copy
over the generated files and the m4 files to the original source tree.
If anybody has anything better, please speak up :-)
Thomas