Unified · Split
| @@ -95,7 +95,7 @@ mflags() { · 94 unmodified lines | |||
| 95 | } | 95 | } |
| 96 | 96 | ||
| 97 | overs="$(ocamlc -vnum 2>/dev/null)" || overs="" | 97 | overs="$(ocamlc -vnum 2>/dev/null)" || overs="" |
| 98 | test "$overs" = "4.12.0" || { | 98 | if test "$overs" != "4.12.0"; then |
| 99 | url=https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-4.12.0.tar.xz | 99 | url=https://caml.inria.fr/pub/distrib/ocaml-4.12/ocaml-4.12.0.tar.xz |
| 100 | txz=$outd/$(basename $url) | 100 | txz=$outd/$(basename $url) |
| 101 | keycmd="printf $url; digest $txz;" | 101 | keycmd="printf $url; digest $txz;" |
| @@ -127,7 +127,7 @@ test "$overs" = "4.12.0" || { · 25 unmodified lines | |||
| 127 | eval $keycmd >$absprefix/bin/ocamlc.past | 127 | eval $keycmd >$absprefix/bin/ocamlc.past |
| 128 | ) && vecho "fresh ocamlc" | 128 | ) && vecho "fresh ocamlc" |
| 129 | overs=$(ocamlc -vnum 2>/dev/null) | 129 | overs=$(ocamlc -vnum 2>/dev/null) |
| 130 | } | 130 | fi |
| 131 | 131 | ||
| 132 | while read k v; do | 132 | while read k v; do |
| 133 | case "$k" in | 133 | case "$k" in |
| @@ -139,10 +139,10 @@ done < <(ocamlc -config) · 5 unmodified lines | |||
| 139 | cvers=$($ccomp --version | { read v; echo $v; }) | 139 | cvers=$($ccomp --version | { read v; echo $v; }) |
| 140 | 140 | ||
| 141 | bocaml1() { | 141 | bocaml1() { |
| 142 | grep -q "$3" $outd/ordered || { | 142 | if ! grep -q "$3" $outd/ordered; then |
| 143 | bocaml2 "$@" | 143 | bocaml2 "$@" |
| 144 | echo "$3" >>"$outd/ordered" | 144 | echo "$3" >>"$outd/ordered" |
| 145 | } | 145 | fi |
| 146 | } | 146 | } |
| 147 | 147 | ||
| 148 | bocaml2() { | 148 | bocaml2() { |
| @@ -156,10 +156,10 @@ bocaml2() { · 7 unmodified lines | |||
| 156 | local O=${o#$outd/} | 156 | local O=${o#$outd/} |
| 157 | for d in $depl; do | 157 | for d in $depl; do |
| 158 | local D=${d##$srcd/} | 158 | local D=${d##$srcd/} |
| 159 | test "${O%%.cmo}" = "${D%%.cmi}" || { | 159 | if test "${O%%.cmo}" != "${D%%.cmi}"; then |
| 160 | test "$d" = "$outd/confstruct.cmo" || d=$outd/${d#$srcd/} | 160 | test "$d" = "$outd/confstruct.cmo" || d=$outd/${d#$srcd/} |
| 161 | deps+="$d\n" | 161 | deps+="$d\n" |
| 162 | } | 162 | fi |
| 163 | done | 163 | done |
| 164 | printf "$deps" | 164 | printf "$deps" |
| 165 | } >$o.depl || die "escaped $?" | 165 | } >$o.depl || die "escaped $?" |
| @@ -189,10 +189,10 @@ bocaml() { · 23 unmodified lines | |||
| 189 | s=$outd/confstruct.ml | 189 | s=$outd/confstruct.ml |
| 190 | o=$outd/confstruct.cmo;; | 190 | o=$outd/confstruct.cmo;; |
| 191 | *) | 191 | *) |
| 192 | test "$o" = "$wocmi" && s=$srcd/${o%.cmo}.ml || { | 192 | if test "$o" = "$wocmi"; then s=$srcd/${o%.cmo}.ml; else |
| 193 | cmi=true | 193 | cmi=true |
| 194 | s=$srcd/$wocmi.mli | 194 | s=$srcd/$wocmi.mli |
| 195 | } | 195 | fi |
| 196 | o=$outd/$o;; | 196 | o=$outd/$o;; |
| 197 | esac | 197 | esac |
| 198 | expr >/dev/null "$cycle" : ".*$o" && die cycle $o || cycle="$cycle$o" | 198 | expr >/dev/null "$cycle" : ".*$o" && die cycle $o || cycle="$cycle$o" |