Ethereal-dev: RE: [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: Biot Olivier <Olivier.Biot@xxxxxxxxxxx>
Date: Fri, 30 Jan 2004 11:18:51 +0100
Hi list,

A quick test shows that selectively scanning for CVS directories first runs
already 3 times faster on my machine.

Would it be acceptable to scan only the last modified CVS/Entries file for
computing the CVS timestamp? This would significantly increase the
performance.

Additional item: *how* do I ask a Makefile to run a given command whenever I
invoke make?

I'll post an unified diff when the changes are stable.

Regards,

Olivier

| -----Original Message-----
| From: Joerg Mayer
| 
| On Thu, Jan 29, 2004 at 10:43:15PM +0100, Olivier Biot wrote:
| > 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.
| 
| I don't see a real difference to what happens now: The file will only
| be written if one of the following conditions is met:
| a) file doesn't exist
| b) file exists but is different from the newly computed value
| 
| Please explain this a bit more.

That's correct; however I'd like to run the make-version.pl script at every
invoke of make s
| 
| > if (-d "$dir/$d") {
| >     if (($d =~ /^CVS$/) && (-f "$dir/$d/Entries")) {
| >         push(@files, "$dir/$d/Entries");
| >     } else {
| >         # Recurse
| >     }
| > } # else: file (skipped)
| 
| Looks good.
| 
| > Is it possible to add a rule to the Makefile which gets executed at
| > every run?
| 
| I thought that this had been done. If not, please do so.
| 
|   Ciao
|                  Jörg
| 
| PS: My laptop died so I'll need to get myself a laptop to normal ide
| plug adapter. Until that is done, I probably won't do much work on
| Ethereal.
| PPS: Please send diffs, it really helps me to see what changed.
| -- 
| Joerg Mayer