History

C(ompaction|onsistency)

malc committed 6 years ago

Commit cd28ae11 parent 802cc6f1 file · +18 −27Browse files

Unified · Split

build.bash+18−27
@@ -48,17 +48,15 @@ isfresh "$mulibst" "$(eval $keycmd)" || ( · 47 unmodified lines
4848 ) && vecho "fresh mupdf"
4949
5050 oincs() {
51− local i=
52− local incs1=
53− local incs=
51+ local i incs1= incs=
5452 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";;
5856 *) ;;
5957 esac
6058 for i in $incs1; do
61− incs="$incs -I $srcd/$i -I $outd/$i"
59+ incs+=" -I $srcd/$i -I $outd/$i"
6260 done
6361 echo "-I $srcd -I $outd $incs"
6462 }
@@ -76,9 +74,9 @@ cflags() { · 11 unmodified lines
7674 version.o) f=-DLLPP_VERSION=$ver;;
7775 link.o)
7876 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
8280 ;;
8381
8482 */ml_*.o)
@@ -91,7 +89,7 @@ cflags() { · 6 unmodified lines
9189
9290 *) f="-g -O2";;
9391 esac
94− ! $darwin || f="$f -DGL_SILENCE_DEPRECATION"
92+ ! $darwin || f+=" -DGL_SILENCE_DEPRECATION"
9593 echo $f
9694 }
9795
@@ -142,12 +140,8 @@ bocaml1() { · 44 unmodified lines
142140 }
143141
144142 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
151145 local cmd="ocamlc -depend -bytecode -one-line $(oincs $o) $s"
152146 local keycmd="digest $o $s $o.depl"
153147
@@ -186,11 +180,8 @@ bocaml2() { · 32 unmodified lines
186180
187181 cycle=
188182 bocaml() {
189− local o="$1"
190− local n="$2"
183+ local s o="$1" n="$2" cycle1="$cycle"
191184 local wocmi="${o%.cmi}"
192− local s
193− local cycle1=$cycle
194185 case ${wocmi#$outd/} in
195186 confstruct.cmo)
196187 s=$outd/confstruct.ml
@@ -283,23 +274,23 @@ bocaml main.cmo 0 · 86 unmodified lines
283274 cobjs=
284275 for m in link cutils version; do
285276 bocamlc $m.o
286− cobjs="$cobjs $outd/$m.o"
277+ cobjs+=" $outd/$m.o"
287278 done
288279 for m in ml_gl ml_glarray ml_raw; do
289280 bocamlc lablGL/$m.o
290− cobjs="$cobjs $outd/lablGL/$m.o"
281+ cobjs+=" $outd/lablGL/$m.o"
291282 done
292283
293284 libs="str.cma unix.cma"
294285 clibs="-L$mudir/build/$mbt -lmupdf -lmupdf-third -lpthread"
295286 if $darwin; then
296287 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"
299290 bobjc wsi/cocoa/cocoa.o
300291 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"
303294 bocamlc wsi/x11/keysym2ucs.o
304295 bocamlc wsi/x11/xlib.o
305296 fi

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t