02-29-2012, 06:03 AM
Not exactly what I had in mind, but close enough.
I can't do a similar thing for windows, so instead I need the svnversion or whatever tool to process a file, WCVersion.h, that only contains the SVN revision number defined as a macro. On Windows, I can make that file a .template and it will be automagically processed into the correct header by subwcrev; I'm looking for a similar way in *nix. Thus:
WCVersion.h.template contents:
#define WCREV $WCREV$
From that, subwcrev generates WCVersion.h:
#define WCREV 340
Whichever file in the project needs the revision number, just does an #include "WCVersion.h"
Can this be done easily on *nix?
I can't do a similar thing for windows, so instead I need the svnversion or whatever tool to process a file, WCVersion.h, that only contains the SVN revision number defined as a macro. On Windows, I can make that file a .template and it will be automagically processed into the correct header by subwcrev; I'm looking for a similar way in *nix. Thus:
WCVersion.h.template contents:
#define WCREV $WCREV$
From that, subwcrev generates WCVersion.h:
#define WCREV 340
Whichever file in the project needs the revision number, just does an #include "WCVersion.h"
Can this be done easily on *nix?