KBUILD: Create the source symlink earlier in the objdir
PATCH 1/1 KBUILD: Create the source symlink earlier in the objdir
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.
--- Makefile | 1 + 1 file changed, 1 insertion(+)
Makefile +1 -0
@@ -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
Quoted 27 lines · Andi Kleen
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 --disabledebug_info
make CC=icecc -j18without having to interrupt the make first just to get the source symlink.
Signed-off-by Andi Kleen <[email protected]>--- Makefile | 1 + 1 file changed, 1 insertion(+)Index: linux-2.6.28-kbuild/Makefile
===================================================================
Makefile line 389
Quoted 7 lines
Makefile +1
-0@@ -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
Makefile +1 -1
@@ -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
Makefile PHONY += outputmakefile · line 392
Quoted 10 lines
Makefile +1
-0@@ -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?
Makefile ifneq ($(KBUILD_SRC),) · line 950
Quoted 8 lines
Makefile +0
-1$(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
Signature · 1 line
[email protected] -- Speaking for myself only.
Quoted 6 lines · Andi Kleen
Quoted 6 lines
Makefile +0
-0@@ -388,6 +388,7 @@ PHONY += outputmakefile # separate output directory. This allows convenient use of make in the
Quoted 8 lines
Makefile PHONY += outputmakefile · line 392
Quoted 4 lines
Makefile +1
-0# 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