On Sun, Apr 13, 2008 at 4:53 PM, Bruce Dubbs <[EMAIL PROTECTED]> wrote:
> Ken Moffat wrote:
> > On Tue, Apr 08, 2008 at 11:11:24AM -0700, Dan Nicholson wrote:
> >> 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.
> >>
> > Dan,
> >
> > Now that I've been bitten by this, I think it's a real PITA.
> >
> > Just pulled down what was the current book, and ran make before I
> > had a go at updating. Unsurprisingly, there were no issues (on
> > another book I've been bitten in the past). I then updated the
> > changelog and cups (newer security_fixes patch).
Sorry, I hadn't thought about that, but I think I have a good way that
works like Alexander suggested. Mesa uses something similar with
makedepend. Attached is the diff. Let me know if this seems sane (it
seems to be working for me in all the cases I can think of) and I'll
commit it. It finds files named '*.xml' or '*.xsl' outside of tmp and
.svn directories and adds them to a variable. The validxml target then
requires all the files named in the variable. I tested things out by
touching various files deep in the repo.
As for Bruce's comment, it is certainly accurate to remove tmp/. A
simpler thing to remember is that if you want to ensure that you
render, run `make clean' first. Hopefully, this patches fixes it so
that `make' will pick up all the any changes in the repo.
--
Dan
Property changes on: BOOK
___________________________________________________________________
Name: svn:ignore
- tmp
blfs-patches.sh
blfs-patch-list
+ tmp
blfs-patches.sh
blfs-patch-list
deps
Index: BOOK/Makefile
===================================================================
--- BOOK/Makefile (revision 7380)
+++ BOOK/Makefile (working copy)
@@ -23,6 +23,15 @@ blfs: html wget-list
all: blfs nochunks pdf
world: all blfs-patch-list dump-commands test-links
+deps:
+ $(Q)printf 'ALLDEPS =' > $@
+ $(Q)find . '(' -name tmp -o -name '.svn' ')' -prune \
+ -o -type f '(' -name '*.xml' -o -name '*.xsl' ')' \
+ -printf ' %P' >> $@
+ $(Q)echo >> $@
+
+-include deps
+
html: $(BASEDIR)/index.html
$(BASEDIR)/index.html: $(RENDERTMP)/blfs-html.xml
@echo "Generating chunked XHTML files..."
@@ -95,9 +104,10 @@ clean:
$(Q)rm -f $(RENDERTMP)/blfs-pdf.fo
$(Q)rm -f $(RENDERTMP)/blfs-{patch-list,patches}
$(Q)rmdir $(RENDERTMP) 2>/dev/null || :
+ $(Q)rm -f deps
validxml: $(RENDERTMP)/blfs-full.xml
-$(RENDERTMP)/blfs-full.xml: index.xml general.ent
+$(RENDERTMP)/blfs-full.xml: $(ALLDEPS) general.ent
@echo "Validating the book..."
$(Q)[ -d $(RENDERTMP) ] || mkdir -p $(RENDERTMP)
$(Q)xmllint --nonet --noent --xinclude --postvalid \
--
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page