History

Fix subtle build.bash issue

Boils down to eval error propogation or lack thereof.

malc committed 6 years ago

Commit 8a7fb4e1 parent b18f2c72 files · +12 −8Browse files

Unified · Split

2 files
  1. build.bash +7 −7
  2. todo.org +5 −1
build.bash+7−7
@@ -149,7 +149,7 @@ bocaml2() { · 148 unmodified lines
149149 local cmd="ocamlc -depend -bytecode -one-line $(oincs $o) $s"
150150 local keycmd="digest $o $s $o.depl"
151151 isfresh "$o.depl" "$overs$cmd$(eval $keycmd)" || {
152− eval "$cmd || die '$cmd' failed" | {
152+ eval "$cmd" | {
153153 read _ _ depl
154154 :>"$o.depl"
155155 for d in $depl; do
@@ -176,7 +176,7 @@ bocaml2() { · 20 unmodified lines
176176 keycmd="digest $o $s $(< $o.depl)"
177177 isfresh "$o" "$overs$cmd$(eval $keycmd)" || {
178178 printf "%*.s%s -> %s\n" $n '' "${s#$srcd/}" "${o#$outd/}"
179− eval "$cmd || die '$cmd failed'"
179+ eval "$cmd" || die "$cmd failed"
180180 echo "$overs$cmd$(eval $keycmd)" >"$o.past"
181181 } && vecho "fresh '$o'"
182182 }
@@ -220,7 +220,7 @@ bocamlc() { · 37 unmodified lines
220220 local keycmd='digest $o $d'
221221 isfresh "$o" "$cvers$cmd$(eval $keycmd)" || {
222222 printf "%s -> %s\n" "${s#$srcd/}" "${o#$outd/}"
223− eval "$cmd || die '$cmd failed'"
223+ eval "$cmd" || die "$cmd failed"
224224 read _ d <$o.dep
225225 echo "$cvers$cmd$(eval $keycmd)" >"$o.past"
226226 } && vecho "fresh $o"
@@ -234,7 +234,7 @@ bobjc() { · 7 unmodified lines
234234 local keycmd='digest $o $d'
235235 isfresh "$o" "$cmd$(eval $keycmd)" || {
236236 printf "%s -> %s\n" "${s#$srcd/}" "${o#$outd/}"
237− eval "$cmd || die '$cmd failed'"
237+ eval "$cmd" || die "$cmd failed"
238238 read _ d <$o.dep
239239 echo "$cmd$(eval $keycmd)" >"$o.past"
240240 } && vecho "fresh $o"
@@ -246,7 +246,7 @@ cmd="(. $srcd/genconfstr.sh >$outd/confstruct.ml)" · 5 unmodified lines
246246 keycmd="digest $srcd/genconfstr.sh $outd/confstruct.ml"
247247 isfresh "$outd/confstruct.ml" "$cmd$(eval $keycmd)" || {
248248 echo "generating $outd/confstruct.ml"
249− eval "$cmd || die genconfstr.sh failed"
249+ eval "$cmd" || die genconfstr.sh failed
250250 echo "$cmd$(eval $keycmd)" > "$outd/confstruct.ml.past"
251251 } && vecho "fresh $outd/confstruct.ml"
252252
@@ -264,7 +264,7 @@ for target; do · 11 unmodified lines
264264 cmd="asciidoctor -b manpage -o $out $src"
265265 isfresh "$out" "$cmd$(eval $keycmd)" || {
266266 echo "$src -> $out"
267− eval "$cmd || die '$cmd failed'"
267+ eval "$cmd" || die "$cmd failed"
268268 echo "$cmd$(eval $keycmd)" >"$out.past"
269269 } && vecho "fresh $out"
270270 done;;
@@ -306,7 +306,7 @@ cmd="ocamlc -custom $libs -o $outd/llpp $cobjs $(echo $ord) -cclib \"$clibs\"" · 35 unmodified lines
306306 keycmd="digest $outd/llpp $cobjs $ord $mulibs"
307307 isfresh "$outd/llpp" "$cmd$(eval $keycmd)" || {
308308 echo linking $outd/llpp
309− eval "$cmd || die '$cmd failed'"
309+ eval "$cmd" || die "$cmd failed"
310310 echo "$cmd$(eval $keycmd)" >"$outd/llpp.past"
311311 } && vecho "fresh llpp"
312312
todo.org+5−1
@@ -9,7 +9,11 @@ · 8 unmodified lines
99 ** TODO Make isfresh work (properly) with multiple targets
1010 ** TODO Removing .mlis leads to build errors
1111 Nuking everything (or just deleting .deps?) solves it though
12−** TODO errors in config.ml
12+** DONE errors in config.ml (!)
13+ CLOSED: [2020-08-09 Sun 08:53]
14+ they do not lead to aborted compilation
15+*** recipe: making a fresh error and compiling
16+ (so that both config.ml and stuff that depends on it is being rebuilt by build.bash)
1317 * TODO [maybe] inside rect/quad (_Generic)
1418 * TODO Shift-insert for searches
1519 * TODO Threaded rendering

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