From patchwork Tue May 6 12:14:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taras Kondratiuk X-Patchwork-Id: 29697 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pa0-f69.google.com (mail-pa0-f69.google.com [209.85.220.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 4E637202E6 for ; Tue, 6 May 2014 12:15:02 +0000 (UTC) Received: by mail-pa0-f69.google.com with SMTP id fa1sf9674492pad.8 for ; Tue, 06 May 2014 05:15:01 -0700 (PDT) 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:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=Wxst25va+TZkmiB6mYNO/l08MZMkOnGenaiQOMFecRE=; b=hOXI5o3VZrh0DQZHRlxKmAIimMZG5CFDVrfz37SoZV1P4LyN3hhLpWBDcYhIUFA4kb hjvq7XjDHTYcUKrSk/iMgFREkBtODVmxKk5SHoCRnTQ8uN66WkAY0GgAhKfJ6lLtasEA E7EtnBXEYwmLQvtUbAfWJvcNdNQJz00sqdr0oWT9X+4SBjEvSSK4D7OSUqnI6nvVrFlb lmklTMZYts4EjVE2/PKBaURFXenh4BZ2Z8KCe1Hh6tHb7j3Go9COrb4lzJBh/4rK75Iz Q+MhgU4AJcfHgCNvmI6rMoii0u+j6MyqvIBzeORZzzmAUF7HV9Gt23gUSnyFHZ1vX2PH L4RQ== X-Gm-Message-State: ALoCoQmqJRR6WPU1YmtK3Nwi54FWgwhfp11LeHDDMcEWq6j6JpJM4q8hBnuGor5hsDYv0P0VX3eN X-Received: by 10.66.232.38 with SMTP id tl6mr956779pac.33.1399378501818; Tue, 06 May 2014 05:15:01 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.88.105 with SMTP id s96ls54qgd.25.gmail; Tue, 06 May 2014 05:15:01 -0700 (PDT) X-Received: by 10.221.29.137 with SMTP id ry9mr32777802vcb.6.1399378501290; Tue, 06 May 2014 05:15:01 -0700 (PDT) Received: from mail-ve0-f178.google.com (mail-ve0-f178.google.com [209.85.128.178]) by mx.google.com with ESMTPS id eb17si2281234veb.184.2014.05.06.05.15.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 May 2014 05:15:01 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.128.178; Received: by mail-ve0-f178.google.com with SMTP id sa20so4070194veb.23 for ; Tue, 06 May 2014 05:15:01 -0700 (PDT) X-Received: by 10.52.2.229 with SMTP id 5mr27424309vdx.24.1399378501222; Tue, 06 May 2014 05:15:01 -0700 (PDT) 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.220.221.72 with SMTP id ib8csp218180vcb; Tue, 6 May 2014 05:15:00 -0700 (PDT) X-Received: by 10.140.37.9 with SMTP id q9mr30301087qgq.57.1399378500459; Tue, 06 May 2014 05:15:00 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id i1si4983333qab.159.2014.05.06.05.14.59 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 06 May 2014 05:15:00 -0700 (PDT) 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-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WheGJ-0002bU-Eq; Tue, 06 May 2014 12:14:19 +0000 Received: from mail-lb0-f169.google.com ([209.85.217.169]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1WheGC-0002bP-MC for lng-odp@lists.linaro.org; Tue, 06 May 2014 12:14:12 +0000 Received: by mail-lb0-f169.google.com with SMTP id s7so5780975lbd.0 for ; Tue, 06 May 2014 05:14:46 -0700 (PDT) X-Received: by 10.112.128.231 with SMTP id nr7mr31775171lbb.9.1399378486145; Tue, 06 May 2014 05:14:46 -0700 (PDT) Received: from uglx0153363.itg.ti.com ([195.238.92.128]) by mx.google.com with ESMTPSA id d8sm13312373lbe.3.2014.05.06.05.14.44 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 06 May 2014 05:14:45 -0700 (PDT) From: Taras Kondratiuk To: lng-odp@lists.linaro.org Date: Tue, 6 May 2014 15:14:38 +0300 Message-Id: <1399378478-19814-1-git-send-email-taras.kondratiuk@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Topics: patch Subject: [lng-odp] [RFC PATCH v2] tests: Do not use platform directory 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: taras.kondratiuk@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 Test applications should not differ from any other ODP application in a way they use ODP library and headers. They shall use them from DESTDIR. The fact that they are placed in ODP repo do not allow them to abuse it. By using directly library and includes from platform directly we break modularity. Tests' Makefile must have information about platform's include directory structure. So tests' Makefile should be updated every time structure changes. Things get even worse if platform include directory structure differs between implementations (which is a valid case). Removing direct access to platform directory also makes hard to build and install library from tests' Makefile. Only unconditional install is possible, but this adds unnecessary overhead on each test build. So this patch removes this ability. Signed-off-by: Taras Kondratiuk --- v1..v2: Remove an ability to build and install ODP library from tests' Makefile v1: http://lists.linaro.org/pipermail/lng-odp/2014-May/000616.html Makefile | 3 +-- Makefile.inc | 1 + test/Makefile.inc | 14 -------------- 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 2512343..7d10fd5 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,8 @@ .DEFAULT_GOAL := default -ODP_ROOT = $(PWD) +ODP_ROOT = $(CURDIR) ODP_TESTS = $(ODP_ROOT)/test -export DESTDIR = $(ODP_ROOT)/build include $(ODP_ROOT)/Makefile.inc diff --git a/Makefile.inc b/Makefile.inc index a5aeb8b..d725137 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -7,6 +7,7 @@ PLATFORM ?= linux-generic OBJ_DIR = ./obj ODP_DIR = $(ODP_ROOT)/platform/$(PLATFORM) +export DESTDIR = $(ODP_ROOT)/build CC ?= gcc LD ?= gcc diff --git a/test/Makefile.inc b/test/Makefile.inc index f001119..8536402 100644 --- a/test/Makefile.inc +++ b/test/Makefile.inc @@ -3,19 +3,5 @@ # # SPDX-License-Identifier: BSD-3-Clause -ifdef DESTDIR - ODP_LIB = $(DESTDIR)/lib/libodp.a EXTRA_CFLAGS += -I$(DESTDIR)/include -EXTRA_CFLAGS += -I$(DESTDIR)/include/api - -else - -ODP_LIB = $(ODP_DIR)/lib/libodp.a -EXTRA_CFLAGS += -I$(ODP_ROOT)/include -EXTRA_CFLAGS += -I$(ODP_DIR)/include/api - -$(ODP_LIB): - @echo Building $@ - $(MAKE) -C $(ODP_DIR) libs -endif