Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(160878)

Side by Side Diff: Modules/makesetup

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Modules/_ctypes/libffi_ios/x86/unix64_x86_64.S ('k') | Modules/mathmodule.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #! /bin/sh 1 #! /bin/sh
2 2
3 # Convert templates into Makefile and config.c, based on the module 3 # Convert templates into Makefile and config.c, based on the module
4 # definitions found in the file Setup. 4 # definitions found in the file Setup.
5 # 5 #
6 # Usage: makesetup [-s dir] [-c file] [-m file] [Setup] ... [-n [Setup] ...] 6 # Usage: makesetup [-s dir] [-c file] [-m file] [Setup] ... [-n [Setup] ...]
7 # 7 #
8 # Options: 8 # Options:
9 # -s directory: alternative source directory (default .) 9 # -s directory: alternative source directory (default .)
10 # -l directory: library source directory (default derived from $0) 10 # -l directory: library source directory (default derived from $0)
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 # to handle backslashes for sh's that don't automatically 121 # to handle backslashes for sh's that don't automatically
122 # continue a read when the last char is a backslash 122 # continue a read when the last char is a backslash
123 while echo $line | grep '\\$' > /dev/null 123 while echo $line | grep '\\$' > /dev/null
124 do 124 do
125 read extraline 125 read extraline
126 line=`echo $line| sed s/.$//`$extraline 126 line=`echo $line| sed s/.$//`$extraline
127 done 127 done
128 128
129 # Output DEFS in reverse order so first definition overrides 129 # Output DEFS in reverse order so first definition overrides
130 case $line in 130 case $line in
131 » » *=*)» DEFS="$line$NL$DEFS"; continue;; 131 » » [A-Z]*=*)» DEFS="$line$NL$DEFS"; continue;;
132 'include '*) DEFS="$line$NL$DEFS"; continue;; 132 'include '*) DEFS="$line$NL$DEFS"; continue;;
133 '*noobjects*') 133 '*noobjects*')
134 case $noobjects in 134 case $noobjects in
135 yes) ;; 135 yes) ;;
136 *) LOCALLIBS=$LIBS; LIBS=;; 136 *) LOCALLIBS=$LIBS; LIBS=;;
137 esac 137 esac
138 noobjects=yes; 138 noobjects=yes;
139 continue;; 139 continue;;
140 '*doconfig*') doconfig=yes; continue;; 140 '*doconfig*') doconfig=yes; continue;;
141 '*static*') doconfig=yes; continue;; 141 '*static*') doconfig=yes; continue;;
142 '*noconfig*') doconfig=no; continue;; 142 '*noconfig*') doconfig=no; continue;;
143 '*shared*') doconfig=no; continue;; 143 '*shared*') doconfig=no; continue;;
144 esac 144 esac
145 srcs= 145 srcs=
146 cpps= 146 cpps=
147 libs= 147 libs=
148 mods= 148 mods=
149 skip= 149 skip=
150 for arg in $line 150 for arg in $line
151 do 151 do
152 case $skip in 152 case $skip in
153 libs) libs="$libs $arg"; skip=; continue;; 153 libs) libs="$libs $arg"; skip=; continue;;
154 cpps) cpps="$cpps $arg"; skip=; continue;; 154 cpps) cpps="$cpps $arg"; skip=; continue;;
155 srcs) srcs="$srcs $arg"; skip=; continue;; 155 srcs) srcs="$srcs $arg"; skip=; continue;;
156 esac 156 esac
157 case $arg in 157 case $arg in
158 -framework) libs="$libs $arg"; skip=libs; 158 -framework) libs="$libs $arg"; skip=libs;
159 » » » » # OSX/OSXS/Darwin framework link cmd 159 » » » » # OSX/iOS/Darwin framework
160 ;; 160 ;;
161 » » » -[IDUCfF]*)» cpps="$cpps $arg";; 161 » » » -F*)» libs="$libs $arg"; skip=libs;
162 » » » » # OSX/iOS/Darwin framework directory
163 » » » » » ;;
164 » » » -[IDUCf]*)» cpps="$cpps $arg";;
162 -Xcompiler) skip=cpps;; 165 -Xcompiler) skip=cpps;;
163 -Xlinker) libs="$libs $arg"; skip=libs;; 166 -Xlinker) libs="$libs $arg"; skip=libs;;
164 -rpath) libs="$libs $arg"; skip=libs;; 167 -rpath) libs="$libs $arg"; skip=libs;;
165 --rpath) libs="$libs $arg"; skip=libs;; 168 --rpath) libs="$libs $arg"; skip=libs;;
166 -[A-Zl]*) libs="$libs $arg";; 169 -[A-Zl]*) libs="$libs $arg";;
167 *.a) libs="$libs $arg";; 170 *.a) libs="$libs $arg";;
168 *.so) libs="$libs $arg";; 171 *.so) libs="$libs $arg";;
169 *.sl) libs="$libs $arg";; 172 *.sl) libs="$libs $arg";;
170 /*.o) libs="$libs $arg";; 173 /*.o) libs="$libs $arg";;
171 *.def) libs="$libs $arg";; 174 *.def) libs="$libs $arg";;
172 *.o) srcs="$srcs `basename $arg .o`.c";; 175 *.o) srcs="$srcs `basename $arg .o`.c";;
173 *.[cC]) srcs="$srcs $arg";; 176 *.[cC]) srcs="$srcs $arg";;
174 *.m) srcs="$srcs $arg";; # Objective-C src 177 *.m) srcs="$srcs $arg";; # Objective-C src
175 *.cc) srcs="$srcs $arg";; 178 *.cc) srcs="$srcs $arg";;
176 *.c++) srcs="$srcs $arg";; 179 *.c++) srcs="$srcs $arg";;
177 *.cxx) srcs="$srcs $arg";; 180 *.cxx) srcs="$srcs $arg";;
178 *.cpp) srcs="$srcs $arg";; 181 *.cpp) srcs="$srcs $arg";;
182 *.S) srcs="$srcs $arg";;
179 \$*) libs="$libs $arg" 183 \$*) libs="$libs $arg"
180 cpps="$cpps $arg";; 184 cpps="$cpps $arg";;
181 *.*) echo 1>&2 "bad word $arg in $line" 185 *.*) echo 1>&2 "bad word $arg in $line"
182 exit 1;; 186 exit 1;;
183 -u) skip=libs; libs="$libs -u";; 187 -u) skip=libs; libs="$libs -u";;
184 [a-zA-Z_]*) mods="$mods $arg";; 188 [a-zA-Z_]*) mods="$mods $arg";;
185 *) echo 1>&2 "bad word $arg in $line" 189 *) echo 1>&2 "bad word $arg in $line"
186 exit 1;; 190 exit 1;;
187 esac 191 esac
188 done 192 done
189 case $doconfig in 193 case $doconfig in
190 yes) 194 yes)
191 LIBS="$LIBS $libs" 195 LIBS="$LIBS $libs"
192 MODS="$MODS $mods" 196 MODS="$MODS $mods"
193 ;; 197 ;;
194 esac 198 esac
195 case $noobjects in 199 case $noobjects in
196 yes) continue;; 200 yes) continue;;
197 esac 201 esac
198 objs='' 202 objs=''
199 for src in $srcs 203 for src in $srcs
200 do 204 do
201 case $src in 205 case $src in
202 *.c) obj=`basename $src .c`.o; cc='$(CC)';; 206 *.c) obj=`basename $src .c`.o; cc='$(CC)';;
203 *.cc) obj=`basename $src .cc`.o; cc='$(CXX)';; 207 *.cc) obj=`basename $src .cc`.o; cc='$(CXX)';;
204 *.c++) obj=`basename $src .c++`.o; cc='$(CXX)';; 208 *.c++) obj=`basename $src .c++`.o; cc='$(CXX)';;
205 *.C) obj=`basename $src .C`.o; cc='$(CXX)';; 209 *.C) obj=`basename $src .C`.o; cc='$(CXX)';;
206 *.cxx) obj=`basename $src .cxx`.o; cc='$(CXX)';; 210 *.cxx) obj=`basename $src .cxx`.o; cc='$(CXX)';;
207 *.cpp) obj=`basename $src .cpp`.o; cc='$(CXX)';; 211 *.cpp) obj=`basename $src .cpp`.o; cc='$(CXX)';;
212 *.S) obj=`basename $src .S`.o; cc='$(CC)';; # Assembly
208 *.m) obj=`basename $src .m`.o; cc='$(CC)';; # Obj-C 213 *.m) obj=`basename $src .m`.o; cc='$(CC)';; # Obj-C
209 *) continue;; 214 *) continue;;
210 esac 215 esac
211 obj="$srcdir/$obj" 216 obj="$srcdir/$obj"
212 objs="$objs $obj" 217 objs="$objs $obj"
213 case $src in 218 case $src in
214 glmodule.c) ;; 219 glmodule.c) ;;
215 /*) ;; 220 /*) ;;
216 \$*) ;; 221 \$*) ;;
217 *) src='$(srcdir)/'"$srcdir/$src";; 222 *) src='$(srcdir)/'"$srcdir/$src";;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 echo "s%_MODLIBS_%$LIBS%" >>$sedf 289 echo "s%_MODLIBS_%$LIBS%" >>$sedf
285 echo "/Definitions added by makesetup/a$NL$NL$DEFS" >>$sedf 290 echo "/Definitions added by makesetup/a$NL$NL$DEFS" >>$sedf
286 sed -f $sedf $makepre >Makefile 291 sed -f $sedf $makepre >Makefile
287 cat $rulesf >>Makefile 292 cat $rulesf >>Makefile
288 rm -f $sedf 293 rm -f $sedf
289 ;; 294 ;;
290 esac 295 esac
291 296
292 rm -f $rulesf 297 rm -f $rulesf
293 ) 298 )
OLDNEW
« no previous file with comments | « Modules/_ctypes/libffi_ios/x86/unix64_x86_64.S ('k') | Modules/mathmodule.c » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+