automake
[Top][All Lists]
Advanced

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

Re: automake distcheck question


From: songbird
Subject: Re: automake distcheck question
Date: Fri, 13 Apr 2012 07:26:48 -0400
User-agent: slrn/pre1.0.0-18 (Linux)

Stefano Lattarini wrote:
>songbird wrote:

>>   [edited and posted from another group after
>> being redirected]
>> 
>>   hi everyone,  :)

[...]

> That is pretty old, and mostly outdated AFAIK.  Have you tried taking a
> look at this instead?
>
>  <http://www.flameeyes.eu/autotools-mythbuster/>
>
> I've also found this very clear and useful when I was learning the
> autotools myself:
>
>  <http://www.lrde.epita.fr/~adl/autotools.html>

  yes, thank you, both of those have been recommended 
to me and i have them bookmarked for further study.


[...]
>>   a lot of extra stuff in there.
>>
> That "extra stuff" is what will allow your package to work on
> the machines of your users without requiring them to have all
> the developer's tools you're using (autoconf, automake, aclocal,
> bison, flex).

  ok.  i'm one of those people who hates extra
files being left behind when they are autogenerated
anyways, but i see your point.  thanks for putting
me straight.


>   reading more i
>> come across dist-hook and add a README file so
>> there's some idea of what is going on.  Put those
>> in and now when unpacked it looks like:
>> 
>> -rwxr-xr-x 1 me me   33 Feb  2  2006 bootstrap
>> -rw-r--r-- 1 me me  247 Apr 11 12:22 configure.ac
>> -rw-r--r-- 1 me me   17 Feb  2  2006 foo.c
>> -rw-r--r-- 1 me me   28 Sep 13  2004 main.c
>> -rw-r--r-- 1 me me 1326 Apr 11 12:19 Makefile.am
>> -rw-r--r-- 1 me me   17 Feb  2  2006 nly.c
>> -rw-r--r-- 1 me me  124 Apr 11 00:15 parser.y
>> -rw-r--r-- 1 me me 1517 Apr 11 04:12 README
>> -rw-r--r-- 1 me me    3 Sep 13  2004 scanner.l
>>
>> 
>>   much better.
>>
> No, completely broken.  When a user gets your tarball and unpacks it,
> he expects to be able to run "./configure && make && make install" and
> have that succeed without further steps and without requiring the
> presence of developer-specific tools.  This is not the case with your
> distribution tarball.

  ok, i will leave it alone then.  out comes the 
dist-hook.


>>  except now distcheck doesn't work.
>> 
> And rightly so -- it is basically informing you that your 'dist-hook'
> has mangled your distribution tarball.

  heheh, oops.  yes, you are right below in saying that
i misunderstood the meaning of distcheck.  i thought it
simply verified that the files meant to be distributed
are those that are in the archive.


>> Question:  (finally! :) )
>> 
>> hmm...  how to add a flag so that the first time
>> through the generated Makefile doesn't do the dist-hook
>> and only does it at the end?  or is this a bug in
>> that the dist-hook shouldn't be run during a distcheck?
>> obviously the fixes have to go into Makefile.am to
>> get passed through or configure.ac.  more complicated
>> than that and it defeats the purpose of keeping things
>> minimal as possible.
>> 
>> 
>> The four versions of the code tar and gzip to:
>> 
>> -rw-r--r-- 1 me me 96783 Apr 11 12:34 foonly-2.0.1.big.tar.gz
>> -rw-r--r-- 1 me me  2120 Apr 11 12:32 foonly-2.0.1.small.tar.gz
>> -rw-r--r-- 1 me me 96027 Apr 11 12:57 foonly-2.0.1.tar.gz
>> -rw-r--r-- 1 me me  1211 Apr 10 22:57 foonly-2.0.tar.gz
>> 
>>   i really like that the small version that works almost
>> completely (minus the distcheck make target) is so tiny
>> yet has the code and the build scripts entirely in there
>> and the rest can all be generated.  that's exactly the
>> kind of setup i always aim towards.  ship minimal but it
>> has to build with what is shipped (if the rest of the
>> environment is correct).
>>
> Sorry, you are misunderstanding how the autotools work and what
> problems they are supposed to solve.  The point is that you
> ship big (not minimal) so that the build works even when some
> parts of the the build environment on the user's machine is
> missing or broken. The tutorials I've linked above should explain
> this in greater details and with more clarity.  It is also hinted
> in the Autotools wikipedia entry:

   *nods*  got it now.


>   [Advantages of the GNU build system]
>   The GNU build system allows a programmer to write cross-platform
>   software. It also makes the build process easier on a user who
>   wants to compile the program on his or her own computer. The user
>   does not need to have GNU build system components installed on
>   the computer but only needs to run the supplied configure script
>   which has no dependencies other than the presence of a
>   Bourne-compatible shell.
>
> HTH,
>   Stefano

  yes, very much, thanks.

  the good news is that i was able to use the
simple example to figure out how to replace a
framewerk wrapped collection of programs.  something
i've wanted to do for a few years.  now that
collection is all set up without an extra layer
of build complexity.  progress.  next item, update 
some document files and it's ready to go.

  thanks again,


  songbird




reply via email to

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