You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by br...@apache.org on 2012/08/02 21:45:43 UTC

svn commit: r1368662 - in /subversion/trunk: configure.ac subversion/libsvn_subr/opt.c subversion/svn_private_config.hw

Author: brane
Date: Thu Aug  2 19:45:42 2012
New Revision: 1368662

URL: http://svn.apache.org/viewvc?rev=1368662&view=rev
Log:
Add information about the build system to "svn --version" output.
This should make solving user problems a little bit easier.

* configure.ac (SVN_BUILD_HOST): Define to ${host}.
* subversion/libsvn_subr/opt.c (svn_opt__print_version_info):
  Add SVN_BUILD_HOST to the version info.
* subversion/svn_private_config.hw (SVN_BUILD_HOST): Define
  to make the Windows build hopefully still work.

Modified:
    subversion/trunk/configure.ac
    subversion/trunk/subversion/libsvn_subr/opt.c
    subversion/trunk/subversion/svn_private_config.hw

Modified: subversion/trunk/configure.ac
URL: http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1368662&r1=1368661&r2=1368662&view=diff
==============================================================================
--- subversion/trunk/configure.ac (original)
+++ subversion/trunk/configure.ac Thu Aug  2 19:45:42 2012
@@ -1389,6 +1389,10 @@ AC_SUBST(SVN_CONFIG_SCRIPT_FILES)
 # Ensure that SWIG is checked after reconfiguration.
 rm -f .swig_checked
 
+dnl Provide ${host} for use in compiled code (for svn --version)
+AC_DEFINE_UNQUOTED([SVN_BUILD_HOST], "${host}",
+                   [Defined to the config.guess name of the build system])
+
 AC_OUTPUT
 
 # ==== Print final messages to user ==========================================

