[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automake -vs- huge projects
From: |
Alexandre Duret-Lutz |
Subject: |
Re: automake -vs- huge projects |
Date: |
Wed, 31 Dec 2003 01:39:35 +0100 |
User-agent: |
Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux) |
>>> "Ralf" == Ralf Corsepius <address@hidden> writes:
Ralf> On Tue, 2003-12-16 at 17:49, Tom Tromey wrote:
>> The problem is, automake generates an explicit rule for each
>> compilation. Our resulting Makefile.in is nearly 9 megabytes. This
>> is really much too large -- compare to 200K with automake 1.4.
Ralf> For subdir-compilation/non-recursive Makefiles automake generates *2*
Ralf> explicit rules (cygwin and n/cygwin) for each compilation. Folding these
Ralf> two rules into one, alone would reduce the size of Makefiles using many
Ralf> files by almost factor 2.
Hmmm. What we'd need to merge are these:
.c.o:
$(CC) -c -o $@ $<
.c.obj:
$(CC) -c -o $@ `$(CYGPATH_W) $<`
and these:
sub/foo.o: sub/foo.c
$(CC) -c -o $@ `test -f 'sub/foo.c' || echo '$(srcdir)/'`sub/foo.c
sub/foo.obj: sub/foo.c
$(CC) -c -o $@ `if test -f 'sub/foo.c'; then $(CYGPATH_W) 'sub/foo.c';
else $(CYGPATH_W) '$(srcdir)/sub/foo.c'; fi`
The extension is obviously not an issue, but how can we arrange the CYGPATH_W
stuff?
I've thought about this:
.c.$(OBJEXT):
$(CC) -c -o $@ $(am__cpbegin)$<$(am__cpend)
sub/foo.$(OBJEXT): sub/foo.c
src=`test -f 'sub/foo.c' || echo '$(srcdir)/'`sub/foo.c; \
$(CC) -c -o $@ $(am__cpbegin)$$src$(am__cpend)
and then have
am__cpbegin = `cygpath -w '
am__cpend = '`
or
am__cpbegin = '
am__cpend = '
but this is not really attractive.
A related question is why we need this `cygpath -w' stuff.
My understanding is that it is to turn special absolute
filenames such as /cygdrive/c/foo into c:\foo
(if this is true, then I think the first use of $(CYGPATH_W) in
the sub/foo.obj rule is superfluous, since the file is relative)
so that compiler that do not understand cygwin filename can work.
Couldn't this be folded into a compiler wrapper script?
--
Alexandre Duret-Lutz
- Re: automake -vs- huge projects, (continued)
- Re: automake -vs- huge projects, Tom Tromey, 2003/12/16
- Re: automake -vs- huge projects, Alexandre Duret-Lutz, 2003/12/17
- Re: automake -vs- huge projects, Tom Tromey, 2003/12/30
- mailing list archives (Was: Re: automake -vs- huge projects), Alexandre Duret-Lutz, 2003/12/30
- Re: mailing list archives (Was: Re: automake -vs- huge projects), Thomas Dickey, 2003/12/30
- Re: mailing list archives, Alexandre Duret-Lutz, 2003/12/30
- Message not available
- Re: automake -vs- huge projects (1st patch), Alexandre Duret-Lutz, 2003/12/27
- Re: automake -vs- huge projects (1st patch), Thomas Fitzsimmons, 2003/12/30
- Re: automake -vs- huge projects (1st patch), Alexandre Duret-Lutz, 2003/12/30
Re: automake -vs- huge projects, Ralf Corsepius, 2003/12/18
- Re: automake -vs- huge projects,
Alexandre Duret-Lutz <=