From patchwork Thu Jan 15 08:54:42 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anders Roxell X-Patchwork-Id: 43151 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 5F04F240BA for ; Thu, 15 Jan 2015 08:55:54 +0000 (UTC) Received: by mail-wg0-f72.google.com with SMTP id a1sf7182592wgh.3 for ; Thu, 15 Jan 2015 00:55:53 -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=Vhum/R3N7SQ6TX9OmXFmHsATg/Yjffzgl9I1BsJyciM=; b=BRmNsKMnbBsnJ8xn4+SOfsVk/9ewld5ymYsP1THDhkvs3Q5lYA2x+PHhNy2xFHJ4nn FmnCWe0b6cUyhgKrFuMw99p2xlC9W430PlKMLdqev6pLQ13xzVWUHPZrNYJrTHoYGon2 5CySNY+YG5qLj8vFCIYa0ti4L2AH+FsYUBOTVel5gW4KYL+Fck1e5GuwCjV9XZ751c5i z53dPBvhFPwLe2N58tNvn39Umo9yKLgW0rH57m2OBcrq5s0ZY6vMhTEcQ57jxB8SeSLx oLqrshz8xoSM/R3T6GxfRXZGrU/H+hBwtWPcNVWhFGAF6/nqgYlLx0bKZIMBcYkVoUkV hvow== X-Gm-Message-State: ALoCoQn98ElFHkJOLADfo1XZn8HeDf5PbOG26MS7m/KcmfTOZCX5RiM1dguw1HG6leuJ5/Ni/IY0 X-Received: by 10.180.74.132 with SMTP id t4mr990070wiv.3.1421312153685; Thu, 15 Jan 2015 00:55:53 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.22.40 with SMTP id a8ls191174laf.66.gmail; Thu, 15 Jan 2015 00:55:53 -0800 (PST) X-Received: by 10.112.119.139 with SMTP id ku11mr8678565lbb.76.1421312153519; Thu, 15 Jan 2015 00:55:53 -0800 (PST) Received: from mail-lb0-f171.google.com (mail-lb0-f171.google.com. [209.85.217.171]) by mx.google.com with ESMTPS id n3si808922lah.45.2015.01.15.00.55.53 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 15 Jan 2015 00:55:53 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.171 as permitted sender) client-ip=209.85.217.171; Received: by mail-lb0-f171.google.com with SMTP id w7so12162759lbi.2 for ; Thu, 15 Jan 2015 00:55:53 -0800 (PST) X-Received: by 10.112.125.41 with SMTP id mn9mr8401036lbb.80.1421312153437; Thu, 15 Jan 2015 00:55:53 -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 c8csp1962502lbb; Thu, 15 Jan 2015 00:55:52 -0800 (PST) X-Received: by 10.140.88.48 with SMTP id s45mr13588407qgd.28.1421312152156; Thu, 15 Jan 2015 00:55:52 -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 h34si1240878qgf.2.2015.01.15.00.55.51 (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 15 Jan 2015 00:55:52 -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 1YBgDV-0006x1-GO; Thu, 15 Jan 2015 08:55:49 +0000 Received: from mail-lb0-f181.google.com ([209.85.217.181]) by ip-10-35-177-41.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1YBgD9-0006rZ-0f for lng-odp@lists.linaro.org; Thu, 15 Jan 2015 08:55:27 +0000 Received: by mail-lb0-f181.google.com with SMTP id u14so2621430lbd.12 for ; Thu, 15 Jan 2015 00:55:21 -0800 (PST) X-Received: by 10.152.205.75 with SMTP id le11mr8489321lac.20.1421312121472; Thu, 15 Jan 2015 00:55:21 -0800 (PST) Received: from localhost (c-853670d5.07-21-73746f28.cust.bredbandsbolaget.se. [213.112.54.133]) by mx.google.com with ESMTPSA id qk4sm357501lbb.4.2015.01.15.00.55.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Jan 2015 00:55:20 -0800 (PST) From: Anders Roxell To: lng-odp@lists.linaro.org Date: Thu, 15 Jan 2015 09:54:42 +0100 Message-Id: <1421312084-12881-7-git-send-email-anders.roxell@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421312084-12881-1-git-send-email-anders.roxell@linaro.org> References: <1421312084-12881-1-git-send-email-anders.roxell@linaro.org> X-Topics: patch Subject: [lng-odp] [PATCH 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.217.171 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..4299b56 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 + let CURRENT=${GEN}*100+${MAJ} + REVISION=$MIN + AGE=$1 + echo -n "${CURRENT}:${REVISION}:${AGE}" +else + echo -n $GEN.$MAJ.$MIN +fi