pan-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pan-devel] [patch] more info for PLATFORM_INFO etc. (Re: My list of pre


From: SciFi
Subject: [Pan-devel] [patch] more info for PLATFORM_INFO etc. (Re: My list of present problems with Pan.)
Date: Sat, 22 Oct 2011 20:14:00 +0000 (UTC)
User-agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT d8bfcda (github.com/judgefudge/pan2/master); x86_64-apple-darwin10.8.0; gcc-4.2.1 (build 5666 (dot 3)); 32-bit mode)


Hi,

On Tue, 18 Oct 2011 09:41:48 +0000, Heinrich Müller wrote:
> 
> Am Mon, 17 Oct 2011 20:13:48 +0000 schrieb SciFi:
> 
>> Hi,
>> 
>> […]  My current Pan build can be seen
>> with this post's headers under User-Agent (I'll send judgefudge the
>> patches that "enhance" that string, soonish).
>> 
> Which patch? I see the user-agent with the git branch and commit checksum 
> already in my headers. But feel free to drop me a mail.

Let me show the diff I made based on a couple weeks ago:

-* begin *-
--- configure.in_orig   2011-10-02 18:16:34.000000000 -0500
+++ configure.in        2011-10-22 14:37:19.000000000 -0500
@@ -1,7 +1,7 @@
 AC_INIT([pan],[0.135],[http://bugzilla.gnome.org/enter_bug.cgi?product=Pan])
 AC_DEFINE(VERSION_MAJOR,0,[Major part of version number])
 AC_DEFINE(VERSION_MINOR,135,[Minor part of version number])
-AC_DEFINE(VERSION_REVISION,0,[Revision part of version number])
+AC_DEFINE(VERSION_REVISION,20111007,[Revision part of version number YYYYMMDD])
 AC_DEFINE(VERSION_TITLE,["Tomorrow I'll Wake Up and Scald Myself with 
Tea"],[Release Name])
 AC_PREREQ(2.54)
 
@@ -20,7 +20,7 @@
        if test -z $GIT_BRANCH; then
                GIT_REV="GIT $GIT_HASH"
        else
-               GIT_REV="GIT $GIT_HASH $GIT_BRANCH"
+               GIT_REV="GIT $GIT_HASH (github.com/judgefudge/pan2/$GIT_BRANCH)"
        fi
        echo $GIT_REV > pan_git_rev
 elif test -f pan_git_rev; then
@@ -118,8 +118,9 @@
 AC_MSG_RESULT($ac_cv_lkstrftime)
 
 AC_CANONICAL_HOST
-
-AC_DEFINE_UNQUOTED([PLATFORM_INFO],["$host"],[uname cpu-vendor-platformbuild])
+hostcc=`${CC:-gcc} --version | head -n1`
+runmode=32
+AC_DEFINE_UNQUOTED([PLATFORM_INFO],["$host; $hostcc; $runmode-bit 
mode"],[uname cpu-vendor-platformbuild])
 
 dnl windows-specific stuff.
 win32="no"
-* end *-


Note some things that the repo-owner would need to do:

1.  The AC_DEFINE for VERSION_REVISION is based on the repo's date, in
    YYYYMMDD format, of 'this cut' of the branch.  I like to put an
    "official" date on/in the code (not just "when compiled" etc.).  ;)

2.  Most Important:  The GIT_REV string should be changed for your actual
    hosting / userid / path etc., so people would know how to find it.
    If there's a way for git to tell this automatically, I'm all ears.  ;)

3.  I inserted the hostcc= line to get the current compiler's version
    string.  I'll have more on this a bit later below.


For the compiler-user:

4.  A thing I don't know quite how to do automatically is to get the
    runmode (32-bit or 64-bit).  This gets substituted into the next
    line for PLATFORM_INFO.  I seem to always step-into these kinds of
    quandrys; maybe someone knows how this could be automatically
    computed?.


Additional info for the hostcc compiler string (#3):

Sometimes a vendor puts out a hellaciously-long string for their compilers.
Once the config.h file is generated, I'll manually edit it to shorten the
#define for PLATFORM_INFO to condense its info quite a bit.  I'm not sure
how to do this automatically, even knowing about awk & sed etc., since
versions-strings (esp'ly non-GCC) can be quite various and not work thru
general filters.  ;)

But this patch can be used for starters.  ;)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]