From 9121501645e4c6b157dea20b70fb78ba314c4745 Mon Sep 17 00:00:00 2001 From: AG1LE Mauri Date: Fri, 13 Jun 2014 21:57:08 -0400 Subject: [PATCH] Added version tagging --- Makefile | 5 +++-- Makefile.am | 4 +++- Makefile.in | 5 +++-- README | 21 ++++++++++++++++++++- config.log | 1 + src/Makefile.am | 5 +++-- src/bmorse.cxx | 4 ++++ 7 files changed, 37 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 5a2f3e4..5076408 100644 --- a/Makefile +++ b/Makefile @@ -141,12 +141,12 @@ AWK = gawk BMORSE_AUTHORS = CC = gcc CCDEPMODE = depmode=gcc3 -CFLAGS = -Wall -pedantic +CFLAGS = -Wall -pedantic -DVERSION=\"$(GIT_VERSION)\" CPP = gcc -E CPPFLAGS = CXX = g++ CXXDEPMODE = depmode=gcc3 -CXXFLAGS = -g -O2 +CXXFLAGS = -DVERSION=\"$(GIT_VERSION)\" CYGPATH_W = echo DEFS = -DHAVE_CONFIG_H DEPDIR = .deps @@ -242,6 +242,7 @@ top_build_prefix = top_builddir = . top_srcdir = . SUBDIRS = src +GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/Makefile.am b/Makefile.am index 2642c2e..2a6f5f0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,5 +1,7 @@ SUBDIRS = src -CFLAGS= -Wall -pedantic +GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always) +CFLAGS= -Wall -pedantic -DVERSION=\"$(GIT_VERSION)\" +CXXFLAGS = -DVERSION=\"$(GIT_VERSION)\" #bin_PROGRAMS = bmorse diff --git a/Makefile.in b/Makefile.in index dbe42c9..836b620 100644 --- a/Makefile.in +++ b/Makefile.in @@ -141,12 +141,12 @@ AWK = @AWK@ BMORSE_AUTHORS = @BMORSE_AUTHORS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ -CFLAGS = -Wall -pedantic +CFLAGS = -Wall -pedantic -DVERSION=\"$(GIT_VERSION)\" CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ +CXXFLAGS = -DVERSION=\"$(GIT_VERSION)\" CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ @@ -242,6 +242,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src +GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive diff --git a/README b/README index 7b7a98a..336d199 100644 --- a/README +++ b/README @@ -44,18 +44,37 @@ MORSE - PROJECT IDEAS Model parameters Output - SER vs. SNR graphs + SER vs. SNR graphs DONE + - can be created using OpenOffice (LibreOffice Calc) + - plot for different filter widths (aka -spd parameter) + - run through different parameter values + -> automate CSV file generation + -> capture best values & corresponding software versions in database + < date> + + + SER vs. timing variations + - need to create morse.m version with timing variability functionality + - SER vs. speed variations + - need to create morse.m version with speed variability functionality + SER per character + - Misrecognition distribution (input chr vs. output chr) - i.e. A recognized as U + - confusion matrix + Symbol Error Rate (SER) - print recognized symbols ". - ~ ^ w p" - use Levenshtein distance calculation as error metric + - Path length vs. SNR + - Estimated speed vs. actual speed distribution + - diff --git a/config.log b/config.log index dfee68f..60c692a 100644 --- a/config.log +++ b/config.log @@ -400,6 +400,7 @@ on X301 config.status:882: creating Makefile config.status:882: creating src/Makefile config.status:882: creating config.h +config.status:1063: config.h is unchanged config.status:1111: executing depfiles commands ## ---------------- ## diff --git a/src/Makefile.am b/src/Makefile.am index adff822..277d704 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,6 +1,7 @@ - +GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always) bin_PROGRAMS = bmorse -FLAGS= -Wall -pedantic +CFLAGS= -Wall -pedantic -DVERSION=\"$(GIT_VERSION)\" +CXXFLAGS = -DVERSION=\"$(GIT_VERSION)\" #AM_CXXFLAGS = -I$(src) diff --git a/src/bmorse.cxx b/src/bmorse.cxx index 6fd1337..9c88814 100644 --- a/src/bmorse.cxx +++ b/src/bmorse.cxx @@ -726,6 +726,10 @@ int main(int argc, const char* argv[]) params.print_variables = TRUE; continue ; } + if (strcmp (argv [k], "-ver") == 0){ + printf("Version: %s\n", VERSION); + exit(0); + } if (strcmp (argv [k], "-sym") == 0){ params.print_symbols = TRUE; continue ;