axiom-developer
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Axiom-developer] Building Axiom with unmodified noweb


From: root
Subject: Re: [Axiom-developer] Building Axiom with unmodified noweb
Date: Sun, 13 Aug 2006 23:32:09 -0400

> > The file src/algebra/Lattice.pamphlet is just 1.7 MB and about
> > 45,000 lines. My emacs dies when it automatically tries to
> > font-lock that file. :-(
> > 
> 
> Yes, it is ridiculously huge. The same is true of several other
> Makefiles. I argued with Tim Daly over this. He claimed that the
> regular structure of these "dirt simple" files makes them easy
> to maintain and he adamantly resisted any sort of more sophisticated
> gnu make methods that would make the files much shorter. I still do
> not accept this view. I think shorter is (almost) always better even
> if it means you have to learn a little more about the tools you are
> using.

font-lock?

Makefiles are rule based programs. Rule based programs are very hard
to debug. Axiom makefiles include debugging information in each stanza
making it trivially easy to figure out what failed (see the echo lines).

Makefiles that are dynamically generated (e.g. using -MM, using awk/sed
or Perl) move the debugging problem "up a level". Axiom maintained
the "dirt simple" principle that every file must have a stanza in the 
makefile. Do you want to know how a file is built? Find the file, look
at the Makefile in that directory. Find the stanza corresponding to that
file. There is your answer. Dirt simple. Easy to learn, easy to extend,
easy to debug, easy to customize. Did something fail? Read the failing
line for the file, search the makefile for the echo number. There is 
the failing stanza. 

Or you can use gcc -MM to create .d files, generate a makefile, dynamically
cons the makefile with the .d files, write out some perl scripts to handle
special cases and create both a perl dependency and a maintenance headache.

Frankly I can't figure out why the Makefiles are so hard to learn. They
are all so regular in structure and follow that dirt simple principle.
Every one except the src/algebra Makefile. And that Makefile will fail
under certain conditions (eg. forgetting to erase it during make clean).

Adding awk/sed/Perl/Python/Ruby/Java/JUnit/ccache/apt/yum/automake
has a complexity cost. Do we really need to depend on Perl to add
10 lines of code to a Makefile? Do we want to get into the problems that
causes? The last time I tried to update Perl on a system it ended
up requiring me to update GCC which broke EVERYTHING else. Oh, and
the next generation is now required to know Perl to maintain axiom.

The problem isn't that I don't understand the complex methods. 
The problem is that I am optimizing toward simplicity. 


t




reply via email to

[Prev in Thread] Current Thread [Next in Thread]