[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00
From: |
Gary V . Vaughan |
Subject: |
Re: [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00 |
Date: |
Tue, 10 Jul 2001 03:46:55 +0100 |
On Tuesday 10 July 2001 1:05 am, Michael Elizabeth Chastain wrote:
> For my bribe, I will spend some time this weekend looking at something
> in the libtool TODO file. Maybe I can figure out the "zsh echo"
> problem or something.
>
> MichaelC
I don't know if you have noticed, but the size of the libtool distribution
grows exponentially with the size of libtool.m4. This is because each demo
directory has a copy of libtool.m4 as acinclude.m4, and another copy as
aclocal.m4. A really nice weekend project would be to write a dist-hook
which removes all these copies of libtool.m4 (being careful to preserve the
additional stuff added by aclocal) at `make dist' time, and add some magic to
the `make check' rules (or perhaps to the configure script) to put the copies
back together from the distributed libtool.m4.
A quick experiment shows how much space we waste with this duplication:
$ ls -s libtool-1.4b.tar.gz
1916 libtool-1.4b.tar.gz
$ tar zxf libtool-1.4b.tar.gz
$ rm -f libtool-1.4b/*demo/acinclude.m4
$ rm -f libtool-1.4b/*demo/aclocal.m4
$ tar chozf libtool-1.4b.tar.gz libtool-1.4b
$ ls -s libtool-1.4b.tar.gz
1436 libtool-1.4b.tar.gz
Almost half a meg! I expect the overheads of adding a few lines of shell
code to configure.ac/Makefile.am will add only a few hundred bytes back to
these figures...
The rest of the difference in size between 1.4 and 1.4b tarballs is due to
the switch to autoconf-2.50, which produces much larger configure scripts.
And we now have 8 of them!!
$ cd libtool-1.4
$ ls -s configure */configure
172 cdemo/configure 176 demo/configure 212 libltdl/configure
180 configure 172 depdemo/configure 184 mdemo/configure
$ cd ../libtool-1.4b
$ ls -s configure */configure
424 cdemo/configure 428 depdemo/configure 432 pdemo/configure
436 configure 484 libltdl/configure 432 tagdemo/configure
432 demo/configure 440 mdemo/configure
These guys each carry a fantastic amount of duplicated shell code (at least
the entirety of the expanded libtool.m4 file). A more advanced project might
be to find and extract the largest common block to a single file, and then in
the dist-hook replace that block in each configure script with a source
command: `. $top_srcdir/libtool.ac' or something...
Just a quick hack to get a feel for how much this could shrink the tarball:
$ cd libtool-1.4b
$ rm -i */configure
rm: remove `cdemo/configure'? y
rm: remove `demo/configure'? y
rm: remove `depdemo/configure'? y
rm: remove `libltdl/configure'? y
rm: remove `mdemo/configure'? n
rm: remove `pdemo/configure'? n
rm: remove `tagdemo/configure'? n
$ cd ..
$ tar chozf libtool-1.4b.tar.gz libtool-1.4b
$ ls -s libtool-1.4*.tar.gz
1072 libtool-1.4.tar.gz 1044 libtool-1.4b.tar.gz
Cheers,
Gary.
--
())_. Gary V. Vaughan gary@(oranda.demon.co.uk|gnu.org)
( '/ Research Scientist http://www.oranda.demon.co.uk ,_())____
/ )= GNU Hacker http://www.gnu.org/software/libtool \' `&
`(_~)_ Tech' Author http://sources.redhat.com/autobook =`---d__/
- [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00, Michael Elizabeth Chastain, 2001/07/01
- Re: [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00, Michael Elizabeth Chastain, 2001/07/02
- Re: [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00, Michael Elizabeth Chastain, 2001/07/09
- Re: [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00, Michael Elizabeth Chastain, 2001/07/09
- Re: [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00, Michael Elizabeth Chastain, 2001/07/09
- Re: [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00, Michael Elizabeth Chastain, 2001/07/09
- Re: [PATCH] lower cap on max_cmd_len to fix hppa2.0w-hp-hpux11.00,
Gary V . Vaughan <=