made version available in headers
Stefan Schuermans

Stefan Schuermans commited on 2011-09-10 17:02:08
Showing 8 changed files, with 26 additions and 5 deletions.

... ...
@@ -0,0 +1,8 @@
1
+*.o
2
+BlinkenConv
3
+BlinkenOutput
4
+BlinkenRecv
5
+BlinkenSend
6
+libBlinkenLib.a
7
+libBlinkenLib.so*
8
+config.h
... ...
@@ -125,10 +125,12 @@ int main( int argCnt, char * * args )
125 125
 
126 126
   //print info
127 127
   printf( "BlinkenLib - BlinkenConv\n"
128
+          "version %d.%d.%d\n"
128 129
           "config "BLINKENLIB_CONFIG"\n"
129 130
           "Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n"
130 131
           "Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n"
131
-          "a blinkenarea.org project\n\n" );
132
+          "a blinkenarea.org project\n\n",
133
+          BLINKENLIB_VERSION_MAJOR, BLINKENLIB_VERSION_MINOR, BLINKENLIB_VERSION_REVISION );
132 134
 
133 135
   //print syntax
134 136
   if( argCnt <= 1 )
... ...
@@ -422,10 +422,12 @@ int main( int argCnt, char * * args )
422 422
 
423 423
   //print info
424 424
   printf( "BlinkenLib - BlinkenOutput\n"
425
+          "version %d.%d.%d\n"
425 426
           "config "BLINKENLIB_CONFIG"\n"
426 427
           "Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n"
427 428
           "Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n"
428
-          "a blinkenarea.org project\n\n" );
429
+          "a blinkenarea.org project\n\n",
430
+          BLINKENLIB_VERSION_MAJOR, BLINKENLIB_VERSION_MINOR, BLINKENLIB_VERSION_REVISION );
429 431
 
430 432
   //print syntax
431 433
   if( argCnt <= 1 )
... ...
@@ -31,10 +31,12 @@ int main( int argCnt, char * * args )
31 31
 
32 32
   //print info
33 33
   printf( "BlinkenLib - BlinkenRecv\n"
34
+          "version %d.%d.%d\n"
34 35
           "config "BLINKENLIB_CONFIG"\n"
35 36
           "Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n"
36 37
           "Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n"
37
-          "a blinkenarea.org project\n\n" );
38
+          "a blinkenarea.org project\n\n",
39
+          BLINKENLIB_VERSION_MAJOR, BLINKENLIB_VERSION_MINOR, BLINKENLIB_VERSION_REVISION );
38 40
 
39 41
   //print syntax
40 42
   if( argCnt <= 1 )
... ...
@@ -34,10 +34,12 @@ int main( int argCnt, char * * args )
34 34
 
35 35
   //print info
36 36
   printf( "BlinkenLib - BlinkenSend\n"
37
+          "version %d.%d.%d\n"
37 38
           "config "BLINKENLIB_CONFIG"\n"
38 39
           "Copyright 2004-2011 Stefan Schuermans <stefan@blinkenarea.org>\n"
39 40
           "Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html\n"
40
-          "a blinkenarea.org project\n\n" );
41
+          "a blinkenarea.org project\n\n",
42
+          BLINKENLIB_VERSION_MAJOR, BLINKENLIB_VERSION_MINOR, BLINKENLIB_VERSION_REVISION );
41 43
 
42 44
   //print syntax
43 45
   if( argCnt <= 1 )
... ...
@@ -2,6 +2,7 @@
2 2
 ----------------
3 3
 some Makefile fixes for MAC OS X
4 4
 removed version information from source files (not needed 'cause of git)
5
+made version available in headers
5 6
 
6 7
 0.6.5 2011-04-26
7 8
 ----------------
... ...
@@ -0,0 +1,3 @@
1
+*.cfg
2
+config.mk
3
+config.h
... ...
@@ -26,11 +26,12 @@ config.cfg: osx.cfg mng.cfg
26 26
 config.mk: config.cfg
27 27
 	sed 's/^\([A-Z]*\)=\([01]\)$$/BLINKENLIB_CFG_\1=\2/' <$< >$@
28 28
 
29
-config.h: config.cfg
29
+config.h: config.cfg Makefile ../Makefile
30 30
 	sed 's/^\([A-Z]*\)=0$$/#undef BLINKENLIB_CFG_\1/;s/^\([A-Z]*\)=1$$/#define BLINKENLIB_CFG_\1/' <$< >$@
31 31
 	echo '#define BLINKENLIB_CONFIG "' | tr -d '\n' >>$@
32 32
 	sed 's/^\([A-Z]*\)=0$$/\1-/;s/^\([A-Z]*\)=1$$/\1+/' <$< | tr '\n' ' ' | sed 's/ *$$//' | tr -d '\n' >>$@
33 33
 	echo '"' >>$@
34
+	grep '^VERSION_[A-Z]*=[0-9]*' ../Makefile | sed 's/^/#define BLINKENLIB_/;s/=/ /' >>$@
34 35
 
35 36
 clean:
36 37
 	rm -f *.cfg config.mk config.h
37 38