stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Makefile: One last adjustment to relative paths
@ 2014-08-25  8:50 Boaz Harrosh
  2014-08-25 13:40 ` Michal Marek
  0 siblings, 1 reply; 3+ messages in thread
From: Boaz Harrosh @ 2014-08-25  8:50 UTC (permalink / raw)
  To: Michal Marek, Stable Tree, linux-kernel; +Cc: David Howells

From: Boaz Harrosh <boaz@plexistor.com>

I have one last problem when compiling under an IDE. This
time it is when I compile linux under another Makefile
with the use of
	make -C linux

The make command is run from /home/boaz/dev/
What the IDE will see is:
make[1]: Entering directory `/home/boaz/dev/linux-open-osd'

	This one is from the external make dev/Makefile

make[1]: Entering directory `.build_um'

       ^ This one is emulated by Linux Makefile
       ...

make[1]: Entering directory `.build_um'

       ^ This one is emulated by Linux Makefile again
error: ../foo/baz.c:XXX
       ...

The IDE will look for ../foo/baz.c at
	/home/boaz/dev/.build_um/../foo/baz.c ==
	/home/boaz/dev/foo/baz.c

This is because make will always print its "Entering directory"
full path or relative to the original make command, this is
make -C rules.

the simple fix is to have "Entering directory" print full path.

[Stable needed for 3.16]
CC: Stable Tree <stable@vger.kernel.org>
Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 6b27741..973c48f 100644
--- a/Makefile
+++ b/Makefile
@@ -178,7 +178,7 @@ $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
  quiet_echodir := @echo
 silent_echodir := @:
 sub-make: FORCE
-	$($(quiet)echodir) "make[1]: Entering directory \`$(KBUILD_OUTPUT)'"
+	$($(quiet)echodir) "make[1]: Entering directory \`$(CURDIR)/$(KBUILD_OUTPUT)'"
 	$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
 	KBUILD_SRC=$(CURDIR) \
 	KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \
-- 
1.9.3


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Makefile: One last adjustment to relative paths
  2014-08-25  8:50 [PATCH] Makefile: One last adjustment to relative paths Boaz Harrosh
@ 2014-08-25 13:40 ` Michal Marek
  2014-08-26 14:24   ` Boaz Harrosh
  0 siblings, 1 reply; 3+ messages in thread
From: Michal Marek @ 2014-08-25 13:40 UTC (permalink / raw)
  To: Boaz Harrosh, Stable Tree, linux-kernel; +Cc: David Howells

On 2014-08-25 10:50, Boaz Harrosh wrote:
> the simple fix is to have "Entering directory" print full path.
> 
> [Stable needed for 3.16]
> CC: Stable Tree <stable@vger.kernel.org>
> Signed-off-by: Boaz Harrosh <boaz@plexistor.com>
> ---
>  Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/Makefile b/Makefile
> index 6b27741..973c48f 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -178,7 +178,7 @@ $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make
>   quiet_echodir := @echo
>  silent_echodir := @:
>  sub-make: FORCE
> -	$($(quiet)echodir) "make[1]: Entering directory \`$(KBUILD_OUTPUT)'"
> +	$($(quiet)echodir) "make[1]: Entering directory \`$(CURDIR)/$(KBUILD_OUTPUT)'"

KBUILD_OUTPUT is converted to an absolute path a few lines earlier:

KBUILD_OUTPUT := $(shell mkdir -p $(KBUILD_OUTPUT) && cd $(KBUILD_OUTPUT) \
								&& /bin/pwd)

So I don't understand why are you getting a message with a relative
path. I get an absolute path as expected here:
$ mkdir aaa
$ make O=aaa defconfig
make[1]: Entering directory `/home/mmarek/linux-2.6/aaa'
...

Michal

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Makefile: One last adjustment to relative paths
  2014-08-25 13:40 ` Michal Marek
@ 2014-08-26 14:24   ` Boaz Harrosh
  0 siblings, 0 replies; 3+ messages in thread
From: Boaz Harrosh @ 2014-08-26 14:24 UTC (permalink / raw)
  To: Michal Marek, Stable Tree, linux-kernel; +Cc: David Howells

On 08/25/2014 04:40 PM, Michal Marek wrote:
> 
> So I don't understand why are you getting a message with a relative
> path. I get an absolute path as expected here:
> $ mkdir aaa
> $ make O=aaa defconfig
> make[1]: Entering directory `/home/mmarek/linux-2.6/aaa'

OK that was an operator error. You are absolutely right

What happened is that my makefile was using
	make KBUILD_OUTPUT=.build_um -C linux
and not
	make O=.build_um -C linux

This was done at the time because when building out-of-tree
modules (I Have some test modules that I build in my project)
You must use KBUILD_OUTPUT= because O= is used by the external
module build system.

But reverting to use the O= as it should be all is well
and it works as you say

Sorry for the noise
Boaz


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-26 14:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-25  8:50 [PATCH] Makefile: One last adjustment to relative paths Boaz Harrosh
2014-08-25 13:40 ` Michal Marek
2014-08-26 14:24   ` Boaz Harrosh

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).