Opened 18 years ago
Closed 18 years ago
#53 closed request (Fixed)
SVNREV variable in makefile
Reported by: | jprinehimer | Owned by: | arango |
---|---|---|---|
Priority: | trivial | Milestone: | Release ROMS/TOMS 3.1 |
Component: | Nonlinear | Version: | 3.1 |
Keywords: | makefile, svn, subversion | Cc: |
Description
Line 273 in the makefile has: SVNREV := $(shell svnversion -n .)
SVNREV should be set as a ?= so that the variable can be set in a build script in case the build computer doesn't have svn (e.g. you use one system for maintaining code and another for building/running code). The build doesn't fail the way it's set up now, but the errors about svnversion not being found are annoying.
Change History (2)
comment:1 by , 18 years ago
comment:2 by , 18 years ago
Resolution: | → Fixed |
---|---|
Status: | new → closed |
Well, I don't understand why a single line warning, out of hundreds send to standard output during compilation, is that annoying:
make: svnversion: Command not found
make does not fail if the svnversion program is not found. The makefile has additional coding to construct the SVNREV definition when svnrevision is not available. I consider this type of information very important! Notice that the ROMS svn revision is written to all output NetCDF files. This will allow the user to completely reproduce his/her results in the future.
Subversion does not provide a clear way to get the revision number of a project. The only tool available is the svnversion program.
The only way that your suggestion will work is to have:
setenv SVNREV
to no value in your build script. I accepted your suggestion but very reluctantly. User may set the environmental variable to some value and the makefile will fail building the correct svn revision string.
As an additional comment, I mean setting SVNREV as empty in a build script. The code on lines 323-328 then catches this and grep/seds the version from the text files.