Skip to contentSkip to conversation

build: Fix missing MAKEFLAGS --no-print-directory

PATCH In review Anthony PERARD 3 participants 3 messages Aug 17, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 build: Fix missing MAKEFLAGS --no-print-directory

While we already have "--no-print-directory" added to the make flags in some cases, there's one case where the flags is missing, when doing an out-of-tree build with O=, e.g.
cd xen; make O=build

Without it, we just have loads of "Entering directory" and "Leaving directory" with the same directory.

The comment and location in the Makefile are copied from Linux.

---
 xen/Makefile | 5 +++++
 1 file changed, 5 insertions(+)
xen/Makefile +5 -0
index 69b4dc960f..106aff6a07 100644
@@ -186,6 +186,11 @@ endif # root-make-done
 # We process the rest of the Makefile if this is the final invocation of make
 ifeq ($(need-sub-make),)
 
+# Do not print "Entering directory ...",
+# but we want to display it when entering to the output directory
+# so that IDEs/editors are able to understand relative filenames.
+MAKEFLAGS += --no-print-directory
+
 ifeq ($(abs_srctree),$(abs_objtree))
     # building in the source tree
     srctree := .
Signature · 1 line
Anthony PERARD
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Anthony Perard

While we already have "--no-print-directory" added to the make flags in some cases, there's one case where the flags is missing, when doing an out-of-tree build with O=, e.g.
cd xen; make O=build

Quoted 7 lines

Without it, we just have loads of "Entering directory" and "Leaving directory" with the same directory.

The comment and location in the Makefile are copied from Linux.

Acked-by on v1 1/1
#2 lore raw
In reply to Anthony PERARD
Quoted 5 lines · Anthony PERARD

While we already have "--no-print-directory" added to the make flags in some cases, there's one case where the flags is missing, when doing an out-of-tree build with O=, e.g.
cd xen; make O=build

Quoted 7 lines

Without it, we just have loads of "Entering directory" and "Leaving directory" with the same directory.

The comment and location in the Makefile are copied from Linux.