[Top][All Lists]

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

Removing dependencies

From: Bill Moseley
Subject: Removing dependencies
Date: Fri, 4 Apr 2003 15:48:04 -0800 (PST)

I generate HTML docs from other source files.  I have a single program
"build" that knows how to generate the docs.  So all I need to do is
detect that any one HTML file is out of date and run "build"

This is suppose to build the HTML docs when out of date, and install the
HTML docs.

Here's the

html_DATA = \
        CHANGES.html \
        INSTALL.html \
        README.html \

image_DATA = \
        images/dotrule1.png \

depends = \
        $(pod_dir)/CHANGES.pod \
        $(pod_dir)/INSTALL.pod \
        $(pod_dir)/README.pod \

all: .html-stamp

.html-stamp: $(version_file) $(depends)
        cd $(srcdir)/../doc && bin/build
        @touch $(srcdir)/.html-stamp

EXTRA_DIST = $(html_DATA) $(image_DATA) .html-stamp

This works fine, but if the HTML docs do not exist (such as from a CVS
checkout) then Make dies because there's no target for .html.

  make: Fatal error: Don't know how to make target `CHANGES.html'

I tried something like:

$(html_DATA): .html-stamp

but that's a circular dependency, plus it ends up running "build" for
every document instead of just once.

Is there a solution?

I want "build" to run one time if any $(depends) files are newer than the
timestamp, OR if any .html files (or the timestamp) file is missing.

Bill Moseley address@hidden

reply via email to

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