FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-11-2012, 05:51 PM
songbird
 
Default learning automake, etc. and being minimalistic

in the years of tinkering on linux i've never
really dug into a lot of things, much preferring
to hope packages work out of the box and if
they don't give up and go find something else
to do (there's always something else to do ).

so recently, trying to upgrade my understanding
i've wanted to get into autoconf, automake, etc.

i'm running a mix of testing, sid and experimental
without big troubles.

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.

ok, 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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: utsg59-k4c.ln1@ID-306963.user.uni-berlin.de">http://lists.debian.org/utsg59-k4c.ln1@ID-306963.user.uni-berlin.de
 
Old 04-12-2012, 07:31 AM
Alberto Luaces
 
Default learning automake, etc. and being minimalistic

songbird writes:

> in the years of tinkering on linux i've never
> really dug into a lot of things, much preferring
> to hope packages work out of the box and if
> they don't give up and go find something else
> to do (there's always something else to do ).

[...]

>
> ok, i've used a small tutorial that is part of an
> online book at:
>
> http://sources.redhat.com/autobook/autobook/autobook.html#SEC_Top
>

I might get back to you with a solution to your problem, but in the
meantime I would warn you about using that outdated manual for learning
autotools. I would recommend you to take a look at the following
resources in the future:

Autotools tutorial by Alexandre Duret-Lutz:

http://www.lrde.epita.fr/~adl/autotools.html

Another reference by Diego Elio “Flameeyes” Pettenò:

http://www.flameeyes.eu/autotools-mythbuster/

The first articles of John Calcote which later got published in a book
by OReilly:

http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool

Now that I think about it, you will get faster and better answers in the
automake mailing list.

Regards,

--
Alberto


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 8762d5be4q.fsf@eps142.cdf.udc.es">http://lists.debian.org/8762d5be4q.fsf@eps142.cdf.udc.es
 
Old 04-12-2012, 02:28 PM
songbird
 
Default learning automake, etc. and being minimalistic

Alberto Luaces wrote:
> songbird writes:
>
>> in the years of tinkering on linux i've never
>> really dug into a lot of things, much preferring
>> to hope packages work out of the box and if
>> they don't give up and go find something else
>> to do (there's always something else to do ).
>
> [...]
>
>>
>> ok, i've used a small tutorial that is part of an
>> online book at:
>>
>> http://sources.redhat.com/autobook/autobook/autobook.html#SEC_Top
>>
>
> I might get back to you with a solution to your problem, but in the
> meantime I would warn you about using that outdated manual for learning
> autotools.

oh, sure, i know it's not current, but it gave me
a perfect simple example to step forward from.

already i've taken that and expanded it to work
for a different project with a subdirectory and
multiple binaries. a few more bad-weather days
and i should be able to tar.gz and release a
version of it without the existing more complicated
build environment that it had wrapped around it
before. a much nicer way forwards if i ever want
to build a Debian package.

i'm using fairly current versions of the tools and
have the info pages installed and am using those too
as i go along. however, i wanted a tutorial with
a bit more overview and one that integrated the tools
together.


> I would recommend you to take a look at the following
> resources in the future:
>
> Autotools tutorial by Alexandre Duret-Lutz:
>
> http://www.lrde.epita.fr/~adl/autotools.html
>
> Another reference by Diego Elio “Flameeyes” Pettenò:
>
> http://www.flameeyes.eu/autotools-mythbuster/
>
> The first articles of John Calcote which later got published in a book
> by OReilly:
>
> http://www.freesoftwaremagazine.com/books/autotools_a_guide_to_autoconf_automake_libtool
>
> Now that I think about it, you will get faster and better answers in the
> automake mailing list.

thanks, i'll take a look at them, and see if i can find
the automake mailing list.


> Regards,


songbird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1e5j59-uul.ln1@ID-306963.user.uni-berlin.de">http://lists.debian.org/1e5j59-uul.ln1@ID-306963.user.uni-berlin.de
 
Old 04-13-2012, 11:34 AM
songbird
 
Default learning automake, etc. and being minimalistic

Alberto Luaces wrote:
...
> Now that I think about it, you will get faster and better answers in the
> automake mailing list.

thanks again, i posted there and got a prompt reply
that said i didn't understand distcheck, so basically
i leave the extra stuff in so that others don't have
to have the complete build environment that i have.

all set, good to leave the extra stuff in there,
then distcheck works. so taking out the dist-hook
for a general release is the proper fix.


songbird


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: vjfl59-sj4.ln1@ID-306963.user.uni-berlin.de">http://lists.debian.org/vjfl59-sj4.ln1@ID-306963.user.uni-berlin.de
 

Thread Tools




All times are GMT. The time now is 02:39 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org