This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: ok to use autogen to generate Makefile.in?... alternatives?


On Fri, Apr 05, 2002 at 07:47:41PM -0800, Bruce Korb wrote:
> Nathanael wrote:
> > OK, I'm getting some decent reasons not to use autogen.

> OK, I'm getting curious to know what they are.
> I hope they are addressable.  OS/X is, as I know
> it is working there.

* People want minimal and extremely portable dependencies: preferably
only things already needed
* Guile is a fairly large dependency and has suffered from
intermittent porting and installation issues
* Some gcc/gdb/etc maintainers don't like autogen.

Note that I'm still inclined to use autogen, personally.  But one of my
top priorites is to make something that the people who will have to
maintain it will be satisfied with.  (My top priority is to make
something *I'll* be satisfied with, hence the rejection of mass uses of
sed in the Makefile.)

> > I have also found it rather finicky, and the dependence
> > on guile does trouble me (since guile is rather finicky).
Oh, you'd probably appreciate examples. :-)

Warning: now going off topic for gcc list.

Some nasty finickiness showed up in writing the pseudo-macro at the top
of the template file.  Putting certain collections of comments in (the
sort on a line starting with #) broke everything mysteriously.  My best
guess -- well, actually I have no idea what caused it.

Some finickiness showed up when writing the definitions file.  I spent a
*ridiculous* amount of time debugging it.  The trouble was in the first
line.  This worked:
autogen definitions Makefile.tpl;

These didn't:
autogen definitions "Makefile.tpl";
autogen definitions 'Makefile.tpl';
autogen definitions 'Makefile';
autogen definitions "Makefile";

This didn't, but only because 'Makefile' existed:
autogen definitions Makefile;

The other irritation I've had is the curious syntax of the definitions
file.
targets = {target = "foo"; }; 
targets = {target = "bar"; }; 
targets = {target = "baz"; }; 
...
is pretty redundant.  I'd be inclined to generate it with autogen :-)
I couldn't figure out a shorter way to do it even if I gave up
target_flags.  There probably is one, but I couldn't find it.

(And if I leave out a semicolon, I get a completely opaque error
message -- 'semicolon expected' would be preferable!)

It also looks unnatural to a typical programmer; assigning to the same
variable over and over?  I'm not 100% sure what a different syntax would
be, but if I could write
targets = {"foo"; "bar"; "quux", flags="--SILLY"; "baz" }
I'd probably make a lot of the people reading the code happier, and save
a few keystrokes.

Of course, this all may be possible, or may have been rejected for very
good reasons.  Just my immediate thoughts.

--Nathanael


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