help-make
[Top][All Lists]
Advanced

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

RE: Why are circular rules not supported


From: Olivier Cailloux
Subject: RE: Why are circular rules not supported
Date: Tue, 29 Nov 2005 18:00:06 +0100

Hi Dave,

> I think that what's really going on here (in the DVI/PS/PDF example)
> is that you have dvi generated ps, and you have pdf generated ps.
> 
> I think that it's a mistake for these two different types of generated
> files to have exactly the same directory/name.

I'm thinking of a different way to use make: as a "generic" tool to convert
anything to anything, not in a specific projet, but in everyday use. I build
thus a "generic" makefile, including instructions about how to convert
anything to anything. For example, currently on my linux box, I may type "mm
foo.html" in a directory where a "foo.sxw" document exists. Then the alias
"mm" will call "make --makefile=..." (my generic makefile), which knows how
to convert an OpenOffice document in HTML (in this case, by calling an OOo
macro).

That use of make is a different use than the maybe more classical use
"within a specific project", where one knows when designing the makefile
what possible goals will be asked. In my generic makefile, I'd like my
makefile to accept as much possible goals as possible, and, when asked to
produce something, search among the defined rules if it knows how to produce
it using anything existing in the folder where I am currently, then do it.

> 
> If I were to create the DVI file, then create the PS, then create the
> PDF, edit the DVI and then generate the PS from the PDF, you're now in
> a situation where your PS file is out of date but there's no way for
> make to know it.

Indeed, we can think of strange things happening with such generic
makefiles. But we can also think of strange things happening with normal
makefiles (I mean, makefiles used more classically, in the specific context
of a project). When the user do strange things, the program he is using also
behaves strangely. That's normal.

If I want a PDF and I'm working with a DVI file (suppose I'm doing some
LaTeX), then I'll always compile the same way (e.g., DVI to PS to PDF). I
have to be consistent with myself. If ever I change my mind and decide to
produce the pdf first (PDFLATEX then PDF2PS), then it's not difficult to do
an erase before recompiling, to ensure make does not miss my point.

What I mean is that my "generic" use of the make tool is not always optimal
in every circumstance. When I do something in the context of a specific
project, I create a special makefile for that project. That would solve the
PS-PDF out-of-synch problem (well in fact it would not solve it, but it
would force me to use always the same sequence to compile because only that
one would have been encoded in the makefile, thus the problem would be
avoided).

Anyway, for an everyday use, I think that a generic use of make can provide
very useful services.

Waiting for reactions...

Olivier





reply via email to

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