automake
[Top][All Lists]
Advanced

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

automake distcheck question


From: songbird
Subject: automake distcheck question
Date: Thu, 12 Apr 2012 22:07:00 -0400
User-agent: slrn/pre1.0.0-18 (Linux)

  [edited and posted from another group after
being redirected]

  hi everyone,  :)


  i'm running Debian (testing) with current
automake, autoconf, etc.

  please note that the example code below does
nothing at all, that's not the important part
at the moment in this trail of learning, i'm
just examining the build environment and making
sure it configures, compiles, dists, etc. correctly.


  my question?  it's at the end, but to be complete
i include background and development.


  i've used a small tutorial that is part of an
online book at: 

  http://sources.redhat.com/autobook/autobook/autobook.html#SEC_Top

and specifically the foonly-2.0.tar.gz example after setting up a
working directory to play in.


  at first when unpacked i get a list:

-rwxr-xr-x 1 me me   33 Feb  2  2006 bootstrap
-rw-r--r-- 1 me me  235 Feb  2  2006 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 1014 Feb  2  2006 Makefile.am
-rw-r--r-- 1 me me   17 Feb  2  2006 nly.c
-rw-r--r-- 1 me me   78 Sep 13  2004 parser.y
-rw-r--r-- 1 me me    3 Sep 13  2004 scanner.l

  running ./bootstrap and ./configure doesn't work
and besides i don't want the guy who wrote this 
stuff to get bug reports from me messing around so
i make a new version and tinker around a bit so
it compiles and does things right.


  do a make dist and it now looks like this when
unpacked:

-rw-r--r-- 1 me me  35550 Apr 11 12:57 aclocal.m4
-rwxr-xr-x 1 me me     33 Feb  2  2006 bootstrap
-rwxr-xr-x 1 me me 141988 Apr 11 12:57 configure
-rw-r--r-- 1 me me    241 Apr 11 02:36 configure.ac
-rwxr-xr-x 1 me me  20899 Apr 11 12:57 depcomp
-rw-r--r-- 1 me me     17 Feb  2  2006 foo.c
-rwxr-xr-x 1 me me  13998 Apr 11 12:57 install-sh
-rw-r--r-- 1 me me     28 Sep 13  2004 main.c
-rw-r--r-- 1 me me   1124 Apr 11 12:56 Makefile.am
-rw-r--r-- 1 me me  21570 Apr 11 12:57 Makefile.in
-rwxr-xr-x 1 me me  10346 Apr 11 12:57 missing
-rw-r--r-- 1 me me     17 Feb  2  2006 nly.c
-rw-r--r-- 1 me me  43182 Apr 11 12:57 parser.c
-rw-r--r-- 1 me me    124 Apr 11 00:15 parser.y
-rw-r--r-- 1 me me  43820 Apr 11 12:57 scanner.c
-rw-r--r-- 1 me me      3 Sep 13  2004 scanner.l
-rwxr-xr-x 1 me me   6383 Apr 11 12:57 ylwrap


  a lot of extra stuff in there.  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.  except now distcheck doesn't work.


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).


  links to four versions:

http://www.anthive.com/tinker/foonly-2.0.tar.gz
http://www.anthive.com/tinker/foonly-2.0.1.tar.gz
http://www.anthive.com/tinker/foonly-2.0.1.small.tar.gz
http://www.anthive.com/tinker/foonly-2.0.1.big.tar.gz

  thanks for any comments, and of course i'll keep
digging at this when i have time.  :)


  songbird




reply via email to

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