Modified: subversion/trunk/subversion/libsvn_subr/opt.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=1368662&r1=1368661&r2=1368662&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/opt.c (original)
+++ subversion/trunk/subversion/libsvn_subr/opt.c Thu Aug  2 19:45:42 2012
@@ -1111,8 +1111,9 @@ svn_opt__print_version_info(const char *
     return svn_cmdline_printf(pool, "%s\n", SVN_VER_NUMBER);
 
   SVN_ERR(svn_cmdline_printf(pool, _("%s, version %s\n"
-                                     "   compiled %s, %s\n\n"), pgm_name,
-                             SVN_VERSION, __DATE__, __TIME__));
+                                     "   compiled %s, %s on %s\n\n"),
+                             pgm_name, SVN_VERSION, __DATE__, __TIME__,
+                             SVN_BUILD_HOST));
   SVN_ERR(svn_cmdline_fputs(
              _("Copyright (C) 2012 The Apache Software Foundation.\n"
                "This software consists of contributions made by many "

Modified: subversion/trunk/subversion/svn_private_config.hw
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn_private_config.hw?rev=1368662&r1=1368661&r2=1368662&view=diff
==============================================================================
--- subversion/trunk/subversion/svn_private_config.hw (original)
+++ subversion/trunk/subversion/svn_private_config.hw Thu Aug  2 19:45:42 2012
@@ -29,6 +29,11 @@
 #ifndef SVN_PRIVATE_CONFIG_HW
 #define SVN_PRIVATE_CONFIG_HW
 
+
+/* Define to a Windows-specific equivalent of config.guess output */
+/* ### Replace CPU type and Windows version during build script generation */
+#define SVN_BUILD_HOST "x86-microsoft-windows"
+
 /* The minimal version of Berkeley DB we want */
 #define SVN_FS_WANT_DB_MAJOR    4
 #define SVN_FS_WANT_DB_MINOR    0



Re: svn commit: r1368662 - in /subversion/trunk: configure.ac subversion/libsvn_subr/opt.c subversion/svn_private_config.hw

Posted by Greg Stein <gs...@gmail.com>.
On Aug 2, 2012 7:26 PM, "Branko Čibej" <br...@wandisco.com> wrote:
>
> On 02.08.2012 22:18, Greg Stein wrote:
> > I like the general idea here, but would suggest details like this could
> > fall under --version --verbose. Apache httpd has a similar feature which
> > also prints other #define values. For example, maybe we could print
version
> > info for the libs we compiled against (and maybe the version loaded at
run
> > time).
>
> Yeah, I was planning to expand on this a bit. One of the things that I'd
> like to add, besides library versions as you note above, is similar info
> about the running system (as opposed to the build system), and I thought
> about --verbose in that context.

Sweet.

> For this particular case, I'd prefer to keep displaying it without
> --verbose; IMO it's no less appropriate than __DATE__ and __TIME__.

Fair enough!

Thanks,
-g

Re: svn commit: r1368662 - in /subversion/trunk: configure.ac subversion/libsvn_subr/opt.c subversion/svn_private_config.hw

Posted by Branko Čibej <br...@wandisco.com>.
On 02.08.2012 22:18, Greg Stein wrote:
> I like the general idea here, but would suggest details like this could
> fall under --version --verbose. Apache httpd has a similar feature which
> also prints other #define values. For example, maybe we could print version
> info for the libs we compiled against (and maybe the version loaded at run
> time).

Yeah, I was planning to expand on this a bit. One of the things that I'd
like to add, besides library versions as you note above, is similar info
about the running system (as opposed to the build system), and I thought
about --verbose in that context.

For this particular case, I'd prefer to keep displaying it without
--verbose; IMO it's no less appropriate than __DATE__ and __TIME__.

-- Brane

> Cheers,
> -g
> On Aug 2, 2012 3:46 PM, <br...@apache.org> wrote:
>
>> Author: brane
>> Date: Thu Aug  2 19:45:42 2012
>> New Revision: 1368662
>>
>> URL: http://svn.apache.org/viewvc?rev=1368662&view=rev
>> Log:
>> Add information about the build system to "svn --version" output.
>> This should make solving user problems a little bit easier.
>>
>> * configure.ac (SVN_BUILD_HOST): Define to ${host}.
>> * subversion/libsvn_subr/opt.c (svn_opt__print_version_info):
>>   Add SVN_BUILD_HOST to the version info.
>> * subversion/svn_private_config.hw (SVN_BUILD_HOST): Define
>>   to make the Windows build hopefully still work.
>>
>> Modified:
>>     subversion/trunk/configure.ac
>>     subversion/trunk/subversion/libsvn_subr/opt.c
>>     subversion/trunk/subversion/svn_private_config.hw
>>
>> Modified: subversion/trunk/configure.ac
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1368662&r1=1368661&r2=1368662&view=diff
>>
>> ==============================================================================
>> --- subversion/trunk/configure.ac (original)
>> +++ subversion/trunk/configure.ac Thu Aug  2 19:45:42 2012
>> @@ -1389,6 +1389,10 @@ AC_SUBST(SVN_CONFIG_SCRIPT_FILES)
>>  # Ensure that SWIG is checked after reconfiguration.
>>  rm -f .swig_checked
>>
>> +dnl Provide ${host} for use in compiled code (for svn --version)
>> +AC_DEFINE_UNQUOTED([SVN_BUILD_HOST], "${host}",
>> +                   [Defined to the config.guess name of the build system])
>> +
>>  AC_OUTPUT
>>
>>  # ==== Print final messages to user
>> ==========================================
>>
>> Modified: subversion/trunk/subversion/libsvn_subr/opt.c
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=1368662&r1=1368661&r2=1368662&view=diff
>>
>> ==============================================================================
>> --- subversion/trunk/subversion/libsvn_subr/opt.c (original)
>> +++ subversion/trunk/subversion/libsvn_subr/opt.c Thu Aug  2 19:45:42 2012
>> @@ -1111,8 +1111,9 @@ svn_opt__print_version_info(const char *
>>      return svn_cmdline_printf(pool, "%s\n", SVN_VER_NUMBER);
>>
>>    SVN_ERR(svn_cmdline_printf(pool, _("%s, version %s\n"
>> -                                     "   compiled %s, %s\n\n"), pgm_name,
>> -                             SVN_VERSION, __DATE__, __TIME__));
>> +                                     "   compiled %s, %s on %s\n\n"),
>> +                             pgm_name, SVN_VERSION, __DATE__, __TIME__,
>> +                             SVN_BUILD_HOST));
>>    SVN_ERR(svn_cmdline_fputs(
>>               _("Copyright (C) 2012 The Apache Software Foundation.\n"
>>                 "This software consists of contributions made by many "
>>
>> Modified: subversion/trunk/subversion/svn_private_config.hw
>> URL:
>> http://svn.apache.org/viewvc/subversion/trunk/subversion/svn_private_config.hw?rev=1368662&r1=1368661&r2=1368662&view=diff
>>
>> ==============================================================================
>> --- subversion/trunk/subversion/svn_private_config.hw (original)
>> +++ subversion/trunk/subversion/svn_private_config.hw Thu Aug  2 19:45:42
>> 2012
>> @@ -29,6 +29,11 @@
>>  #ifndef SVN_PRIVATE_CONFIG_HW
>>  #define SVN_PRIVATE_CONFIG_HW
>>
>> +
>> +/* Define to a Windows-specific equivalent of config.guess output */
>> +/* ### Replace CPU type and Windows version during build script
>> generation */
>> +#define SVN_BUILD_HOST "x86-microsoft-windows"
>> +
>>  /* The minimal version of Berkeley DB we want */
>>  #define SVN_FS_WANT_DB_MAJOR    4
>>  #define SVN_FS_WANT_DB_MINOR    0
>>
>>
>>


-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download


Re: svn commit: r1368662 - in /subversion/trunk: configure.ac subversion/libsvn_subr/opt.c subversion/svn_private_config.hw

Posted by Greg Stein <gs...@gmail.com>.
I like the general idea here, but would suggest details like this could
fall under --version --verbose. Apache httpd has a similar feature which
also prints other #define values. For example, maybe we could print version
info for the libs we compiled against (and maybe the version loaded at run
time).

Cheers,
-g
On Aug 2, 2012 3:46 PM, <br...@apache.org> wrote:

> Author: brane
> Date: Thu Aug  2 19:45:42 2012
> New Revision: 1368662
>
> URL: http://svn.apache.org/viewvc?rev=1368662&view=rev
> Log:
> Add information about the build system to "svn --version" output.
> This should make solving user problems a little bit easier.
>
> * configure.ac (SVN_BUILD_HOST): Define to ${host}.
> * subversion/libsvn_subr/opt.c (svn_opt__print_version_info):
>   Add SVN_BUILD_HOST to the version info.
> * subversion/svn_private_config.hw (SVN_BUILD_HOST): Define
>   to make the Windows build hopefully still work.
>
> Modified:
>     subversion/trunk/configure.ac
>     subversion/trunk/subversion/libsvn_subr/opt.c
>     subversion/trunk/subversion/svn_private_config.hw
>
> Modified: subversion/trunk/configure.ac
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/configure.ac?rev=1368662&r1=1368661&r2=1368662&view=diff
>
> ==============================================================================
> --- subversion/trunk/configure.ac (original)
> +++ subversion/trunk/configure.ac Thu Aug  2 19:45:42 2012
> @@ -1389,6 +1389,10 @@ AC_SUBST(SVN_CONFIG_SCRIPT_FILES)
>  # Ensure that SWIG is checked after reconfiguration.
>  rm -f .swig_checked
>
> +dnl Provide ${host} for use in compiled code (for svn --version)
> +AC_DEFINE_UNQUOTED([SVN_BUILD_HOST], "${host}",
> +                   [Defined to the config.guess name of the build system])
> +
>  AC_OUTPUT
>
>  # ==== Print final messages to user
> ==========================================
>
> Modified: subversion/trunk/subversion/libsvn_subr/opt.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/opt.c?rev=1368662&r1=1368661&r2=1368662&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_subr/opt.c (original)
> +++ subversion/trunk/subversion/libsvn_subr/opt.c Thu Aug  2 19:45:42 2012
> @@ -1111,8 +1111,9 @@ svn_opt__print_version_info(const char *
>      return svn_cmdline_printf(pool, "%s\n", SVN_VER_NUMBER);
>
>    SVN_ERR(svn_cmdline_printf(pool, _("%s, version %s\n"
> -                                     "   compiled %s, %s\n\n"), pgm_name,
> -                             SVN_VERSION, __DATE__, __TIME__));
> +                                     "   compiled %s, %s on %s\n\n"),
> +                             pgm_name, SVN_VERSION, __DATE__, __TIME__,
> +                             SVN_BUILD_HOST));
>    SVN_ERR(svn_cmdline_fputs(
>               _("Copyright (C) 2012 The Apache Software Foundation.\n"
>                 "This software consists of contributions made by many "
>
> Modified: subversion/trunk/subversion/svn_private_config.hw
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/svn_private_config.hw?rev=1368662&r1=1368661&r2=1368662&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/svn_private_config.hw (original)
> +++ subversion/trunk/subversion/svn_private_config.hw Thu Aug  2 19:45:42
> 2012
> @@ -29,6 +29,11 @@
>  #ifndef SVN_PRIVATE_CONFIG_HW
>  #define SVN_PRIVATE_CONFIG_HW
>
> +
> +/* Define to a Windows-specific equivalent of config.guess output */
> +/* ### Replace CPU type and Windows version during build script
> generation */
> +#define SVN_BUILD_HOST "x86-microsoft-windows"
> +
>  /* The minimal version of Berkeley DB we want */
>  #define SVN_FS_WANT_DB_MAJOR    4
>  #define SVN_FS_WANT_DB_MINOR    0
>
>
>

Re: r1368662 - Add information about the build system to "svn --version" output - for Windows

Posted by Branko Čibej <br...@wandisco.com>.
On 07.08.2012 22:50, Branko Čibej wrote:
> On 07.08.2012 18:19, Julian Foad wrote:
>> Brane wrote:[...]
>>
>>> Modified: subversion/trunk/subversion/svn_private_config.hw
>>> ==============================================================================
>>> +
>>> +/* Define to a Windows-specific equivalent of config.guess output */
>>> +/* ### Replace CPU type and Windows version during build script generation */
>>> +#define SVN_BUILD_HOST "x86-microsoft-windows"
>> For Windows, would the following be an improvement?
> Yes, it would. Though I'm working on a script-based approach to this
> that would tell us a bit more. My only issue right now is that building
> on Windows is an even bigger pain than I remember ... :(

And here it is: r1370526.


-- Brane

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download


Re: r1368662 - Add information about the build system to "svn --version" output - for Windows

Posted by Branko Čibej <br...@wandisco.com>.
On 07.08.2012 18:19, Julian Foad wrote:
> Brane wrote:[...]
>
>> Modified: subversion/trunk/subversion/svn_private_config.hw
>> ==============================================================================
>> +
>> +/* Define to a Windows-specific equivalent of config.guess output */
>> +/* ### Replace CPU type and Windows version during build script generation */
>> +#define SVN_BUILD_HOST "x86-microsoft-windows"
> For Windows, would the following be an improvement?

Yes, it would. Though I'm working on a script-based approach to this
that would tell us a bit more. My only issue right now is that building
on Windows is an even bigger pain than I remember ... :(

-- Brane

-- 
Certified & Supported Apache Subversion Downloads:
http://www.wandisco.com/subversion/download


Re: r1368662 - Add information about the build system to "svn --version" output - for Windows

Posted by Julian Foad <ju...@btopenworld.com>.
Brane wrote:[...]

> Modified: subversion/trunk/subversion/svn_private_config.hw
> ==============================================================================
> +
> +/* Define to a Windows-specific equivalent of config.guess output */
> +/* ### Replace CPU type and Windows version during build script generation */
> +#define SVN_BUILD_HOST "x86-microsoft-windows"

For Windows, would the following be an improvement?

Index: subversion/svn_private_config.hw
===================================================================
--- subversion/svn_private_config.hw    (revision 1370255)
+++ subversion/svn_private_config.hw    (working copy)
@@ -33,3 +33,23 @@
-/* Define to a Windows-specific equivalent of config.guess output */
-/* ### Replace CPU type and Windows version during build script generation */
-#define SVN_BUILD_HOST "x86-microsoft-windows"
+/* Name of the build target CPU type. */
+#if defined(_M_X64) || defined(_M_AMD64)  /* synonyms */
+#define SVN_BUILD__CPU "x86_64"
+#elif defined(_M_IA64)
+#define SVN_BUILD__CPU "ia64"
+#elif defined(_M_IX86)
+#define SVN_BUILD__CPU "x86"
+#elif defined(_M_ALPHA)
+#define SVN_BUILD__CPU "alpha"
+#elif defined(_M_MPPC) || defined(_M_PPC)
+#define SVN_BUILD__CPU "powerpc"
+#else
+#define SVN_BUILD__CPU "unknown"
+#endif
+
+/* Name of the build system. Windows equivalent of config.guess output. */
+#if defined(_WIN64)
+#define SVN_BUILD_HOST SVN_BUILD__CPU "-microsoft-win64"
+#elif defined(_WIN32)
+#define SVN_BUILD_HOST SVN_BUILD__CPU "-microsoft-win32"
+#else
+#define SVN_BUILD_HOST SVN_BUILD__CPU "-microsoft-unknown"
+#endif


This patch is based on info I found on the web.  I don't have a Windows build system to test this on.

- Julian