fix gen_links.sh: don't include source dir as link target
First of all, use one common place to define the gen_links() macro, in
gen_links.sh.inc.
In this new file, add a 'shift' to exclude the $DIR arg from also appearing in
$FILES.
This prevents the following wrong symlinks in the source dirs:
M3UA_CNL113537/src/src
MTP3asp_CNL113337/src/src
SCCP_CNL113341/src/src
Change-Id: Ia8493e77df1ba8723f2c5d2a49816247b0fb55f7
diff --git a/gen_links.sh.inc b/gen_links.sh.inc
new file mode 100644
index 0000000..2fcb9d1
--- /dev/null
+++ b/gen_links.sh.inc
@@ -0,0 +1,12 @@
+#!dont_run_this
+# This file is sourced by */gen_links.sh
+
+gen_links() {
+ DIR=$1
+ shift
+ FILES=$*
+ for f in $FILES; do
+ echo "Linking $f"
+ ln -sf $DIR/$f $f
+ done
+}