* [PATCH] tools/test/nvdimm: Fix out of tree build
@ 2020-01-14 5:40 Santosh Sivaraj
2020-03-14 1:21 ` Santosh Sivaraj
2020-03-31 21:37 ` Dan Williams
0 siblings, 2 replies; 3+ messages in thread
From: Santosh Sivaraj @ 2020-01-14 5:40 UTC (permalink / raw)
To: linux-nvdimm, Dan Williams; +Cc: Aneesh Kumar K . V
Out of tree build using
make M=tools/test/nvdimm O=/tmp/build -C /tmp/build
fails with the following error
make: Entering directory '/tmp/build'
CC [M] tools/testing/nvdimm/test/nfit.o
linux/tools/testing/nvdimm/test/nfit.c:19:10: fatal error: nd-core.h: No such file or directory
19 | #include <nd-core.h>
| ^~~~~~~~~~~
compilation terminated.
That is because the kbuild file uses $(src) which points to
tools/testing/nvdimm, $(srctree) correctly points to root of the linux
source tree.
Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
---
tools/testing/nvdimm/Kbuild | 4 ++--
tools/testing/nvdimm/test/Kbuild | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild
index 6aca8d5be159..0615fa3d9f7e 100644
--- a/tools/testing/nvdimm/Kbuild
+++ b/tools/testing/nvdimm/Kbuild
@@ -22,8 +22,8 @@ DRIVERS := ../../../drivers
NVDIMM_SRC := $(DRIVERS)/nvdimm
ACPI_SRC := $(DRIVERS)/acpi/nfit
DAX_SRC := $(DRIVERS)/dax
-ccflags-y := -I$(src)/$(NVDIMM_SRC)/
-ccflags-y += -I$(src)/$(ACPI_SRC)/
+ccflags-y := -I$(srctree)/drivers/nvdimm/
+ccflags-y += -I$(srctree)/drivers/acpi/nfit/
obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
diff --git a/tools/testing/nvdimm/test/Kbuild b/tools/testing/nvdimm/test/Kbuild
index fb3c3d7cdb9b..75baebf8f4ba 100644
--- a/tools/testing/nvdimm/test/Kbuild
+++ b/tools/testing/nvdimm/test/Kbuild
@@ -1,6 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
-ccflags-y := -I$(src)/../../../../drivers/nvdimm/
-ccflags-y += -I$(src)/../../../../drivers/acpi/nfit/
+ccflags-y := -I$(srctree)/drivers/nvdimm/
+ccflags-y += -I$(srctree)/drivers/acpi/nfit/
obj-m += nfit_test.o
obj-m += nfit_test_iomap.o
--
2.24.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/test/nvdimm: Fix out of tree build
2020-01-14 5:40 [PATCH] tools/test/nvdimm: Fix out of tree build Santosh Sivaraj
@ 2020-03-14 1:21 ` Santosh Sivaraj
2020-03-31 21:37 ` Dan Williams
1 sibling, 0 replies; 3+ messages in thread
From: Santosh Sivaraj @ 2020-03-14 1:21 UTC (permalink / raw)
To: linux-nvdimm, Dan Williams; +Cc: Aneesh Kumar K . V
Hi Dan,
Any comments on the below patch to fix builds that use KBUILD_OUT?
Thanks,
Santosh
Santosh Sivaraj <santosh@fossix.org> writes:
> Out of tree build using
>
> make M=tools/test/nvdimm O=/tmp/build -C /tmp/build
>
> fails with the following error
>
> make: Entering directory '/tmp/build'
> CC [M] tools/testing/nvdimm/test/nfit.o
> linux/tools/testing/nvdimm/test/nfit.c:19:10: fatal error: nd-core.h: No such file or directory
> 19 | #include <nd-core.h>
> | ^~~~~~~~~~~
> compilation terminated.
>
> That is because the kbuild file uses $(src) which points to
> tools/testing/nvdimm, $(srctree) correctly points to root of the linux
> source tree.
>
> Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
> ---
> tools/testing/nvdimm/Kbuild | 4 ++--
> tools/testing/nvdimm/test/Kbuild | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild
> index 6aca8d5be159..0615fa3d9f7e 100644
> --- a/tools/testing/nvdimm/Kbuild
> +++ b/tools/testing/nvdimm/Kbuild
> @@ -22,8 +22,8 @@ DRIVERS := ../../../drivers
> NVDIMM_SRC := $(DRIVERS)/nvdimm
> ACPI_SRC := $(DRIVERS)/acpi/nfit
> DAX_SRC := $(DRIVERS)/dax
> -ccflags-y := -I$(src)/$(NVDIMM_SRC)/
> -ccflags-y += -I$(src)/$(ACPI_SRC)/
> +ccflags-y := -I$(srctree)/drivers/nvdimm/
> +ccflags-y += -I$(srctree)/drivers/acpi/nfit/
>
> obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
> obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
> diff --git a/tools/testing/nvdimm/test/Kbuild b/tools/testing/nvdimm/test/Kbuild
> index fb3c3d7cdb9b..75baebf8f4ba 100644
> --- a/tools/testing/nvdimm/test/Kbuild
> +++ b/tools/testing/nvdimm/test/Kbuild
> @@ -1,6 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> -ccflags-y := -I$(src)/../../../../drivers/nvdimm/
> -ccflags-y += -I$(src)/../../../../drivers/acpi/nfit/
> +ccflags-y := -I$(srctree)/drivers/nvdimm/
> +ccflags-y += -I$(srctree)/drivers/acpi/nfit/
>
> obj-m += nfit_test.o
> obj-m += nfit_test_iomap.o
> --
> 2.24.1
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] tools/test/nvdimm: Fix out of tree build
2020-01-14 5:40 [PATCH] tools/test/nvdimm: Fix out of tree build Santosh Sivaraj
2020-03-14 1:21 ` Santosh Sivaraj
@ 2020-03-31 21:37 ` Dan Williams
1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2020-03-31 21:37 UTC (permalink / raw)
To: Santosh Sivaraj; +Cc: linux-nvdimm, Aneesh Kumar K . V
On Mon, Jan 13, 2020 at 9:41 PM Santosh Sivaraj <santosh@fossix.org> wrote:
>
> Out of tree build using
>
> make M=tools/test/nvdimm O=/tmp/build -C /tmp/build
>
> fails with the following error
>
> make: Entering directory '/tmp/build'
> CC [M] tools/testing/nvdimm/test/nfit.o
> linux/tools/testing/nvdimm/test/nfit.c:19:10: fatal error: nd-core.h: No such file or directory
> 19 | #include <nd-core.h>
> | ^~~~~~~~~~~
> compilation terminated.
>
> That is because the kbuild file uses $(src) which points to
> tools/testing/nvdimm, $(srctree) correctly points to root of the linux
> source tree.
Looks good to me, applied.
>
> Reported-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
> Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
> ---
> tools/testing/nvdimm/Kbuild | 4 ++--
> tools/testing/nvdimm/test/Kbuild | 4 ++--
> 2 files changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/testing/nvdimm/Kbuild b/tools/testing/nvdimm/Kbuild
> index 6aca8d5be159..0615fa3d9f7e 100644
> --- a/tools/testing/nvdimm/Kbuild
> +++ b/tools/testing/nvdimm/Kbuild
> @@ -22,8 +22,8 @@ DRIVERS := ../../../drivers
> NVDIMM_SRC := $(DRIVERS)/nvdimm
> ACPI_SRC := $(DRIVERS)/acpi/nfit
> DAX_SRC := $(DRIVERS)/dax
> -ccflags-y := -I$(src)/$(NVDIMM_SRC)/
> -ccflags-y += -I$(src)/$(ACPI_SRC)/
> +ccflags-y := -I$(srctree)/drivers/nvdimm/
> +ccflags-y += -I$(srctree)/drivers/acpi/nfit/
>
> obj-$(CONFIG_LIBNVDIMM) += libnvdimm.o
> obj-$(CONFIG_BLK_DEV_PMEM) += nd_pmem.o
> diff --git a/tools/testing/nvdimm/test/Kbuild b/tools/testing/nvdimm/test/Kbuild
> index fb3c3d7cdb9b..75baebf8f4ba 100644
> --- a/tools/testing/nvdimm/test/Kbuild
> +++ b/tools/testing/nvdimm/test/Kbuild
> @@ -1,6 +1,6 @@
> # SPDX-License-Identifier: GPL-2.0
> -ccflags-y := -I$(src)/../../../../drivers/nvdimm/
> -ccflags-y += -I$(src)/../../../../drivers/acpi/nfit/
> +ccflags-y := -I$(srctree)/drivers/nvdimm/
> +ccflags-y += -I$(srctree)/drivers/acpi/nfit/
>
> obj-m += nfit_test.o
> obj-m += nfit_test_iomap.o
> --
> 2.24.1
>
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-03-31 21:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14 5:40 [PATCH] tools/test/nvdimm: Fix out of tree build Santosh Sivaraj
2020-03-14 1:21 ` Santosh Sivaraj
2020-03-31 21:37 ` Dan Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).