[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Make cvs ignore some changes in files

From: Frederic Brehm
Subject: RE: Make cvs ignore some changes in files
Date: Thu, 22 Aug 2002 09:18:54 -0400

> From: Christian Andersson [mailto:address@hidden
> the problem I have is that these files often gets generated
> when there is nothing changed to them (it is part of some compilation
> sections) what happens is that I get new generated files that
> has only
> one difference, a remark in the file telling when it was generated..

From: Riechers, Matthew W
Again, why does something generated by a build need to be revision

The generated files don't need to be revision controlled, but they need to be available to people or tools who cannot run the tool that generates the files. The most convenient way to make the files available is to put them into the repository alongside the other files that are also needed. The side effect of this is that the files become revision controlled.

I have a similar need where a tool from a real-time OS vendor generates a makefile that has embedded path information. Compiling and linking don't require the tool if the makefile is available, but the path information has to be adjusted if the base directory is different. The vendor tool (a project builder GUI) does not work well in an automated build script. Therefore, the automated build scripts that I use for creating a release requires the generated makefile, but appropriately modified.

My solution was to write a simple program (sed did the job well) that changed the generated makefile into a canonical form. I store the canonical form in the repository under a different name: Makefile.cache.

The build procedure manages the local makefile.

 - If the local makefile does not exist, then the build procedure
   creates it from Makefile.cache and updates the date of the local
   copy of Makefile.cache (with touch).

- If the local makefile has changed (test that it is newer than
  Makefile.cache), then the procedure creates the canonical form
  and compares it to Makefile.cache (with cmp).

--- If the two files are the same then the date of the local copy
    of Makefile.cache is updated (with touch).

--- If these are different, then Makefile.cache is replaced with
    the new version. The next cvs commit will commit the new
    Makefile.cache along with any new or changed source files.


Fred Brehm, Sarnoff Corporation, address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]