automake
[Top][All Lists]
Advanced

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

Re: automake -vs- huge projects


From: Thomas Fitzsimmons
Subject: Re: automake -vs- huge projects
Date: Tue, 16 Dec 2003 15:01:14 -0500
User-agent: Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.)

On Tue, 16 Dec 2003 09:49:44 -0700, Tom Tromey wrote:

> Tom Fitzsimmons (CCd) has been working on upgrading libgcj to use
> newer auto* tools.  This has gone swimmingly, except one problem with
> automake.
> 
> A little background.  libgcj is pretty big.  It has 2,243 ".java"
> files at the moment.  Previously it has been using its own slightly
> hacked automake 1.4.  It used to use its own "%" rules to handle
> compiling .java (since 1.4 couldn't do this).  It is part of GCC,
> which recently decided as a project that requiring GNU make is ok.
> 
> 
> We have to use subdir-objects, both because nobody wants 2000 .o
> files in "." and because we have unavoidable basename clashes between
> .java files.
> 
> Also, we use a single top-level Makefile.am, as it is way more
> convenient.
> 
> 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.
> 

One specifc problem I noticed is that automake is generating three
explicit rules for each target.  For example, for one .java file, these
rules are generated:

java/awt/print/Pageable.o: java/awt/print/Pageable.java
@am__fastdepGCJ_TRUE@   if $(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS) -MT 
java/awt/print/Pageable.o -MD -MP -MF "java/awt/print/$(DEPDIR)/Pageable.Tpo" \
@am__fastdepGCJ_TRUE@     -c -o java/awt/print/Pageable.o `test -f 
'java/awt/print/Pageable.java' || echo 
'$(srcdir)/'`java/awt/print/Pageable.java; \
@am__fastdepGCJ_TRUE@   then mv -f "java/awt/print/$(DEPDIR)/Pageable.Tpo" 
"java/awt/print/$(DEPDIR)/Pageable.Po"; \
@am__fastdepGCJ_TRUE@   else rm -f "java/awt/print/$(DEPDIR)/Pageable.Tpo"; 
exit 1; \
@am__fastdepGCJ_TRUE@   fi
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      source='java/awt/print/Pageable.java' 
object='java/awt/print/Pageable.o' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      
depfile='java/awt/print/$(DEPDIR)/Pageable.Po' 
tmpdepfile='java/awt/print/$(DEPDIR)/Pageable.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      $(GCJDEPMODE) $(depcomp) 
@AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@  $(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS) -c -o 
java/awt/print/Pageable.o `test -f 'java/awt/print/Pageable.java' || echo 
'$(srcdir)/'`java/awt/print/Pageable.java

java/awt/print/Pageable.obj: java/awt/print/Pageable.java
@am__fastdepGCJ_TRUE@   if $(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS) -MT 
java/awt/print/Pageable.obj -MD -MP -MF "java/awt/print/$(DEPDIR)/Pageable.Tpo" 
\
@am__fastdepGCJ_TRUE@     -c -o java/awt/print/Pageable.obj `if test -f 
'java/awt/print/Pageable.java'; then $(CYGPATH_W) 
'java/awt/print/Pageable.java'; else $(CYGPATH_W) 
'$(srcdir)/java/awt/print/Pageable.java'; fi`; \
@am__fastdepGCJ_TRUE@   then mv -f "java/awt/print/$(DEPDIR)/Pageable.Tpo" 
"java/awt/print/$(DEPDIR)/Pageable.Po"; \
@am__fastdepGCJ_TRUE@   else rm -f "java/awt/print/$(DEPDIR)/Pageable.Tpo"; 
exit 1; \
@am__fastdepGCJ_TRUE@   fi
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      source='java/awt/print/Pageable.java' 
object='java/awt/print/Pageable.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      
depfile='java/awt/print/$(DEPDIR)/Pageable.Po' 
tmpdepfile='java/awt/print/$(DEPDIR)/Pageable.TPo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      $(GCJDEPMODE) $(depcomp) 
@AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@  $(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS) -c -o 
java/awt/print/Pageable.obj `if test -f 'java/awt/print/Pageable.java'; then 
$(CYGPATH_W) 'java/awt/print/Pageable.java'; else $(CYGPATH_W) 
'$(srcdir)/java/awt/print/Pageable.java'; fi`

java/awt/print/Pageable.lo: java/awt/print/Pageable.java
@am__fastdepGCJ_TRUE@   if $(LIBTOOL) --mode=compile $(GCJ) $(AM_GCJFLAGS) 
$(GCJFLAGS) -MT java/awt/print/Pageable.lo -MD -MP -MF 
"java/awt/print/$(DEPDIR)/Pageable.Tpo" \
@am__fastdepGCJ_TRUE@     -c -o java/awt/print/Pageable.lo `test -f 
'java/awt/print/Pageable.java' || echo 
'$(srcdir)/'`java/awt/print/Pageable.java; \
@am__fastdepGCJ_TRUE@   then mv -f "java/awt/print/$(DEPDIR)/Pageable.Tpo" 
"java/awt/print/$(DEPDIR)/Pageable.Plo"; \
@am__fastdepGCJ_TRUE@   else rm -f "java/awt/print/$(DEPDIR)/Pageable.Tpo"; 
exit 1; \
@am__fastdepGCJ_TRUE@   fi
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      source='java/awt/print/Pageable.java' 
object='java/awt/print/Pageable.lo' libtool=yes @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      
depfile='java/awt/print/$(DEPDIR)/Pageable.Plo' 
tmpdepfile='java/awt/print/$(DEPDIR)/Pageable.TPlo' @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepGCJ_FALSE@      $(GCJDEPMODE) $(depcomp) 
@AMDEPBACKSLASH@
@am__fastdepGCJ_FALSE@  $(LIBTOOL) --mode=compile $(GCJ) $(AM_GCJFLAGS) 
$(GCJFLAGS) -c -o java/awt/print/Pageable.lo `test -f 
'java/awt/print/Pageable.java' || echo '$(srcdir)/'`java/awt/print/Pageable.java

I would only expect rules for .lo files, since we are generating libtool
libraries.  Getting rid of the other targets would cut out *a lot* of the
bulk.

Tom






reply via email to

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