FreeCalypso > hg > fc-selenite
comparison scripts/mk-component.sh @ 20:889745bf8615
scripts/mk-component.sh: no more str2ind
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Sun, 15 Jul 2018 22:14:07 +0000 |
parents | 294b440431fe |
children | b7059379dd87 |
comparison
equal
deleted
inserted
replaced
19:294b440431fe | 20:889745bf8615 |
---|---|
63 >> $BUILD_DIR/$LIBNAME/Makefile | 63 >> $BUILD_DIR/$LIBNAME/Makefile |
64 echo >> $BUILD_DIR/$LIBNAME/Makefile | 64 echo >> $BUILD_DIR/$LIBNAME/Makefile |
65 OBJS="$OBJS $objname" | 65 OBJS="$OBJS $objname" |
66 } | 66 } |
67 | 67 |
68 cfile_plain() { | 68 c_file() { |
69 if [ $# != 1 ] | 69 if [ $# != 1 ] |
70 then | 70 then |
71 echo "Error: cfile_plain takes 1 argument" 1>&2 | 71 echo "Error: c_file takes 1 argument" 1>&2 |
72 exit 1 | 72 exit 1 |
73 fi | 73 fi |
74 objname=`basename "$1" .c`.obj | 74 objname=`basename "$1" .c`.obj |
75 helpers/makeline dep $objname "$1" >> $BUILD_DIR/$LIBNAME/Makefile | 75 helpers/makeline dep $objname "$1" >> $BUILD_DIR/$LIBNAME/Makefile |
76 case "$objname" in | 76 case "$objname" in |
90 esac | 90 esac |
91 echo >> $BUILD_DIR/$LIBNAME/Makefile | 91 echo >> $BUILD_DIR/$LIBNAME/Makefile |
92 OBJS="$OBJS $objname" | 92 OBJS="$OBJS $objname" |
93 } | 93 } |
94 | 94 |
95 cfile_str2ind() { | |
96 if [ $# != 1 ] | |
97 then | |
98 echo "Error: cfile_str2ind takes 1 argument" 1>&2 | |
99 exit 1 | |
100 fi | |
101 if [ "$USE_STR2IND" = 1 ] | |
102 then | |
103 objname=`basename "$1" .c`.obj | |
104 pp_name=`echo $1 | sed -e 's/\.c$/.pp/' | tr A-Z a-z` | |
105 pp__name=`echo $1 | sed -e 's/\.c$/.pp_/' | tr A-Z a-z` | |
106 helpers/makeline dep $objname "$1" \ | |
107 >> $BUILD_DIR/$LIBNAME/Makefile | |
108 case "$objname" in | |
109 *[A-Z]*) | |
110 helpers/makeline cmd rm -f '$@' \ | |
111 >> $BUILD_DIR/$LIBNAME/Makefile | |
112 ;; | |
113 esac | |
114 helpers/makeline cmd ../../toolwrap/cl470 -q -po -p? -x \ | |
115 ${CPPFLAGS} "$1" >> $BUILD_DIR/$LIBNAME/Makefile | |
116 helpers/makeline cmd ../../toolwrap/str2ind -a \ | |
117 -t ../str2ind.tab -l ../str2ind.log \ | |
118 -f "$pp_name" >> $BUILD_DIR/$LIBNAME/Makefile | |
119 helpers/makeline cmd ../../toolwrap/cl470 -q -c ${CFLAGS} \ | |
120 "$pp__name" >> $BUILD_DIR/$LIBNAME/Makefile | |
121 helpers/makeline cmd @rm -f "$pp_name" \ | |
122 >> $BUILD_DIR/$LIBNAME/Makefile | |
123 helpers/makeline cmd @rm -f "$pp__name" \ | |
124 >> $BUILD_DIR/$LIBNAME/Makefile | |
125 case "$objname" in | |
126 *[A-Z]*) | |
127 objname_lc=`echo $objname | tr A-Z a-z` | |
128 helpers/makeline cmd mv $objname_lc $objname \ | |
129 >> $BUILD_DIR/$LIBNAME/Makefile | |
130 ;; | |
131 esac | |
132 echo >> $BUILD_DIR/$LIBNAME/Makefile | |
133 OBJS="$OBJS $objname" | |
134 else | |
135 cfile_plain "$1" | |
136 fi | |
137 } | |
138 | |
139 # invoke the recipe | 95 # invoke the recipe |
140 | 96 |
141 SRC=../../src | 97 SRC=../../src |
142 OBJS= | 98 OBJS= |
143 . "$recipe_file" | 99 . "$recipe_file" |