* [PATCH] KBUILD: Create the source symlink earlier in the objdir
@ 2009-01-10 3:56 Andi Kleen
2009-02-15 10:36 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2009-01-10 3:56 UTC (permalink / raw)
To: sam, linux-kbuild, linux-kernel
KBUILD: Create the source symlink earlier in the objdir
It's useful to already have the source symlink in a
objdir when one just runs make *config. Then one
can do
mkdir obj-allyes
cd obj-allyes
make -C ../sourcedir O=$(pwd) allyesconfig
./source/scripts/config --disable debug_info
make CC=icecc -j18
without having to interrupt the make first just to
get the source symlink.
Signed-off-by: Andi Kleen <ak@linux.intel.com>
---
Makefile | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6.28-kbuild/Makefile
===================================================================
--- linux-2.6.28-kbuild.orig/Makefile 2009-01-07 22:16:49.000000000 +0100
+++ linux-2.6.28-kbuild/Makefile 2009-01-10 04:50:53.000000000 +0100
@@ -383,6 +383,7 @@
# output directory.
outputmakefile:
ifneq ($(KBUILD_SRC),)
+ @ln -fsn $(srctree) $(objtree)/source
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
endif
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KBUILD: Create the source symlink earlier in the objdir
2009-01-10 3:56 [PATCH] KBUILD: Create the source symlink earlier in the objdir Andi Kleen
@ 2009-02-15 10:36 ` Sam Ravnborg
2009-02-15 11:16 ` Andi Kleen
0 siblings, 1 reply; 4+ messages in thread
From: Sam Ravnborg @ 2009-02-15 10:36 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kbuild, linux-kernel
On Sat, Jan 10, 2009 at 04:56:13AM +0100, Andi Kleen wrote:
> KBUILD: Create the source symlink earlier in the objdir
>
> It's useful to already have the source symlink in a
> objdir when one just runs make *config. Then one
> can do
>
> mkdir obj-allyes
> cd obj-allyes
> make -C ../sourcedir O=$(pwd) allyesconfig
> ./source/scripts/config --disable debug_info
> make CC=icecc -j18
>
> without having to interrupt the make first just to
> get the source symlink.
>
> Signed-off-by: Andi Kleen <ak@linux.intel.com>
>
> ---
> Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
>
> Index: linux-2.6.28-kbuild/Makefile
> ===================================================================
> --- linux-2.6.28-kbuild.orig/Makefile 2009-01-07 22:16:49.000000000 +0100
> +++ linux-2.6.28-kbuild/Makefile 2009-01-10 04:50:53.000000000 +0100
> @@ -383,6 +383,7 @@
> # output directory.
> outputmakefile:
> ifneq ($(KBUILD_SRC),)
> + @ln -fsn $(srctree) $(objtree)/source
> $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
> $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
> endif
But we do not want to create this symlink in two places.
So the following is better:
Sam
diff --git a/Makefile b/Makefile
index 22d7584..76ee131 100644
--- a/Makefile
+++ b/Makefile
@@ -388,6 +388,7 @@ PHONY += outputmakefile
# separate output directory. This allows convenient use of make in the
# output directory.
outputmakefile:
+ $(Q)ln -fsn $(srctree) source
ifneq ($(KBUILD_SRC),)
$(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
$(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
@@ -946,7 +947,6 @@ ifneq ($(KBUILD_SRC),)
mkdir -p include2; \
ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \
fi
- ln -fsn $(srctree) source
endif
# prepare2 creates a makefile if using a separate output directory
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] KBUILD: Create the source symlink earlier in the objdir
2009-02-15 10:36 ` Sam Ravnborg
@ 2009-02-15 11:16 ` Andi Kleen
2009-02-15 11:41 ` Sam Ravnborg
0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2009-02-15 11:16 UTC (permalink / raw)
To: Sam Ravnborg; +Cc: Andi Kleen, linux-kbuild, linux-kernel
> diff --git a/Makefile b/Makefile
> index 22d7584..76ee131 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -388,6 +388,7 @@ PHONY += outputmakefile
> # separate output directory. This allows convenient use of make in the
> # output directory.
> outputmakefile:
> + $(Q)ln -fsn $(srctree) source
> ifneq ($(KBUILD_SRC),)
Haven't tried it, but
doesn't that create the symlink in the non separate objdir case too
because it's outside the ifneq?
> $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \
> $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)
> @@ -946,7 +947,6 @@ ifneq ($(KBUILD_SRC),)
> mkdir -p include2; \
> ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \
> fi
> - ln -fsn $(srctree) source
> endif
-Andi
--
ak@linux.intel.com -- Speaking for myself only.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] KBUILD: Create the source symlink earlier in the objdir
2009-02-15 11:16 ` Andi Kleen
@ 2009-02-15 11:41 ` Sam Ravnborg
0 siblings, 0 replies; 4+ messages in thread
From: Sam Ravnborg @ 2009-02-15 11:41 UTC (permalink / raw)
To: Andi Kleen; +Cc: linux-kbuild, linux-kernel
On Sun, Feb 15, 2009 at 12:16:08PM +0100, Andi Kleen wrote:
> > diff --git a/Makefile b/Makefile
> > index 22d7584..76ee131 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -388,6 +388,7 @@ PHONY += outputmakefile
> > # separate output directory. This allows convenient use of make in the
> > # output directory.
> > outputmakefile:
> > + $(Q)ln -fsn $(srctree) source
> > ifneq ($(KBUILD_SRC),)
>
> Haven't tried it, but
> doesn't that create the symlink in the non separate objdir case too
> because it's outside the ifneq?
Yep - thanks for spotting it!
Sam
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-02-15 11:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-10 3:56 [PATCH] KBUILD: Create the source symlink earlier in the objdir Andi Kleen
2009-02-15 10:36 ` Sam Ravnborg
2009-02-15 11:16 ` Andi Kleen
2009-02-15 11:41 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox