CVS, dates, and versions
Ben Pfaff
pfaffben@msu.edu
01 Aug 2001 11:01:33 -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.
--
"Let others praise ancient times; I am glad I was born in these."
--Ovid (43 BC-18 AD)