Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1811004pxb; Fri, 5 Feb 2021 01:54:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJyXZWfWmPfZO1qHkarPSR4rEHR6A4lm6FgdGZgAIonVhekX+O0z56agLXhVP8q2jdkl5vm1 X-Received: by 2002:a17:906:3484:: with SMTP id g4mr3273859ejb.38.1612518841900; Fri, 05 Feb 2021 01:54:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612518841; cv=none; d=google.com; s=arc-20160816; b=dHeMmiU53iltTUcUmRskkUE+tvtPPUr1s7Dtf8Ap+wZ7X8yuG8mTQp999xHIkmmW37 7Qu7Hncz5A2Kv5f0rXe4OMpt6n6dZfvNW4Ym0ejjIsdYECK+OginVd9ORmkTZI2N/wbv SKIu54i1493ZGoITySMftw6LmzCoKGbwP8dmqX+cuXhnE064vuGR5OtK8Ps4onaZIDGE WbR7LbYbp3yI7szPJY9P4kSmrJyvwfMt0gviKpaQ/14wBE8K2IF8GHV12drQGElpq9BG 4vW8IjzUfhwKJAnSqsVdMnOQe8gHWh/kb+h2UCsBq3iI79MQcPQcqAqU+XTw5uhwoRIu 1tGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=UYYYag2UF5DICtGdP8HzyqwWipijgOEzB76GsOqlMmQ=; b=yhEJdbVgoQY4RNbXur8l6eW9K0vioc5zzgdPNQqjXASERkhqjYCT6qf9r3W+wQuNPZ /xr7RqFZrd1W6eTVgzb1vkPjjv8Cr1Xzsbn7+awqBAzlUxtRr1F/3heg8yt7XRnDo3Vr luNfaJ/8NOiptvDwrN5gPWVgZ0sqvkEamf3uQLUk8aDninTIIAjl7QbURWOdLimJC3sV qdjJatdciPJ8pIs4E4+89KoVV4CKYnbiFxTAehKfsUFzCxU9qdsEjq/ajmJy6/gE9keo 75gw8GDsqGafkRNnlNtPLAVdphzghygIVEtK6k13l5Y+hvdoEUlX+LObmnlhrQKLwRWZ VNcw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m12si4932888ejx.144.2021.02.05.01.53.37; Fri, 05 Feb 2021 01:54:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230216AbhBEJwA (ORCPT + 99 others); Fri, 5 Feb 2021 04:52:00 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:12132 "EHLO szxga04-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229703AbhBEJrb (ORCPT ); Fri, 5 Feb 2021 04:47:31 -0500 Received: from DGGEMS409-HUB.china.huawei.com (unknown [172.30.72.59]) by szxga04-in.huawei.com (SkyGuard) with ESMTP id 4DX9Wr181gz164x6; Fri, 5 Feb 2021 17:45:28 +0800 (CST) Received: from localhost.localdomain (10.67.165.24) by DGGEMS409-HUB.china.huawei.com (10.3.19.209) with Microsoft SMTP Server id 14.3.498.0; Fri, 5 Feb 2021 17:46:40 +0800 From: Yicong Yang To: , , , , , , , , , , , , , , CC: , , Subject: [PATCH 4/4] staging: comedi: Use subdir-ccflags-* to inherit debug flag Date: Fri, 5 Feb 2021 17:44:15 +0800 Message-ID: <1612518255-23052-5-git-send-email-yangyicong@hisilicon.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1612518255-23052-1-git-send-email-yangyicong@hisilicon.com> References: <1612518255-23052-1-git-send-email-yangyicong@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.67.165.24] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Junhao He Use subdir-ccflags-* instead of ccflags-* to inherit the debug settings from Kconfig when traversing subdirectories. Suggested-by: Bjorn Helgaas Signed-off-by: Junhao He Signed-off-by: Yicong Yang --- drivers/staging/comedi/Makefile | 2 +- drivers/staging/comedi/drivers/Makefile | 1 - drivers/staging/comedi/drivers/tests/Makefile | 2 -- drivers/staging/comedi/kcomedilib/Makefile | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/comedi/Makefile b/drivers/staging/comedi/Makefile index 072ed83..f51cc14 100644 --- a/drivers/staging/comedi/Makefile +++ b/drivers/staging/comedi/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG +subdir-ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG comedi-y := comedi_fops.o range.o drivers.o \ comedi_buf.o diff --git a/drivers/staging/comedi/drivers/Makefile b/drivers/staging/comedi/drivers/Makefile index b24ac00..7cafc36 100644 --- a/drivers/staging/comedi/drivers/Makefile +++ b/drivers/staging/comedi/drivers/Makefile @@ -1,7 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for individual comedi drivers # -ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG # Comedi "helper" modules obj-$(CONFIG_COMEDI_8254) += comedi_8254.o diff --git a/drivers/staging/comedi/drivers/tests/Makefile b/drivers/staging/comedi/drivers/tests/Makefile index b5d8e13..44ac13d 100644 --- a/drivers/staging/comedi/drivers/tests/Makefile +++ b/drivers/staging/comedi/drivers/tests/Makefile @@ -1,7 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for comedi drivers unit tests # -ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG - obj-$(CONFIG_COMEDI_TESTS) += example_test.o ni_routes_test.o CFLAGS_ni_routes_test.o := -DDEBUG diff --git a/drivers/staging/comedi/kcomedilib/Makefile b/drivers/staging/comedi/kcomedilib/Makefile index 8031142..9f20318 100644 --- a/drivers/staging/comedi/kcomedilib/Makefile +++ b/drivers/staging/comedi/kcomedilib/Makefile @@ -1,6 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-$(CONFIG_COMEDI_DEBUG) := -DDEBUG - obj-$(CONFIG_COMEDI_KCOMEDILIB) += kcomedilib.o kcomedilib-objs := kcomedilib_main.o -- 2.8.1