cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Type in Documentation..
Date Fri, 17 Dec 1999 00:34:22 GMT
[this is a re-send of a message that apparently didn't make it to the list.
 we try again.]

Brian Behlendorf <> writes:

> On Tue, 14 Dec 1999, Stefano Mazzocchi wrote:

> >                                                 Something like the
> > script that Jon and I wrote for last year.
> > Stuff like (pseudoscript):
> > 
> >  for project into project-list
> >   cvs update $(project)/xdocs
> >   if something changed
> >    ant generate-$(project)
> >   fi
> >  rof

I usually do this kind of thing with "make".  It's by far the easiest and
most reliable way to handle generated files that depend on other files that
depend on...

> I would much prefer to see something like this done pre-commit to the
> -site CVS module than afterwards.  For example, look how we generate the
> listing of mirrors - we have a flat text database that we edit, and then
> run a script to generate an index.html file.  When we edit the database,
> we run the script, then do a
>   cvs commit mirrors.txt index.html

This is interesting.  I've always kept derived files, the ones that "make"
generates, out of my CVS repositories.  But you're right, this makes
synchronization a lot easier: you can use "rsync -C" to skip the files that
aren't checked in.  The alternative is to drive the synchronization with
make (e.g. "make upload"), which is what I've always done in the past. 

> This, in my opinion, is a good design pattern to follow.

Not for everything, obviously; I wouldn't use it for executables.  But it
makes a certain amount of sense for HTML (and other) documents.

There _is_ a problem, though: you have to be really careful with CVS
keywords in order to keep keywords in the source files, which you might want
to preserve, from getting replaced by the corresponding information for the
derived file.  You don't want $Id: headings.xml,v1.35... suddenly
showing up as $Id: derived.html,v1.2...

Stephen R. Savitzky  <>  <>
Platform for Information Applications:      <>
Chief Software Scientist, Ricoh Silicon Valley, Inc. Calif. Research Center
 voice: 650.496.5710  front desk: 650.496.5700  fax: 650.854.8740 
  home: <> URL:

View raw message