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   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

_______________________________________________
M4-patches mailing list
M4-patches@gnu.org
http://lists.gnu.org/mailman/listinfo/m4-patches

Reply via email to