Automake a case study
I have a small project Directory Structure looks like this: /Project/ --- Build system files go here | | |__/project/ --- C src and headers go here | | |___/docs --- *.txt *.doc *.html Project/Makefile.am SUBDIRS = project docsdir = $(datadir)/project/docs docs_DATA = project/docs/* EXTRA_DIST = project.spec INSTALL-WIN32 .PHONY: $(DATA) Project/project/Makefile.am bin_PROGRAMS = project project_SOURCES = *.c *.h EXTRA_DIST = docs I have 2 problems, first is that this works perfect for make make clean make dist make install but make distcheck and make uninstall don't... However when running make distcheck the make install target fails for the DATA. However thats the easy problem ( I'm pretty sure these are automake bugs ) The hard problem is that on this list and in alot of other places I keep seeing references to A really good book and some other good docs on the autotools I'm gonna try not to be to windy here, yet informative and enlightening... I've been working on this project for several months now learning C as I go ONE concept at a time I put those .am's together myself! BUT it took me two months. Redhat did a great job writing that book but it's absolutely worthless. The book spends more than half of its breath talking about libtool libraries and 2/3 of whats left on autoconf and only lightly touches on automake. The examples for automake are poor. The writing style assumes too much knowledge. Alot more often now you'll be seeing guys like me (I'm 43 have a family and full time job and come to the unix world from the windows world and I've been computing since before IBMPC 64k 4.77mhz came out) due to the fast paced growth linux. Not the typical project participant! Consequently a book that assumes way too much knowledge and really a program as complicated automake, being so poorly documented, is a real roadblock for guys like me getting involved in open-source projects. Here are problems I found: PRIMARIES are very briefly touched on but never fully explained and no where is there a list of all valid PRIMARIES For me noticing that made me wonder what else wasn't being said. I saw references to other parts of automake commands yet no lists of valid parts (keywords?) one specific example noinst ... If _DIST and _DATA are valid PRIMARIES what is noinst_ ? And this whole thing about invalid variables Never once does that book bother to drop to the level of explaining those! But I need that level of explanation and so do alot of other people! Add to that confusion the libtool portion of the book replacing the dot in filenames with underscores. (I actually understand why that's done [being only slightly versed in perl]) My point is a well documented program wouldn't require the user to be an expert in 5 other programming languages to be able to use it and more importantly it's documentation. And I stand back on what I infered before. I don't have the time to learn 5 langs just to be able to use automake. And I should'nt have to. In closing, I'm currently I'm using automake 1.6. The improvements in your software since the version I started with, have been wonderful! Automake is HUGHLY important to free-software (free as in freedom). However at this point it is also one of three tools creating HUGH roadblocks for me and many others like me from getting involved in open source projects. Because of poor documentation... Respectfully, Calvin Arndt Linux is not just the reallm of college CS majors anymore!
automake -a -f does not help
On Tue, 23 Apr 2002, Nishio Futoshi wrote: Hi! Please use -a option for automake (and you need -f option, maybe). At Mon, 22 Apr 2002 19:00:53 +0200 (CEST), Joerg Anders wrote: $ automake automake: configure.in: required file `./depcomp' not found This does not help: $ automake -a automake: configure.in: installing `./depcomp' /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL $ automake -f /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL $ automake -f -a /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL /usr/share/automake/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL -- J.Anders, Chemnitz, GERMANY ([EMAIL PROTECTED])
Creting extra executables.
I've an application that has a directory structure like this. ./src ./src/non_gui ./src/gui In the non_gui directory there are about 6 binaries, which will build easily one any system. In the gui directory, there is currently one (probably more later) binaries that require all sorts of libraries to be installed. I want the configure script to accept configure --with-gui before it will build the bits in gui. How is the *best* way to go about this. I have failed miserably. The main problem seems to be that src/Makefile.am either has to have # This is src/Makefile.am, which is proceed by automake SUBDIRS = non_gui gui EXTRA_DIST = README tests in which case a makefile src/gui/Makefile is expected to be made. I've configured the configure.in so the makefile does not get made by ending it with if test x$with_gui = xyes; then AC_OUTPUT([ Makefile src/Makefile src/gui/Makefile src/ non_gui/Makeile]) else AC_OUTPUT([ Makefile src/Makefile src/ non_gui/Makeile]) Rather than ask how to tweak my method so it does work, can anyone tell me the best way to implement a system so that make will only try to build files in one particular directory if a certain option is given to configure. -- Dr. David Kirkby PhD, email: [EMAIL PROTECTED] web page: http://www.david-kirkby.co.uk Amateur radio callsign: G8WRB
RE: Creting extra executables.
Always create the gui makefile. Use a configure substitution to change the value of SUBDIRS, and use DIST_SUBDIRS to ensure that all the code gets distributed. Rob
automake 1.4 does not work
Unfortunately I'm not a autoconf/automake guru. But I think I can state: automake 1.4 does not work. I can't say exactly what's wrong. But please try to use automake 1.6 togehther with the KDE3 default admin files. And you'll see: It is impossible. You get a lot of errors. And if you bring it to works with some tricks it does a lot of errors during installation. (some pixmaps and other files are not installed.) First I upgraded from automake 1.5 (which comes with SuSE-Linux 8.0) to automake 1.6. This was terrible. After that I downgraded ti automake 1.4 -- all works -- J.Anders, Chemnitz, GERMANY ([EMAIL PROTECTED])
Re: configure: AM_PROG_LEX: command not found
Joerg == Joerg Anders [EMAIL PROTECTED] writes: [...] In all cases, please run aclocal before running automake. Joerg Ok! This works! Thank you! Joerg But now appears the next problem: Joerg $ cat configure.in Joerg AC_INIT(hello.c) Joerg AM_INIT_AUTOMAKE(hello, 1.3.11) Joerg AC_PROG_CC Joerg AM_PROG_LEX Joerg AC_PROG_YACC Joerg AC_OUTPUT(Makefile) Joerg $ automake Joerg $ autoconf Joerg configure.in:4: error: possibly undefined macro: AM_PROG_LEX Joerg $ ./configure Joerg ... Joerg ./configure: AM_PROG_LEX: command not found Joerg I assume I have to include something.(?) Please run aclocal before running automake. Do this each time you have updated configure.in. (Or read about a tool named `autoreconf', shipped with Autoconf.) -- Alexandre Duret-Lutz
Re: configure: AM_PROG_LEX: command not found
Did you read below? At Tue, 23 Apr 2002 10:34:17 +0200, Alexandre Duret-Lutz wrote: older version of aclocal. In all cases, please run aclocal before running automake. -- Nishio Futoshi [EMAIL PROTECTED]
Re: automake 1.4 does not work
On Tue, 2002-04-23 at 11:04, Joerg Anders wrote: Unfortunately I'm not a autoconf/automake guru. But I think I can state: automake 1.4 does not work. Of course they work. There are many people using such releases. However, as with all software, there are some bugs (both known and unknown), and some incompatibilities with previous versions. Please work with us to help solve the problems. This means: give us useful information. I can't say exactly what's wrong. Yes, you can. It will take more effort on your part, but that's only fair given that you're expecting other people to spend a big chunk of time fixing the problems. If you genuinely have no idea how to describe your problems, I suggest you read How to Report Bugs Effectively at http://www.chiark.greenend.org.uk/~sgtatham/bugs.html Note that bug reports which aren't at least reasonably close to the principles in that document are generally useless and are usually ignored. But please try to use automake 1.6 togehther with the KDE3 default admin files. And you'll see: It is impossible. Where are these files? What OS do they work on? What _exactly_ should be done to reproduce your problem? (Give FULL details) What would you expect to see? What do you actually see? You get a lot of errors. And if you bring it to works with some tricks it does a lot of errors during installation. (some pixmaps and other files are not installed.) Please tell us what errors, and describe the tricks you're mentioning. First I upgraded from automake 1.5 (which comes with SuSE-Linux 8.0) to automake 1.6. This was terrible. Why? After that I downgraded ti automake 1.4 -- all works Automake 1.6.1 has many bugfixes over 1.6. Note also that there are some required changes when moving from 1.4 - 1.5 or 1.5 - 1.6, and also that many undocumented features which worked (albeit unreliably) in 1.4 are caught and complained about when used with 1.5 and 1.6. -- Richard
non-recursive project example
Does anyone have a small example project using automake that is free of recursive makes? I'm not quite sure how it is supposed to work, so I don't know if the things I'm seeing when I try to convert a (currently flat) project to non-flat, non-recursive style are intended or not. Thanks, Tim. */ msg05064/pgp0.pgp Description: PGP signature
RE: non-recursive project example
Here's one.. I've got another more complete example with installable libraries and headers if needed, but it's somewhat longer. This is a trimmed down file from a current project. Rob ## Process this file with automake to produce Makefile.in # # $Id: Makefile.am,v 1.3 2002/01/13 14:16:17 robertc Exp $ # AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects VERSION=1.5 DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* bin_PROGRAMS = foo noinst_LTLIBRARIES = src/bar.la INCLUDES = -I $(top_srcdir)/include noinst_HEADERS = include/bar.h foo_SOURCES = src/foo.cc foo_LDADD = src/bar.la src_bar_la_SOURCES = src/bar.cc src_bar_la_LDFLAGS = -module
Re: automake 1.4 does not work
Joerg Anders writes: Unfortunately I'm not a autoconf/automake guru. But I think I can state: automake 1.4 does not work. I can't say exactly what's wrong. But please try to use automake 1.6 togehther with the KDE3 default admin files. And you'll see: It is impossible. Nobody here is going to download KDE3 just to find out. You'll have to give a few examples. You get a lot of errors. And if you bring it to works with some tricks it does a lot of errors during installation. (some pixmaps and other files are not installed.) First I upgraded from automake 1.5 (which comes with SuSE-Linux 8.0) to automake 1.6. This was terrible. After that I downgraded ti automake 1.4 -- all works automake 1.6 requires autoconf 2.52. But from my experience, automake 1.4 and 1.5 can be used interchangeably. If you change any of the auto* tools, make sure that all auto* generated files are rebuilt before first use. The exact options may depend on the project directory layout, but something along the lines of rm -f config.cache config.h aclocal -I m4 autoheader automake autoconf should work.
Re: Automake a case study
On Tue, Apr 23, 2002 at 12:24:59AM -0600, Calvin Arndt wrote: Project/Makefile.am SUBDIRS = project docsdir = $(datadir)/project/docs ^^^ use $(PACKAGE), it's more flexible docs_DATA = project/docs/* In older releases of automake, you would have to write a dist-hook rule to distribute docs_DATA. That's not good. It will break if you use CVS, or have any generated files in there. Why not add `docs' to SUBDIRS, and have a dedicated Makefile.am in there to build/install/distribute the docs? You can use something like: man_MANS = [manpages] htmldir = $(datadir)/$(PACKAGE)/doc/html html_DATA = [html files] textdir = $(datadir)/$(PACKAGE)/doc text_DATA = [text files] EXTRA_DIST = $(man_MANS) $(html_DATA) $(text_DATA) I put those .am's together myself! BUT it took me two months. Redhat did a great job writing that book but it's absolutely worthless. The book spends more than half of its breath talking about libtool libraries and 2/3 of whats left on autoconf and only lightly touches on automake. The examples for automake are poor. Have you tried looking at existing projects as examples? There are literally thouands to choose from. Books are useful, but getting experience by looking at what other have done, and why, will teach you more. Experiment with it and see what it can do, and (possibly) find the limitations. Linux is not just the reallm of college CS majors anymore! Was it ever? I'm a biologist (and free software programmer in my spare time) -- Roger Leigh ** Registration Number: 151826, http://counter.li.org ** Need Epson Stylus Utilities? http://gimp-print.sourceforge.net/ GPG Public Key: 0x25BFB848 available on public keyservers
Re: non-recursive project example
Robert == Robert Collins [EMAIL PROTECTED] writes: [...] Robert AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects VERSION=1.5 Where does this `VERSION=1.5' usage comes from? That the second time I see it. AFAICT this relies on a bug in Automake which has been fixed in 1.6.1. This should be AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 (i.e. without the `VERSION=') [...] -- Alexandre Duret-Lutz
RE: non-recursive project example
-Original Message- From: Alexandre Duret-Lutz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 10:07 PM To: Robert Collins Cc: Tim Waugh; [EMAIL PROTECTED] Subject: Re: non-recursive project example Robert == Robert Collins [EMAIL PROTECTED] writes: [...] Robert AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects VERSION=1.5 Where does this `VERSION=1.5' usage comes from? That the second time I see it. AFAICT this relies on a bug in Automake which has been fixed in 1.6.1. This should be When did it get fixed? If it wasn't fixed in 1.5, then my usage comes from getting it to work under 1.5. Rob
Re: non-recursive project example
Robert == Robert Collins [EMAIL PROTECTED] writes: Robert When did it get fixed? 1.6.1 -- Alexandre Duret-Lutz
RE: non-recursive project example
-Original Message- From: Alexandre Duret-Lutz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 10:26 PM To: Robert Collins Cc: Tim Waugh; [EMAIL PROTECTED] Subject: Re: non-recursive project example Robert == Robert Collins [EMAIL PROTECTED] writes: Robert When did it get fixed? 1.6.1 That'll be it then. I'll leave it as it is until 1.5 fades from use... Rob
RE: non-recursive project example
-Original Message- From: Alexandre Duret-Lutz [mailto:[EMAIL PROTECTED]] Sent: Tuesday, April 23, 2002 10:48 PM To: Robert Collins Cc: Tim Waugh; [EMAIL PROTECTED] Subject: Re: non-recursive project example Robert == Robert Collins [EMAIL PROTECTED] writes: [...] Robert When did it get fixed? 1.6.1 Robert That'll be it then. I'll leave it as it is until 1.5 Robert fades from use... Maybe I was not clear: if you simply remove the `VERSION=' prefix it will work as you intend (and as documented) with *all* versions of Automake. Cool. Ok, will do. Rob
Re: Thanks! And question!
Joerg == Joerg Anders [EMAIL PROTECTED] writes: [...] Joerg But what do you recommend to do? Just relax and wait for the next Automake release :) -- Alexandre Duret-Lutz
Le dernier sondage avant les éléctions présidentielles 2002 !
Title: Untitled Document En partenariat avec Le dernier sondage avant le second tour des lections prsidentielles 2002 Sondage Express ralise le dernier sondage avant le second tour des lections prsidentielles. Les rsultats seront envoys par e-mail tous les participants avant les 24 et 26 avril et le 3 mai 2002 minuit par e-mail. Pour quel candidat allez vous voter le dimanche 5 mai 2002 ? Jacques Chirac Parti politique : Rassemblement pour la Rpublique ge : 69 ans Situation de famille : Mari et pre de deux filles Mtier d'origine : Haut-fonctionnaire Mandat en cours : Prsident de la Rpublique depuis 1995 Jean-Marie Le Pen Parti politique : Front national ge : 73 ans Situation de famille : Pre de trois filles Mtier dorigine : Chef dentreprise Mandats en cours : Dput europen depuis 1984 Je ne voterai pas NSP Je suis certain de mon choix Mon choix n'est pas encore dfinitif Pour quel candidat avez vous vot au 1er tour ? A. Laguiller A. Madelin B. Megret C. Boutin C. Lepage C. Taubira D. Gluckstein F. Bayrou J. Chirac J. Saint-Josse J.M. Le Pen J.P. Chevenement L. Jospin N. Mamere O. Besancenot R. Hue NSP Attention : ce sondage non nominatif est adress un panel de 100 000 internautes. Il ne peut en aucun cas tre considr comme reprsentatif de la population franaise et ne doit en aucun cas porter une influence quelconque sur les votes rels des lections prsidentielles du dimanche 5 mai 2002. Aucun fichier informatique nominatif n'est constitu par Sondage Express. Rsultat pris en compte jusqu'au vendredi 3 mai 18h00. Pour ne plus participer aux sondages express, indiquez votre email dans le champs ci-dessous et validez : Email :