This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Who knows m4?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]