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: "Olivier Biot" <ethereal@xxxxxxxxxx>
Date: Fri, 30 Jan 2004 21:37:47 +0100
Hi List,

I finalized the new (faster) version of make-version.pl. It scans for
directories named CVS and looks for files named Entries herein. It
will only scan the most recent of these files, and define the CVS
version accordingly.

I however did not find a single clue on how to execute code in a
Makefile at every invoke of make.

One remark: a CVS snapshot really is identical to any checked out CVS
module "ethereal", so I removed the check for a file named
"cvsversion" as this would never work.

If there are no objections, I'll check it in.

Regards,

Olivier

----- Original Message ----- 
From: "Biot Olivier"

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

_______________________________________________
Ethereal-dev mailing list
Ethereal-dev@xxxxxxxxxxxx
http://www.ethereal.com/mailman/listinfo/ethereal-dev

Attachment: cvs.diff.gz
Description: GNU Zip compressed data