tools/dma: fix building with O=
Subsystems (2)
Sasha Levin
maintainerPATCH 1/1 tools/dma: fix building with O=
With O= set, "all" depends on $(OUTPUT)dma_map_benchmark, but the only rule builds dma_map_benchmark in the source directory, and built-in rules are disabled:
make: *** No rule to make target '<O>/dma_map_benchmark', needed by 'all'. Stop.
Build $(OUTPUT)dma_map_benchmark.
--- tools/dma/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
tools/dma/Makefile +2 -2
@@ -38,8 +38,8 @@ prepare: $(OUTPUT)include/linux/map_benchmark.h FORCE: DMA_MAP_BENCHMARK = dma_map_benchmark -$(DMA_MAP_BENCHMARK): prepare FORCE - $(CC) $(CFLAGS) $(DMA_MAP_BENCHMARK).c -o $(DMA_MAP_BENCHMARK) +$(OUTPUT)$(DMA_MAP_BENCHMARK): prepare FORCE + $(CC) $(CFLAGS) $(DMA_MAP_BENCHMARK).c -o $@ clean: rm -f $(ALL_PROGRAMS)
Signature · 1 line
2.53.0
Quoted 21 lines · Sasha Levin
With O= set, "all" depends on $(OUTPUT)dma_map_benchmark, but the only rule builds
dma_map_benchmarkin the source directory, and built-in rules are disabled:make: *** No rule to make target '<O>/dma_map_benchmark', needed by 'all'. Stop.
Build $(OUTPUT)dma_map_benchmark.
Fixes f74ee32963f1b ("tools/dma: move dma_map_benchmark from selftests to tools/dma")Assisted-by LLMSigned-off-by Sasha Levin <[email protected]>--- tools/dma/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)tools/dma/Makefile +0
-0
tools/dma/Makefile prepare: $(OUTPUT)include/linux/map_benchmark.h · line 45
Quoted 10 lines
tools/dma/Makefile +2
-2@@ -38,8 +38,8 @@ prepare: $(OUTPUT)include/linux/map_benchmark.h FORCE: DMA_MAP_BENCHMARK = dma_map_benchmark -$(DMA_MAP_BENCHMARK): prepare FORCE - $(CC) $(CFLAGS) $(DMA_MAP_BENCHMARK).c -o $(DMA_MAP_BENCHMARK) +$(OUTPUT)$(DMA_MAP_BENCHMARK): prepare FORCE + $(CC) $(CFLAGS) $(DMA_MAP_BENCHMARK).c -o $@ clean: rm -f $(ALL_PROGRAMS)
Signature · 2 lines
Thanks, Qinxin
Marek Szyprowski
AppliedQuoted 4 lines · Sasha Levin
With O= set, "all" depends on $(OUTPUT)dma_map_benchmark, but the only rule builds
dma_map_benchmarkin the source directory, and built-in rules are disabled:
Quoted 8 lines
make: *** No rule to make target '<O>/dma_map_benchmark', needed by 'all'. Stop.
Build $(OUTPUT)dma_map_benchmark.
Fixes f74ee32963f1b ("tools/dma: move dma_map_benchmark from selftests to tools/dma")Assisted-by LLMSigned-off-by Sasha Levin <[email protected]>
Applied to dma-mapping-for-next. Thanks!
Best regards
Signature · 2 lines
Marek Szyprowski, PhD Samsung R&D Institute Poland