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: MELT help: how to autoconf-igure makefile fragments?


Joern Rennecke wrote:
Quoting Basile STARYNKEVITCH <basile@starynkevitch.net>:
But I don't understand much about gcc/configure.ac and I am extremely
scared to touch that file.

A very big thanks for answering.

There is an info page for autoconf. If you don't like (to learn how to use) info, you can simply use info autoconf | less and the skip to the end, back to the start, and read at your leisure.

Thanks, I did read several times the autoconf manual.


There is not much that can go wrong when you run autoconf if you have all
your sources in svn.
Now, if you set your mind to it, you can certainly create a configure
script that does rm -rf / .  If you are afraid of that, you can do your
builds using a different user with restricted disk access.

I am perhaps too ambitiously not afraid of making such a big mistake (FWIW I did an rm -rf / under root on my first sun3 workstation circa 1986, and still remember the shock... I learned all my Unix knowledge by reading man pages on paper; I read most of them from start of section 1 to end of section 8. That was on SunOS3.2 IIRC...).



Note that for simpler projects, autoconf generated configure scripts usually
read Makefile.in templates generated by automake; it is only when projects
get as complicated as GCC that automake would be more hindrance than help.

What confuses me is what exact line in gcc/configure.ac of the trunk is actually generating gcc/Makefile in the build tree from the gcc/Makefile.in. Perhaps AC_PROG_MAKE_SET at line 832, or AC_CONFIG_FILES($all_outputs) at line 4329. I probably have to extend $all_outputs to add melt-module.mk.in inside.


I have been able to hack the gcc/configure.ac in MELT, but it was always in trial & error mode, and it takes time to test it. That damned configure.ac is the file that scares me the most, because testing it takes so much time!

If anyone have tricks to avoid rebuilding all of GCC when hacking seriously configure.ac, please share them with me. Tiny patches in configure.ac apparently don't require a whole rebuild, but in my bitter experience more important changes allmost always require a rebuild from scratch.

Cheers.


-- Basile STARYNKEVITCH http://starynkevitch.net/Basile/ email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359 8, rue de la Faiencerie, 92340 Bourg La Reine, France *** opinions {are only mines, sont seulement les miennes} ***


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