[PATCH] [2/3] KBUILD: Add a symlink to the source for separate objdirs

Andi Kleen
2009-01-03T02:20:15Z

I have some scripts which need to map back to the source directory
from an objdir. This was so far done by parsing the Makefile,
but the Makefile format changes occasionally and breaks my scripts
then.

To make this more reliable add a "source" symlink back.

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 2008-12-27 16:45:43.000000000 +0100
+++ linux-2.6.28-kbuild/Makefile 2008-12-31 20:26:27.000000000 +0100
@@ -936,6 +936,7 @@
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