Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp247574imu; Thu, 8 Nov 2018 00:58:36 -0800 (PST) X-Google-Smtp-Source: AJdET5fztSTg8K9j/CNeSkowzTQqF2Qhj2zXq0ise/gUhAjodQcS6TL/gPbUsQx4wTcJp+bwszTp X-Received: by 2002:a62:89d7:: with SMTP id n84-v6mr3770063pfk.255.1541667516126; Thu, 08 Nov 2018 00:58:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541667516; cv=none; d=google.com; s=arc-20160816; b=JGkQAi1H5dzrozwzA2ym1fmZJpG2z6M5QU4ZV8IIBdI1/A7qjviwUm0FzRUdFnXxkX tmCSETKpukAUUJRbyMMqK54ccBWma6kpzu8dI3YvG4KgUX9kP7DucOlgrXQ4R/W4FsiF ypAGxz8oyv/4SoYFIsSvYtSQCP526/4hYPcPk/dCc8siHhouZOu407NASWIAFmXn4r9S 9WwCoJWNS6gETiCDrG1dHO70Jh5NdhShZp2qrWlKMYFxOKKI9ry/umOMM7H8XBrrwO/3 1NIqJKSBhfvbOLn2LTXbTftrY8VXFrpajshmcf3HMt6j3hYOv/RTgo4y0AAaQiOhhmZe Sa8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=Uqyx0+x5Bn7m8jcWOftAa5VF88n8Yvhb4QVkzXnbivE=; b=CHcwK+0nI5f575HKbAFWYKJnnU8T4ulLwRcMdUXLrm/X+RnFnbW4IDCRbjXSSg+rLJ kXxXd5+4tO+FA3HJtFuCMjJk1/5WnYaT5iuhi50Nz9PIWUEBRLgAbqNm/Xn6bkkmHqA4 +wSljvVKKg/9ze6I99iGg0xKPjlVIXPy5q8kw7L8W7FWpMS7lKsrH+Ni4bPWdAPMc57e GdYLV+1uQqd4bc1JpfR1Qesj2mzB2M+2QA5Wq0ThYAgwk8lWbLuJvT1J3yVGQBnz04ml uXpEGm5irpbZLyGOy07Qg/l8hmgLAEWViIfPi8noj/Nfexj/h6rIhkO4KDZLlmqhtU/r WO8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n17-v6si2921443pgk.501.2018.11.08.00.58.19; Thu, 08 Nov 2018 00:58:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726802AbeKHSaf (ORCPT + 99 others); Thu, 8 Nov 2018 13:30:35 -0500 Received: from smtp2.provo.novell.com ([137.65.250.81]:46635 "EHLO smtp2.provo.novell.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726145AbeKHSaf (ORCPT ); Thu, 8 Nov 2018 13:30:35 -0500 Received: from Alpha.suse.asia (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (NOT encrypted); Thu, 08 Nov 2018 01:55:55 -0700 From: Larry Chen To: mark@fasheh.com, jlbec@evilplan.org Cc: linux-kernel@vger.kernel.org, ocfs2-devel@oss.oracle.com, akpm@linux-foundation.org Subject: [PATCH] ocfs2: Improve ocfs2 Makefile Date: Thu, 8 Nov 2018 16:55:46 +0800 Message-Id: <20181108085546.15149-1-lchen@suse.com> X-Mailer: git-send-email 2.16.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Included file path was fixed in ocfs2 makefile, which might causes some confusion when compiling ocfs2 as an external module. Say if we compile ocfs2 module as following. cp -r /kernel/tree/fs/ocfs2 /other/dir/ocfs2 cd /other/dir/ocfs2 make -C /path/to/kernel_source M=`pwd` modules Acutally, the compiler wil try to find included file in /kernel/tree/fs/ocfs2, rather than the directory /other/dir/ocfs2. To fix this little bug, we introduce the var $(src) provided by kbuild. $(src) means the absolute path of the running kbuild file. Signed-off-by: Larry Chen --- fs/ocfs2/Makefile | 2 +- fs/ocfs2/dlm/Makefile | 2 +- fs/ocfs2/dlmfs/Makefile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/Makefile b/fs/ocfs2/Makefile index 99ee093182cb..cc9b32b9db7c 100644 --- a/fs/ocfs2/Makefile +++ b/fs/ocfs2/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -ccflags-y := -Ifs/ocfs2 +ccflags-y := -I$(src) obj-$(CONFIG_OCFS2_FS) += \ ocfs2.o \ diff --git a/fs/ocfs2/dlm/Makefile b/fs/ocfs2/dlm/Makefile index bd1aab1f49a4..ef2854422a6e 100644 --- a/fs/ocfs2/dlm/Makefile +++ b/fs/ocfs2/dlm/Makefile @@ -1,4 +1,4 @@ -ccflags-y := -Ifs/ocfs2 +ccflags-y := -I$(src)/.. obj-$(CONFIG_OCFS2_FS_O2CB) += ocfs2_dlm.o diff --git a/fs/ocfs2/dlmfs/Makefile b/fs/ocfs2/dlmfs/Makefile index eed3db8c5b49..33431a0296a3 100644 --- a/fs/ocfs2/dlmfs/Makefile +++ b/fs/ocfs2/dlmfs/Makefile @@ -1,4 +1,4 @@ -ccflags-y := -Ifs/ocfs2 +ccflags-y := -I$(src)/.. obj-$(CONFIG_OCFS2_FS) += ocfs2_dlmfs.o -- 2.16.4