On 2013-03-13 23:03, Raphaël Beamonte wrote: > Signed-off-by: Raphaël Beamonte <[email protected]> > --- > include/Makefile.am | 20 +++++++++++++++++++- > include/lttng/version.h | 25 +++++++++++++++++++++++++ > src/bin/lttng-sessiond/main.c | 5 +++++ > src/bin/lttng/commands/version.c | 4 ++++ > src/bin/lttng/lttng.c | 7 ++++++- > 5 files changed, 59 insertions(+), 2 deletions(-) > create mode 100644 include/lttng/version.h
Ok, this is a new try. This one uses shell script in the Makefile of the include directory to verify and change (only if necessary) the value of the GIT_VERSION define. It allows the sessiond/main.c, commands/version.c and lttng.c files to be the only one to need re-compilation for versioning when the git version changes. I thought at first to put the content of the shell script in a version.sh file that would be called, but I wasn't sure the idea of calling an external shell script at make would be better that directly put the operations in the makefile. One thing I'm not sure about is that currently, the version.h needs to be versioned but perhaps should be in the .gitignore file to only save the "original" version file in the repository. There could be another solution if you think it's better : generating the version.h file with the bash script at first run. In this case, I think the version.sh shell script should perhaps be a better solution.
signature.asc
Description: OpenPGP digital signature
_______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
