r7358 - trunk/BOOK
dbn.lists at gmail.com
Tue Apr 8 11:11:24 PDT 2008
On Tue, Apr 8, 2008 at 10:32 AM, <dnicholson at linuxfromscratch.org> wrote:
> Make Makefile timestamp based and add clean target
> This helps ensure that targets are not needlessly rerun (like validxml)
> unless something has been updated. It also means that parallel jobs work
> and are safe.
A little bit more explanation about this change.
Currently, every time you run `make', the validxml target will be run,
creating $(RENDERTMP)/blfs-full.xml. This is a very lengthy procedure,
and doesn't need to happen unless the book source has been updated.
The reason this happens is because make has no way to know that the
target is up to date. With this change, the target is
$(RENDERTMP)/blfs-full.xml, so make will know if it is up to date by
its timestamp. This is how make is supposed to work, and it means
running successive `make's means this step will be skipped.
I updated the other targets to take the same approach. I.e., the
wget-list will not be updated if it exists with a newer timestamp than
its prerequisite, blfs-full.xml. In turn, blfs-full.xml will not be
updated unless index.xml or general.ent have newer timestamps.
The drawback is that make will not notice if you've updated something
besides index.xml or general.ent in the source. To force your target
to be rebuilt, run `make clean' first. Alternatively, touch index.xml
or general.ent to update their timestamps. I think this is a fair
trade off for the amount of time spent watching "Validating the
book..." when you already have a properly validated blfs-full.xml.
More information about the blfs-dev