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

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