Ethereal-dev: [Ethereal-dev] Proposal for enhancement of make-version.pl

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: "Olivier Biot" <ethereal@xxxxxxxxxx>
Date: Thu, 29 Jan 2004 22:43:15 +0100
Hi List,

Attached you'll find an "enhanced" make-version.pl file (which
generates the CVS timestamp). The "cvsversion.h" header now gets the
same modification time as the last modified CVS/Entries file, hence it
only changes if the CVS repository has changed.

Could someone tell me if every CVS "client" checked-out module uses a
CVS directory with an Entries file? If so, we may speed up the
(relatively slow) lookup of the Entries file as we only need to
inspect the "CVS" directories for an "Entries" file. The test would
then be:

if (-d "$dir/$d") {
    if (($d =~ /^CVS$/) && (-f "$dir/$d/Entries")) {
        push(@files, "$dir/$d/Entries");
    } else {
        # Recurse
    }
} # else: file (skipped)

There is however one caveat with the current approach: the make
process will not attempt at recreating the cvsversion.h file if it is
present, so you have two options:
1. remove the cvsversion.h header file manually after a cvs update (or
cvs commit)
2. run the make-version.pl script by hand after a cvs update (or cvs
commit)

Is it possible to add a rule to the Makefile which gets executed at
every run?

Regards,

Olivier

Attachment: make-version.pl.gz
Description: GNU Zip compressed data