From patchwork Thu Feb 27 03:54:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 324683 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org X-Greylist: delayed 79985 seconds by postgrey-1.34 at bilbo; Thu, 27 Feb 2014 14:54:58 EST Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id DBD3B2C0081 for ; Thu, 27 Feb 2014 14:54:58 +1100 (EST) Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s1R3srYv001808 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 27 Feb 2014 03:54:54 GMT Received: from oss.oracle.com (oss-external.oracle.com [137.254.96.51]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id s1R3spkH007518 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 27 Feb 2014 03:54:53 GMT Received: from localhost ([127.0.0.1] helo=oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1WIs3f-0007Gx-Rz; Wed, 26 Feb 2014 19:54:51 -0800 Received: from ucsinet22.oracle.com ([156.151.31.94]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1WIs3Z-0007G1-Pm for fedfs-utils-devel@oss.oracle.com; Wed, 26 Feb 2014 19:54:45 -0800 Received: from aserp1020.oracle.com (aserp1020.oracle.com [141.146.126.67]) by ucsinet22.oracle.com (8.14.5+Sun/8.14.5) with ESMTP id s1R3si72007859 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 27 Feb 2014 03:54:45 GMT Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by aserp1020.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id s1R3sgRq018202 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 27 Feb 2014 03:54:44 GMT Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2746A7501A; Thu, 27 Feb 2014 03:54:42 +0000 (UTC) Date: Thu, 27 Feb 2014 14:54:31 +1100 From: NeilBrown To: Chuck Lever Message-ID: <20140227145431.25fc64e6@notabene.brown> X-Mailer: Claws Mail 3.9.2 (GTK+ 2.24.22; x86_64-suse-linux-gnu) Mime-Version: 1.0 X-Flow-Control-Info: class=Pass-to-MM reputation=ipRisk-All ip=195.135.220.15 ct-class=T2 ct-vol1=0 ct-vol2=4 ct-vol3=4 ct-risk=62 ct-spam1=75 ct-spam2=45 ct-bulk=35 rcpts=1 size=2733 X-SPF-Info: NONE::cantor2.suse.de X-Sendmail-CM-Score: 0.00% X-Sendmail-CM-Analysis: v=2.1 cv=WNxGABcR c=1 sm=1 tr=0 a=uEuDQZVrWKuLCe7byFjfVg==:117 a=uEuDQZVrWKuLCe7byFjfVg==:17 a=4PdVCjBLztMA:10 a=7SFtLa4N3QQA:10 a=rCNvwBpjZx8A:10 a=wKHi1PAYY1uyUm2z_OwA:9 a=CjuIK1q_8ugA:10 a=0kPLrQdw3YYA:10 a=PotlAvkRBckCAd55AioA:9 X-Sendmail-CT-Classification: not spam X-Sendmail-CT-RefID: str=0001.0A090203.530EB704.0087:SCFSTAT13898897, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 Cc: fedfs-utils-devel@oss.oracle.com Subject: [fedfs-utils] [fedfs-utils PATCH v2] Remove use of __DATE__ and __TIME__ when building. X-BeenThere: fedfs-utils-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list Reply-To: fedfs-utils Developers List-Id: fedfs-utils Developers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: fedfs-utils-devel-bounces@oss.oracle.com Errors-To: fedfs-utils-devel-bounces@oss.oracle.com X-Source-IP: acsinet21.oracle.com [141.146.126.237] Use of __DATE__ and __TIME__ makes it impossible to recompile after possibly changing context, and see the context made any real change in the resulting build. The Open Build Service can do this (to optimise rebuilds) and so discourages the use of __DATE__ and __TIME__ This patch removes the __DATE__ and __TIME__ leaving just the VERSION. Signed-off-by: NeilBrown --- p.s. I'm not subscribed so didn't get your reply ... but I checked the archive just in case and found it there. For some of my projects I include e.g. VERSION = $(shell [ -d .git ] && git describe HEAD | sed 's/mdadm-//') CFLAGS += $(if $(VERSION),-DVERSION=\"$(VERSION)\",) in the Makefile which makes the version message slightly more useful. I don't know how to integrate that with autoconf. Thanks, NeilBrown diff --git a/src/fedfsd/main.c b/src/fedfsd/main.c index f6ca61f7d6e8..4980dc3b09e1 100644 --- a/src/fedfsd/main.c +++ b/src/fedfsd/main.c @@ -164,9 +164,7 @@ int main(int argc, char **argv) gid = grp->gr_gid; break; case '?': - fprintf(stderr, "Version " VERSION - ", built on %s at %s\n\n", - __DATE__, __TIME__); + fprintf(stderr, "Version " VERSION "\n\n"); fedfsd_usage(progname); break; case 'o': @@ -230,8 +228,7 @@ int main(int argc, char **argv) } } - xlog(L_NOTICE, "Version " VERSION " (built %s at %s) starting", - __DATE__, __TIME__); + xlog(L_NOTICE, "Version " VERSION " starting"); if (!fedfsd_set_up_authenticators()) exit(EXIT_FAILURE);