This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: re-re-re-re-configuring


On Fri, Dec 06, 2002 at 01:50:03PM -0500, DJ Delorie wrote:
> 
> > So who broke the make dependencies such that we 
> > re-run configure *every* time you type "make"?
> 
> I debugged this, and the dependencies look right, almost (sigh).
> Basically, it boils down to this:
> 
> .PHONY: configure-libiberty maybe-configure-libiberty
> maybe-configure-libiberty:
> configure-libiberty: libiberty/Makefile
> 
>     Considering target file `all-libiberty'.
>      File `all-libiberty' does not exist.
>       Considering target file `configure-libiberty'.
>        File `configure-libiberty' does not exist.
>         Considering target file `libiberty/Makefile'.
>           Pruning file `config.status'.
>           Pruning file `intl/Makefile'.
>          Finished prerequisites of target file `libiberty/Makefile'.
>          Prerequisite `config.status' is older than target `libiberty/Makefile'.
>          Prerequisite `intl/Makefile' is older than target `libiberty/Makefile'.
>         No need to remake target `libiberty/Makefile'.
>        Finished prerequisites of target file `configure-libiberty'.
>       Must remake target `configure-libiberty'.
>       Successfully remade target file `configure-libiberty'.
>      Finished prerequisites of target file `all-libiberty'.
>     Must remake target `all-libiberty'.
> 
> So, even though configure-libiberty is .PHONY and its prereqs are OK,
> it gets "rebuilt" anyway.  Consequently...

How odd.  Here's why.  From the manual:

   A phony target should not be a prerequisite of a real target file;
if it is, its commands are run every time `make' goes to update that
file.  As long as a phony target is never a prerequisite of a real
target, the phony target commands will be executed only when the phony
target is a specified goal (*note Arguments to Specify the Goals:
Goals.).


-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]