Subject: Re: bug#7374: Automake bug when moving files to different directory

From: Ralf Wildenhues <[email-masked]>
Date: Thu, 11 Nov 2010 21:38:01 +0100

* Török Edwin wrote on Thu, Nov 11, 2010 at 09:10:56PM CET:
> On Thu, 11 Nov 2010 20:42:05 +0100 Ralf Wildenhues wrote:
> > * Török Edwin wrote on Thu, Nov 11, 2010 at 01:11:44PM CET:
> > > I think that:
> > >  - make clean should remove the dependency files if they're out of
> > >    date/wrong
> > 
> > That is unfortunately not possible, because make will barf if files
> > included from the Makefile are missing.  GNU make has '-include' for
> > this, but there is no equivalent of that for portable make.
> > 
> > This is the reason that config.status produces stub .Po files when
> > they are not present.
> 
> OK, then how about:
>  - make clean deletes .Po/.Plo files, and invokes config.status with
>    proper flags to produce the stub .Po files?
> 
> Having the old .Po files around after a make clean isn't going to help
> speed up the build anyway since all the obj files are gone.

True, but the above sounds quite ugly as well.

Here's a better suggestion: use the subdir-objects automake option (you
can add it to the options passed to AM_INIT_AUTOMAKE) and configure with
--enable-maintainer-mode.  That way the old .Po file will just not be
read any more, and the maintainer mode will trigger the automake rerun
that then causes the rules in Makefile to be successfully updated.

Hope that is good enough for you.

Cheers,
Ralf