help-make
[Top][All Lists]
Advanced

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

Why are circular rules not supported


From: Olivier Cailloux
Subject: Why are circular rules not supported
Date: Mon, 21 Nov 2005 14:52:31 +0100

Hello,

I'm wondering why circular rules are not supported?

It seems to me that they are harmless and usefull is some specific
situation. For example, imagine a makefile with these three rules:

foo.pdf: foo.ps
        (some rules to create a pdf from a ps file)

foo.ps: foo.pdf
        (some rules to create a ps from a pdf file)

foo.ps: foo.dvi
        (some rules to create a ps from a dvi file)

Currently, it seems to me that make always complains about the circular
rule, even when there is some way to avoid the recursiveness.

Imagine that I execute "make foo.pdf" from a folder where a file "foo.dvi"
exists. Then, there is only one reasonable way to create foo.pdf.

I think that make should not break the (potentially) circular rules BEFORE
seeing what command I asked and what files are available. It should complain
only when it can't find a non recursive way to create the target I ask on
the command line (or some intermediate target or pre-requisite naturally).

Then I would be able to create a pdf from a ps where a ps is immediately
available, or use the power of the make system to create it for me when it
is possible (from a dvi or from whatever you can imagine, the makefile could
be much bigger), or even create a ps from a pdf where a pdf is available or
can be created (that is not shown in the example, but some rules could allow
creating a pdf from, e.g., a .tex file using pdflatex).

The question is: is there some way to do it, or if not, is there a
fundamental reason (other than - not implemented yet) why make does not
manage circular rules?

Thank you,

Olivier Cailloux
Chercheur
Service de Mathématiques de la Gestion
Université Libre de Bruxelles
Boulevard du Triomphe, CP 210-01
1050 Bruxelles, Belgium
Tél. : +32 2 650 59 56
Fax : +32 2 650 59 70





reply via email to

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