automake
[Top][All Lists]
Advanced

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

Re: Timestamp or dependency problem with automake


From: Ralf Wildenhues
Subject: Re: Timestamp or dependency problem with automake
Date: Thu, 16 Feb 2006 21:42:31 +0100
User-agent: Mutt/1.5.9i

Hi Steve,

* Steve Kreyer wrote on Thu, Feb 16, 2006 at 08:57:32PM CET:
> Ralf Wildenhues schrieb:
> 
> >Did configure enable dependency tracking?  If yes, which type? 
> >
> Ok that was it.
> I did not invoke automake with the -i option, so automatic
> dependency tracking was enabled :)

Well.  Dependency tracking is very useful; it should be enabled for
developing.  Still, it should _not_ cause unnecessary rebuilds.

> But one question arise:
> Even if auto dependency tracking was enabled, i did not
> modify any header which is included in my sources, 
> so Iam wondering why make compile this files?

Exactly.

In the other mail, you wrote:

* Steve Kreyer wrote on Thu, Feb 16, 2006 at 01:43:24PM CET:
> 
> Makefile.am in top_srcdir:
> -------------------------------------------------------------
> EXTRA_DIST = ${top_srcdir}/idl\
>    ${top_srcdir}/include\
>    ${top_srcdir}/include/tidy\
>    ${top_srcdir}/include/regex\
>    ${top_srcdir}/generatePack.sh\
>    ${top_srcdir}/generateTempl.sh\
>    ${top_srcdir}/win32\
>    ${top_srcdir}/../chrome\

I think pointing outside the build tree like this is a hack that can
break.  Not sure though, but I would not rely on that to work.

*snip*
> SUBDIRS = src
> .PHONY: idl
> idl:
>       for i in `ls ${top_srcdir}/idl/*.idl | awk -F '/' '{ print $$3}'`; do \
>               ${xpidlbin} -m header -I ${GECKO_PATH}/idl -I ${top_srcdir}/idl 
> -o ${top_srcdir}/include/$${i: 0: `expr length $$i` - 4} 
> ${top_srcdir}/idl/$$i; ${xpidlbin} -m typelib -I ${GECKO_PATH}/idl -I 
> ${top_srcdir}/idl -o ${top_srcdir}/include/$${i: 0: `expr length $$i` - 4} 
> ${top_srcdir}/idl/$$i;done
>               
> .PHONY: templates
> templates:
>       ${top_srcdir}/generateTempl.sh

The two rules above look strange.  I don't know what the idl one does,
but declaring both phony will make them be executed whenever they are
listed as prerequisites.  Do they touch any headers that are included by
the source files?

> all-local:
>       make idl
>       make plugin

This rule deserves several comments:
- The `idl' target is rebuilt every time.  Why?
- calling plain `make' is not a good idea (your users may need to use
  `gmake' because the native make is very limited, or parallel make).
  Always use $(MAKE), maybe together with $(AM_MAKEFLAGS).
- In this case, however, would it not be easiest to just do
    all-local: idl plugin

  with no further rules?
  

> .PHONY: clean-local
> .PHONY: all-local
> .PHONY: dist-hook

These lines (reordered) are unnecessary.  Automake takes care of this.

> > or a reduced test case that still exposes
> > this.  Which make implementation and version?  
> GNU make version 3.81 beta

Does the same happen with a released version of GNU make, for example
3.80?

> > Did configure enable dependency tracking?  If yes, which
> > type?
> nope

That is very weird.  Automake should detect gcc3 depmode and use it,
unless you turned off dependency tracking at either automake time (-i)
or at configure time (--disable-dependency-tracking).

I don't know how to remote-debug depcomp issues, so I don't know good
questions to ask.  I find it difficult enough to do when sitting right
in front of it.

> > Which compiler was used?
> g++ version 3.3.6 and g++ version 4.0.0 with both compiler versions the same 
> result...


> > Maybe you can debug the second `make' call and find out why it thinks
> > rebuilding is necessary (many make implementations have flags to output
> > debug information)?
> Thats a good idea i will try it in the evening and then report you the
> results...

This seems to me still one of the best possibilities, if none of the
questions above helped.

Cheers,
Ralf




reply via email to

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