]> Zhao Yanbai Git Server - minix.git/commitdiff
llvm: Fix module map generation. 30/3130/1
authorCristiano Giuffrida <giuffrida@cs.vu.nl>
Mon, 29 Sep 2014 07:36:13 +0000 (09:36 +0200)
committerDavid van Moolenbroek <david@minix3.org>
Thu, 17 Sep 2015 13:48:40 +0000 (13:48 +0000)
Change-Id: If9c2bef4c0ef3d002ac65a2c66aabcf0cf99ff95

minix/llvm/minix.inc

index 242e2824605a9e95a22e45328c71de375d39dc77..88c5f649e1bf477312baa6139208fc88883f63c7 100644 (file)
@@ -20,6 +20,16 @@ function generate_modules_map()
        echo "Generating Minix modules map..." 1>&2
        cd ${MINIX_ROOT}
        grep -r "^PROG=" . --include=Makefile | sed -e "s/\s*//g" | sed -e "s/PROG=//g" > ${TMPFILE}
+       grep -r "^PROGS=" . --include=Makefile | sed -e "s/\s\s*/ /g" | sed -e "s/PROGS=//g" | sed -e "s/\.\///g" | (
+               while read line; do
+                       path=$(echo $line | cut -d' ' -f 1)
+                       progs=$(echo $line | cut -d' ' -f 2-)
+                       for p in $progs
+                       do
+                               echo $path$p
+                       done
+               done
+       ) >> ${TMPFILE}
 
        cat ${TMPFILE} | sed -e "s/\.\///g" > ${TMPFILE}.1