Unified · Split
| @@ -48,17 +48,15 @@ isfresh "$mulibst" "$(eval $keycmd)" || ( · 47 unmodified lines | ||
| 48 | 48 | ) && vecho "fresh mupdf" |
| 49 | 49 | |
| 50 | 50 | oincs() { |
| 51 | − local i= | |
| 52 | − local incs1= | |
| 53 | − local incs= | |
| 51 | + local i incs1= incs= | |
| 54 | 52 | case "${1#$outd/}" in |
| 55 | − lablGL/*) incs1="$incs1 lablGL";; | |
| 56 | − main.cmo) incs1="$incs1 $wsid lablGL";; | |
| 57 | − glutils.cmo|listview.cmo) incs1="$incs1 lablGL";; | |
| 53 | + lablGL/*) incs1="lablGL";; | |
| 54 | + main.cmo) incs1="$wsid lablGL";; | |
| 55 | + glutils.cmo|listview.cmo) incs1="lablGL";; | |
| 58 | 56 | *) ;; |
| 59 | 57 | esac |
| 60 | 58 | for i in $incs1; do |
| 61 | − incs="$incs -I $srcd/$i -I $outd/$i" | |
| 59 | + incs+=" -I $srcd/$i -I $outd/$i" | |
| 62 | 60 | done |
| 63 | 61 | echo "-I $srcd -I $outd $incs" |
| 64 | 62 | } |
| @@ -76,9 +74,9 @@ cflags() { · 11 unmodified lines | ||
| 76 | 74 | version.o) f=-DLLPP_VERSION=$ver;; |
| 77 | 75 | link.o) |
| 78 | 76 | f="-g -std=c99 -O2 $muinc -Wall -Werror -Wextra -pedantic" |
| 79 | − f="$f -DCACHE_PAGEREFS" | |
| 80 | − $darwin && f="$f -DCIDER -D_GNU_SOURCE" \ | |
| 81 | − || f="$f -D_POSIX_C_SOURCE" # needed for fdopen | |
| 77 | + f+=" -DCACHE_PAGEREFS" | |
| 78 | + $darwin && f+=" -DCIDER -D_GNU_SOURCE" \ | |
| 79 | + || f+=" -D_POSIX_C_SOURCE" # needed for fdopen | |
| 82 | 80 | ;; |
| 83 | 81 | |
| 84 | 82 | */ml_*.o) |
| @@ -91,7 +89,7 @@ cflags() { · 6 unmodified lines | ||
| 91 | 89 | |
| 92 | 90 | *) f="-g -O2";; |
| 93 | 91 | esac |
| 94 | − ! $darwin || f="$f -DGL_SILENCE_DEPRECATION" | |
| 92 | + ! $darwin || f+=" -DGL_SILENCE_DEPRECATION" | |
| 95 | 93 | echo $f |
| 96 | 94 | } |
| 97 | 95 | |
| @@ -142,12 +140,8 @@ bocaml1() { · 44 unmodified lines | ||
| 142 | 140 | } |
| 143 | 141 | |
| 144 | 142 | bocaml2() { |
| 145 | − local n=$1 | |
| 146 | − local s="$2" | |
| 147 | − local o="$3" | |
| 148 | − local O=${4-} | |
| 149 | − local d | |
| 150 | − local dd | |
| 143 | + local n=$1 s="$2" o="$3" O=${4-} | |
| 144 | + local d dd | |
| 151 | 145 | local cmd="ocamlc -depend -bytecode -one-line $(oincs $o) $s" |
| 152 | 146 | local keycmd="digest $o $s $o.depl" |
| 153 | 147 | |
| @@ -186,11 +180,8 @@ bocaml2() { · 32 unmodified lines | ||
| 186 | 180 | |
| 187 | 181 | cycle= |
| 188 | 182 | bocaml() { |
| 189 | − local o="$1" | |
| 190 | − local n="$2" | |
| 183 | + local s o="$1" n="$2" cycle1="$cycle" | |
| 191 | 184 | local wocmi="${o%.cmi}" |
| 192 | − local s | |
| 193 | − local cycle1=$cycle | |
| 194 | 185 | case ${wocmi#$outd/} in |
| 195 | 186 | confstruct.cmo) |
| 196 | 187 | s=$outd/confstruct.ml |
| @@ -283,23 +274,23 @@ bocaml main.cmo 0 · 86 unmodified lines | ||
| 283 | 274 | cobjs= |
| 284 | 275 | for m in link cutils version; do |
| 285 | 276 | bocamlc $m.o |
| 286 | − cobjs="$cobjs $outd/$m.o" | |
| 277 | + cobjs+=" $outd/$m.o" | |
| 287 | 278 | done |
| 288 | 279 | for m in ml_gl ml_glarray ml_raw; do |
| 289 | 280 | bocamlc lablGL/$m.o |
| 290 | − cobjs="$cobjs $outd/lablGL/$m.o" | |
| 281 | + cobjs+=" $outd/lablGL/$m.o" | |
| 291 | 282 | done |
| 292 | 283 | |
| 293 | 284 | libs="str.cma unix.cma" |
| 294 | 285 | clibs="-L$mudir/build/$mbt -lmupdf -lmupdf-third -lpthread" |
| 295 | 286 | if $darwin; then |
| 296 | 287 | mcomp=$(ocamlc -config | grep bytecomp_c_co | { read _ c; echo $c; }) |
| 297 | − clibs="$clibs -framework Cocoa -framework OpenGL" | |
| 298 | − cobjs="$cobjs $outd/wsi/cocoa/cocoa.o" | |
| 288 | + clibs+=" -framework Cocoa -framework OpenGL" | |
| 289 | + cobjs+=" $outd/wsi/cocoa/cocoa.o" | |
| 299 | 290 | bobjc wsi/cocoa/cocoa.o |
| 300 | 291 | else |
| 301 | − clibs="$clibs -lGL -lX11" | |
| 302 | − cobjs="$cobjs $outd/wsi/x11/keysym2ucs.o $outd/wsi/x11/xlib.o" | |
| 292 | + clibs+=" -lGL -lX11" | |
| 293 | + cobjs+=" $outd/wsi/x11/keysym2ucs.o $outd/wsi/x11/xlib.o" | |
| 303 | 294 | bocamlc wsi/x11/keysym2ucs.o |
| 304 | 295 | bocamlc wsi/x11/xlib.o |
| 305 | 296 | fi |