CVS, dates, and versions
Edward Glowacki
glowack2@msu.edu
Wed, 1 Aug 2001 11:12:21 -0400
Quoted from Ben Pfaff on Wed, Aug 01, 2001 at 11:01:33AM -0400:
> Edward Glowacki <glowack2@msu.edu> writes:
>
> > OK, I have some documentation spread across several different files
> > something like this:
> >
> > Header information (contained in file0)
> > #include file1
> > #include file2
> > #include file3
> > Footer info
> >
> > I'm using CVS to keep track of changes, and I'd like the header
> > information to include the date when the document was last modified.
> > I've used $Date: $ in the header, except that only works when the
> > *header* file is modified, not when its children are. I suppose
> > I could write a wrapper for "cvs ci" that modifies the header, (or
> > updates an #included file called "version" or something), but that
> > seems like the "wrong way" to do it... Any "smarter" ideas on how
> > I could do this "automatically"?
>
> Use a makefile? Something like this:
> version: file0 file1 file2 file3
> date > version
> Then you can just do `make; cvs ci' and version will be updated
> whenever file0 or any of its include files changes.
Yeah, I probably should move to a makefile (using a script to
generate different forms of output right now). Could add
something like:
update:
make version
cvs ci
make output # HTML, PS, etc.
Then I could take care of most everything with "make update".
*sigh* Guess it's about time to convert my script to a Makefile...
--
Edward Glowacki glowack2@msu.edu
GLLUG Peon http://www.gllug.org
Imagination is the one weapon in the war against reality.
-- Jules de Gaultier