m4-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Support for GNU make dependency generation


From: Eric Blake
Subject: Re: [PATCH] Support for GNU make dependency generation
Date: Tue, 26 Oct 2010 07:56:46 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.9) Gecko/20100921 Fedora/3.1.4-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.4

On 10/26/2010 07:41 AM, David M. Warme wrote:
2. By creating both the dependency file and the actual m4 target
    file in one step, you wind up being in danger of "circular
    dependencies" -- running make twice in a row causes stuff to
    be remade the second time.  In certain cases, even an endless
    succession of "make" invocations causes stuff to get remade
    every time.  Single commands that update two or more targets
    at once are the usual cause of this behavior.  The fix is to
    have two separate rules in your Makefile:

I'm reluctant to have to require to run m4 twice per file. Dependencies as a side effect of compilation is the most efficient way to generate dependencies, and running twice defeats this. There's a reason that automake prefers to generate dependencies during compilation, and if automake can write portable makefiles with gcc dependencies generated during compilation, then I see no reason why m4 can't be hooked up to do the same.

--
Eric Blake   address@hidden    +1-801-349-2682
Libvirt virtualization library http://libvirt.org



reply via email to

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