-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Monday 01 March 2004 06:28 pm, Davi de Castro Reis wrote:
Steven T. Hatton wrote:
Autotools documentation is really not that good, but when you get it, well, you get it. Do you happen to know a way to dump all the targets in a Makefile in a way similar to Ant's -p (or older -projecthelp)?
Don't get me wrong. I'm not at a complete loss as to what's going on. I've been able to go into the files in things such as festival and make significant changes to the way they build. http://www.cstr.ed.ac.uk/projects/festival/. It's just that I don't have the recipe down.
The most common way you use it (in this order) is as follows:
input program output acinclude.m4/configure.ac aclocal aclocal.m4 configure.ac autoheader config.h.in Makefile.am automake -a Makefile.in Makefile.in/config.h.in/aclocal.m4 ./configure Makefile
I've been off doing other things, and haven't been able to revisit this issue. I really do want to get the hang of starting from scratch, but right now, I can continue to work at a higher level, and use tools to generate these things. I really don't like to use tools like these to do things for me unless I understand what they are doing for me. But I also like to make progress.
Another great feature of autotools is the sanity checks. Once you have a Makefile, you don't need worry anymore (most of the time). If you modify configure.ac, just type make and it goes through all process needed to generate the new Makefile for you.
I do believe there is a right way to do all this, and a lot of people don't do it correctly. Not that I know how to do it correctly, but I know what correct results look like. A good example is Xerces-C. It requires more than a simple ./configure to get it going. It's well documented, so I can't criticize too much. Nonetheless I have to wonder if it's that way simply because no one has taken the time (away form other productive efforts) to figure out how to get it right.
The ./configure script has several advantages compared to custom makefiles. I usually set a lot of flags when developing. to optimize: CXXFLAGS="-O2 -fomit-frame-pointer -DNDEBUG" ./configure --prefix=/usr to debug overflows LDFLAGS="-lefence" ./configure --prefix=/usr and so on.
Oh, I've been using this stuff from the consumming end for the better part of a decade. I know it does great things. Ant does some pretty nice stuff as well. I don't recall where, but I do recall one leading developer proclaim that after working with Ant she'd be happy if she never had to look at a Makefile again. Of course Ant is typically used for Java builds which do not target specific hardware platforms. It's bound to be less complicated. I suspect there are ways to create the Autotools files so they are much more coherent than they often turn out in real life. It doesn't help to be on an unfamiliar platform reading a tutorial from one version, documentation from another, and actually invoking a third version of the tools when trying to learn. I was on my father's WinDOS 98 using cygwin. One other thing I'm not sure about is how to work the Qt moc stuff into a standard Autotools system.
[]s Davi
STH -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFAQu9uwX61+IL0QsMRAixNAKCCLFlRQUdWj6qAKSV0w7CwbK1kLACfac62 WBkmm9cAKQdr7RLqLRjY+Ys= =foSt -----END PGP SIGNATURE-----