r7358 - trunk/BOOK

Dan Nicholson dbn.lists at gmail.com
Sun Apr 13 21:15:36 PDT 2008


On Sun, Apr 13, 2008 at 8:21 PM, Alexander E. Patrakov
<patrakov at gmail.com> wrote:
> Dan Nicholson wrote:
>
>  > 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.
>
>  Try the following scenario:
>
>  1) Editor B checks out the book from SVN and renders it, thus creating the
>  "deps" file.
>  2) Editor A adds the package Foo, a changelog entry, and commits.
>  3) Editor B does "svn up" and renders the book.
>  4) Editor A fixes a small typo on the Foo page without altering the changelog,
>  and commits
>  5) Editor B does "svn up" and renders the book.
>
>  Will editor B pick up the typo fix in his rendered book after step 5?

Yes. Since the foo page is */*/foo.xml (included by the find command),
make will find that one of the prerequisites for blfs-full.xml is
newer causing a chain of rebuilding. So long as `svn up' updates the
timestamps for the files, which it does. This is the find command,
which should pick up all the necessary components of rendering (I
think):

find . '(' -name tmp -o -name '.svn' ')' -prune \
          -o -type f '(' -name '*.xml' -o -name '*.xsl' ')' \
          -printf ' %P' >> $@

--
Dan



More information about the blfs-dev mailing list