[Top][All Lists]

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

Re: Pre-including a generated file

From: Leandro Lucarella
Subject: Re: Pre-including a generated file
Date: Wed, 12 Aug 2009 14:21:03 -0300
User-agent: mutt-ng/devel-r804 (Debian)

John Calcote, el 12 de agosto a las 09:28 me escribiste:
> >This usually works with "automatic dependencies", so I guess there should
> >be any way to get arround, but I tried and tried and came up with nothing.
> >   
> First, you'll probably want to use sinclude, rather than include, as
> include will fail the build if the file is missing, which it will be the
> first time around. The way make works is to read the makefile, including
> whatever it's told to, new, old, or non-existent. Then it follows the
> rules to update these files.  Any targets with the makefile as
> a dependency are updated first. If any of them must be rebuilt, then
> make rebuilds them (or executes the commands for those rules) and then
> -- and here's the magic -- it restarts the whole make process again.
> - - - - - - - - - - - -
> file:
>         ./gen_file
> Makefile: file
> sinclude file
> - - - - - - - - - - - -
> Don't use .PHONY on file. It's a real file, so you should tell make it's
> not, as it will get confused.

Thanks for the advice.

I need to use .PHONY though, because the script should be executed always.
If I don't, make call the ./gen_file just the first time, and then it
never gets outdated in successive make calls.

I still can't find a way to do it, so any other ideas are welcome.

Leandro Lucarella (luca) | Blog colectivo:
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
        -- Crónica TV

reply via email to

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