From patchwork Thu May 18 11:48:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arkadiusz Hiler X-Patchwork-Id: 9733941 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5CDC5601BC for ; Thu, 18 May 2017 11:48:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4C90728438 for ; Thu, 18 May 2017 11:48:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4181E28485; Thu, 18 May 2017 11:48:08 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3279828438 for ; Thu, 18 May 2017 11:48:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 655566E153; Thu, 18 May 2017 11:48:06 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4FC756E153 for ; Thu, 18 May 2017 11:48:05 +0000 (UTC) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP; 18 May 2017 04:48:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,358,1491289200"; d="scan'208";a="103912449" Received: from ahiler-desk.igk.intel.com ([172.28.171.131]) by fmsmga006.fm.intel.com with ESMTP; 18 May 2017 04:48:03 -0700 From: Arkadiusz Hiler To: intel-gfx@lists.freedesktop.org Date: Thu, 18 May 2017 13:48:01 +0200 Message-Id: <20170518114801.15487-1-arkadiusz.hiler@intel.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170516140636.GA71568@mwajdecz-MOBL1.ger.corp.intel.com> References: <20170516140636.GA71568@mwajdecz-MOBL1.ger.corp.intel.com> Organization: Intel Technology Poland sp. z o.o. - KRS 101882 - ul. Slowackiego 173, 80-298 Gdansk Subject: [Intel-gfx] [PATCH] chamelium: Fix build issues on Android X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Makefile.sources are included 1:1 in Android.mk files, and are not parsed by automake. And yet those had some automake conditional logic. Moving it to .am file is enough for now. Also igt_chamelium.h included config.h without proper "HAVE_CONFIG_H" guard, and the file itself was included unconditionally. v2: keep lists of sources files in Makefile.sources (M. Wajdeczko) Cc: Michal Wajdeczko Signed-off-by: Arkadiusz Hiler Reviewed-by: Michal Wajdeczko --- lib/Makefile.am | 4 ++++ lib/Makefile.sources | 8 +++----- lib/igt.h | 2 ++ lib/igt_chamelium.h | 3 +++ tests/Makefile.am | 4 ++++ tests/Makefile.sources | 4 +--- 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/lib/Makefile.am b/lib/Makefile.am index c0ddf29..d616da0 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -22,6 +22,10 @@ if !HAVE_LIBDRM_INTEL stubs/drm/intel_bufmgr.h endif +if HAVE_CHAMELIUM +lib_source_list += $(chamelium_lib_source_list) +endif + AM_CPPFLAGS = -I$(top_srcdir) AM_CFLAGS = \ $(CWARNFLAGS) \ diff --git a/lib/Makefile.sources b/lib/Makefile.sources index 6348487..3a1e739 100644 --- a/lib/Makefile.sources +++ b/lib/Makefile.sources @@ -85,12 +85,10 @@ lib_source_list = \ igt_kmod.h \ $(NULL) -if HAVE_CHAMELIUM -lib_source_list += \ - igt_chamelium.h \ - igt_chamelium.c \ +chamelium_lib_source_list = \ + igt_chamelium.h \ + igt_chamelium.c \ $(NULL) -endif .PHONY: version.h.tmp diff --git a/lib/igt.h b/lib/igt.h index a97923e..a069deb 100644 --- a/lib/igt.h +++ b/lib/igt.h @@ -38,7 +38,9 @@ #include "igt_kms.h" #include "igt_pm.h" #include "igt_stats.h" +#ifdef HAVE_CHAMELIUM #include "igt_chamelium.h" +#endif #include "instdone.h" #include "intel_batchbuffer.h" #include "intel_chipset.h" diff --git a/lib/igt_chamelium.h b/lib/igt_chamelium.h index f421d83..15f6024 100644 --- a/lib/igt_chamelium.h +++ b/lib/igt_chamelium.h @@ -26,7 +26,10 @@ #ifndef IGT_CHAMELIUM_H #define IGT_CHAMELIUM_H +#ifdef HAVE_CONFIG_H #include "config.h" +#endif + #include "igt.h" #include diff --git a/tests/Makefile.am b/tests/Makefile.am index 05681d5..0783ac0 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -12,6 +12,10 @@ if HAVE_LIBDRM_VC4 TESTS_progs_M += $(VC4_TESTS_M) endif +if HAVE_CHAMELIUM +TESTS_progs_M += $(CHAMELIUM_TESTS_progs_M) +endif + if BUILD_TESTS test-list.txt: Makefile.sources @echo TESTLIST > $@ diff --git a/tests/Makefile.sources b/tests/Makefile.sources index 9553e4d..253fc22 100644 --- a/tests/Makefile.sources +++ b/tests/Makefile.sources @@ -154,11 +154,9 @@ TESTS_progs_M = \ meta_test \ $(NULL) -if HAVE_CHAMELIUM -TESTS_progs_M += \ +CHAMELIUM_TESTS_progs_M = \ chamelium \ $(NULL) -endif TESTS_progs_XM = \ gem_concurrent_all \