From patchwork Thu Jan 15 13:15:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 43174 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f70.google.com (mail-wg0-f70.google.com [74.125.82.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 25E1120D60 for ; Thu, 15 Jan 2015 13:16:37 +0000 (UTC) Received: by mail-wg0-f70.google.com with SMTP id y19sf7881915wgg.1 for ; Thu, 15 Jan 2015 05:16:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:subject:precedence:list-id:list-unsubscribe:list-archive :list-post:list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=ALTOXOMGZKhpYsTlw6PGS2lGFE/5F5h4S48a3rCsr84=; b=LZzb/8+oa1TIWWB6QIAUHeoaTw8sX3fkNL0nZGLjWqvjl+5DOUdAa5+Xn96gEMl3So lygIZVU4JyZDgs05mcY5OmPRFj6eAk9JLWHENXA6/RroqqjX3nkea7ia/KiWNvE0hn9o t/aZ31xc5uQOVy3Mlrav67g+xwTLUmzHlG+v8yO25y39B403m6CP504ywiYlCA076J2c bI1KclBYYaa/+kt7Eir+8evFsU8QJBanr1vgZVJ/HP6dlhmNeEbYatdCgkpNIQirf/6D tgb9JZhqxHUwxM4lGN/NC5l763Ex7l7Fj/y3naMlptTus18UMsJUTvlxFr2s0+trw9ab Pykw== X-Gm-Message-State: ALoCoQmcova2YYJrIjFacwjZBW8ILjXzAVOHWFhy6JlTSjnOSDuAvBmWdF+DnDJKwAwWeGiES1bU X-Received: by 10.180.74.140 with SMTP id t12mr1372567wiv.2.1421327796461; Thu, 15 Jan 2015 05:16:36 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.18.134 with SMTP id w6ls230072lad.63.gmail; Thu, 15 Jan 2015 05:16:36 -0800 (PST) X-Received: by 10.112.129.228 with SMTP id nz4mr9675379lbb.8.1421327796298; Thu, 15 Jan 2015 05:16:36 -0800 (PST) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com. [209.85.215.49]) by mx.google.com with ESMTPS id j1si1349236lag.127.2015.01.15.05.16.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Jan 2015 05:16:36 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id hs14so13477875lab.8 for ; Thu, 15 Jan 2015 05:16:36 -0800 (PST) X-Received: by 10.112.173.202 with SMTP id bm10mr1186118lbc.24.1421327796038; Thu, 15 Jan 2015 05:16:36 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.9.200 with SMTP id c8csp2030072lbb; Thu, 15 Jan 2015 05:16:35 -0800 (PST) X-Received: by 10.229.196.70 with SMTP id ef6mr15918834qcb.31.1421327794740; Thu, 15 Jan 2015 05:16:34 -0800 (PST) Received: from ip-10-35-177-41.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id c6si1768312qan.115.2015.01.15.05.16.13 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 15 Jan 2015 05:16:34 -0800 (PST) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-35-177-41.ec2.internal) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YBkHU-0000Kn-56; Thu, 15 Jan 2015 13:16:12 +0000 Received: from mail-la0-f52.google.com ([209.85.215.52]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YBkHO-0000ID-Pd for lng-odp@lists.linaro.org; Thu, 15 Jan 2015 13:16:06 +0000 Received: by mail-la0-f52.google.com with SMTP id hs14so13505228lab.11 for ; Thu, 15 Jan 2015 05:16:01 -0800 (PST) X-Received: by 10.152.29.129 with SMTP id k1mr9871001lah.10.1421327760994; Thu, 15 Jan 2015 05:16:00 -0800 (PST) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id j19sm19476lbl.23.2015.01.15.05.16.00 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 05:16:00 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Thu, 15 Jan 2015 14:15:32 +0100 Message-Id: <1421327732-28123-1-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421312084-12881-7-git-send-email-anders.roxell@linaro.org> References: <1421312084-12881-7-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCHv2 6/8] configure.ac: make SO (shared object) version unique X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: anders.roxell@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.49 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 Signed-off-by: Anders Roxell --- configure.ac | 9 +++++++++ platform/Makefile.inc | 2 ++ scripts/odp_version.sh | 10 +++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/configure.ac b/configure.ac index d5808ec..abad5b4 100644 --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,13 @@ AC_TYPE_UINT32_T AC_TYPE_UINT64_T ########################################################################## +# Set correct platform library version +########################################################################## +ODP_LIBSO_AGE=0 +ODP_LIBSO_VERSION=$(./scripts/odp_version.sh ${ODP_LIBSO_AGE}) +AC_SUBST(ODP_LIBSO_VERSION) + +########################################################################## # Determine which platform to build for ########################################################################## AC_ARG_WITH([platform], @@ -232,6 +239,8 @@ AC_MSG_RESULT([ $PACKAGE $VERSION ======== + Library version: ${ODP_LIBSO_VERSION} + with_platform: ${with_platform} prefix: ${prefix} sysconfdir: ${sysconfdir} diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 6ffa2ad..9e73fc4 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -9,3 +9,5 @@ pkgconfig_DATA = $(top_builddir)/pkgconfig/libodp.pc VPATH = $(srcdir) $(builddir) lib_LTLIBRARIES = $(LIB)/libodp.la + +AM_LDFLAGS += -version-number '$(ODP_LIBSO_VERSION)' diff --git a/scripts/odp_version.sh b/scripts/odp_version.sh index 72ae404..fed2a6b 100755 --- a/scripts/odp_version.sh +++ b/scripts/odp_version.sh @@ -6,4 +6,12 @@ GEN=`grep "define ODP_VERSION_API_GENERATION" ${VFILE} | cut -d ' ' -f 3` MAJ=`grep "define ODP_VERSION_API_MAJOR" ${VFILE} | cut -d ' ' -f 3` MIN=`grep "define ODP_VERSION_API_MINOR" ${VFILE} | cut -d ' ' -f 3` -echo -n $GEN.$MAJ.$MIN +if [[ -n $1 ]]; then + # Set library version + CURRENT=$((${GEN}*100 + ${MAJ})) + REVISION=$MIN + AGE=$1 + echo -n "${CURRENT}:${REVISION}:${AGE}" +else + echo -n $GEN.$MAJ.$MIN +fi