[Flightgear-devel] simgear version number now a string

2009-12-14 Thread Csaba Halász
The recent change which makes a string from the simgear version breaks
FG configure.
I don't think introducing an incompatible change to the version macro
is a good idea.
Erik, can you explain why you made the change? I am aware that FG's
own version is a string, so I am guessing that might have been the
reason.

-- 
Cheers,
Csaba/Jester

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] simgear version number now a string

2009-12-14 Thread Erik Hofman
Csaba Halász wrote:
 The recent change which makes a string from the simgear version breaks
 FG configure.
 I don't think introducing an incompatible change to the version macro
 is a good idea.
 Erik, can you explain why you made the change? I am aware that FG's
 own version is a string, so I am guessing that might have been the
 reason.
   

It was part of a patch to provide better version information when 
running fgfs --version
I did check if it was breaking compilation of simgear. I must admit I 
didn't test running configure.

Erik


--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] simgear version number now a string

2009-12-14 Thread John Denker
On 12/14/2009 10:30 AM, Erik Hofman wrote:
 Csaba Halász wrote:
 The recent change which makes a string from the simgear version breaks
 FG configure.
 I don't think introducing an incompatible change to the version macro
 is a good idea.
 Erik, can you explain why you made the change? I am aware that FG's
 own version is a string, so I am guessing that might have been the
 reason.
 
 It was part of a patch to provide better version information when 
 running fgfs --version
 I did check if it was breaking compilation of simgear. I must admit I 
 didn't test running configure.

I tested it. It works fine chez moi.
  make clean ; ./configure --lots-of-options ; make

Can somebody say in more detail what the problem is?
I can't even find anywhere it is used within simgear.

The rationale for quoting it (and the corresponding
FG version string) is simple:  It is hard to do anything 
with the version identifier unless it is treated as a 
string.  It's not really a version number since it 
is not a number.

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] simgear version number now a string

2009-12-14 Thread Csaba Halász
On Mon, Dec 14, 2009 at 6:54 PM, John Denker j...@av8n.com wrote:

 I tested it. It works fine chez moi.
  make clean ; ./configure --lots-of-options ; make

 Can somebody say in more detail what the problem is?
 I can't even find anywhere it is used within simgear.

It is used in the *flightgear* configure.ac script. FG can't find
simgear anymore because it can't parse the version. Easy to fix there
but maybe other projects (such as terragear or fgrun) also depend on
it.

  It's not really a version number since it
 is not a number.

It's a NaN! Sorry :)

-- 
Csaba/Jester

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] simgear version number now a string

2009-12-14 Thread Jacob Burbach
 It's a NaN! Sorry :)

So now we know where all these NaN errors have been coming from!  ;-)

--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] simgear version number now a string

2009-12-14 Thread John Denker
On 12/14/2009 11:08 AM, Csaba Halász wrote:

 It is used in the *flightgear* configure.ac script. FG can't find
 simgear anymore because it can't parse the version. Easy to fix there
 but maybe other projects (such as terragear or fgrun) also depend on
 it.

A fully-compatible fix is attached below.

In the interests of consistency, would it make sense
to define FLIGHTGEAR_VERSION_STRING with quotes,
and change FLIGHTGEAR_VERSION to have no quotes?
Now is the time to change it if we're going to
change it.
 
  It's not really a version number since it
 is not a number.
 
 It's a NaN! Sorry :)

Ew.

=


commit 9ea41430a4e12767c67fdd2e2799b47670c1cba0
Author: John Denker j...@av8n.com
Date:   Mon Dec 14 11:26:05 2009 -0700

Add SIMGEAR_VERSION_STRING (emphasis on STRING).

diff --git a/simgear/version.h.in b/simgear/version.h.in
index 368a4a9..dcbcf5d 100644
--- a/simgear/version.h.in
+++ b/simgear/version.h.in
@@ -27,6 +27,7 @@
 
 
 #define SIMGEAR_VERSION @VERSION@
+#define SIMGEAR_VERSION_STRING @VERSION@
 
 
 #endif // _SIMGEAR_VERSION_H

commit 4423a4c867e6d87a3c5a2edff45a00788468ebd3
Author: John Denker j...@av8n.com
Date:   Mon Dec 14 11:27:37 2009 -0700

Use SIMGEAR_VERSION_STRING (emphasis on STRING)

diff --git a/src/Main/options.cxx b/src/Main/options.cxx
index c04053b..985b36a 100644
--- a/src/Main/options.cxx
+++ b/src/Main/options.cxx
@@ -1212,7 +1212,7 @@ fgOptVersion( const char *arg )
 cerr  *it;
 }
 cerr  endl;
-cerr  SimGear version:   SIMGEAR_VERSION  endl;
+cerr  SimGear version:   SIMGEAR_VERSION_STRING  endl;
 cerr  PLIB version:   PLIB_VERSION  endl;
 cerr  OSG version:   FG_OSG_VERSION  endl;
 return FG_OPTIONS_EXIT;




--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel


Re: [Flightgear-devel] simgear version number now a string

2009-12-14 Thread John Denker
Here's another way of getting the job done.
This is tidier in the sense that it leaves simgear unchanged.


commit cd0af70c868210f46584a1e5e922364b9f2e63ce
Author: John Denker j...@av8n.com
Date:   Mon Dec 14 11:50:53 2009 -0700

Print SIMGEAR_VERSION as a string, even though it doesn't come with quote 
marks.

diff --git a/src/Main/options.cxx b/src/Main/options.cxx
index c04053b..a57622c 100644
--- a/src/Main/options.cxx
+++ b/src/Main/options.cxx
@@ -1199,6 +1199,8 @@ fgOptParking( const char *arg )
 static int
 fgOptVersion( const char *arg )
 {
+#define _Quote(x) #x
+#define Quote(x) _Quote(x)
 cerr  FlightGear version:   VERSION  endl;
 cerr  FG_ROOT=  globals-get_fg_root()  endl;
 cerr  FG_HOME=  fgGetString(/sim/fg-home)  endl;
@@ -1212,10 +1214,12 @@ fgOptVersion( const char *arg )
 cerr  *it;
 }
 cerr  endl;
-cerr  SimGear version:   SIMGEAR_VERSION  endl;
+cerr  SimGear version:   Quote(SIMGEAR_VERSION)  endl;
 cerr  PLIB version:   PLIB_VERSION  endl;
 cerr  OSG version:   FG_OSG_VERSION  endl;
 return FG_OPTIONS_EXIT;
+#undef Quote
+#undef _Quote
 }
 
 static int


--
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
___
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel