1. camlspotter
  2. omy

Commits

camlspotter  committed 231f451

comment and &&

  • Participants
  • Parent commits 310e2f9
  • Branches default

Comments (0)

Files changed (1)

File OMyExternal

View file
 # ==========================
 # Functions to integrate non-OMake projects
 
+# Downloading
+# ============================
+
 #| Run wget and retrieve $(url) to $(dir)
 #  If the file is already downloaded, does nothing.
 WGet(url, dir) =
           wget -O $(dst).tmp $(url); mv $(dst).tmp $(dst)
     return $(dst)
 
+# Files
+# ============================
+
 #| List up files in directory $(dir), without the prefix "$(dir)/"
 Files(dir) =
     return $(removeprefix $(dir)/, $(find $(dir) -f {}))
     candidates=$(OCamlModulesFromPath $(files))
     spots=$(find $(dir) -regex .*\.\(annot|spot|spit\)\$)
 
+# Functions for `External` projects
+# ============================
+
+# General rule for commands
+# ---------------------------------
+Do not use ``;`` for sequential execution of commands in ``CONFIGURE`` and ``INSTALL`` variables, since they ignore errors. Use ``&&`` instead::
+
+    INSTALL=(cd $(EXTRACT_DIR); ./configure; make all; make install; echo done)
+
+In the above, even if one of the commands fails, OMake does not notice it, since the last command ``echo done`` always succeeds. The following is better:: 
+
+    INSTALL=(cd $(EXTRACT_DIR); ./configure && make all install && echo done)
+
 #| Add a rule to install non-omake project.
 #
 #      Argument