Commits

camlspotter  committed 3fc8a47

updated old style foreach uses

  • Participants
  • Parent commits 02e91b3

Comments (0)

Files changed (4)

   cmd=COLUMNS=200 dpkg -l
   answer[]=
   res=$(shella $(cmd))
-  foreach (line, $(res))
+  foreach(line => ..., $(res))
     match $(line)
     case $'^ii  \([^ ]+\)'
       answer+=$1
     if $(not $(equal $(required), $(EMPTY)))
       println(Installing apt package $(string $(required)))
       cmd[]=sudo apt-get install -y
-      foreach(r, $(required))
+      foreach(r => ..., $(required))
          cmd += $r
          export 
       println(the cmd $(string $(cmd)))

File OMyExternal2

         rm -rf $(BUILD_DIR)
 
     installed=$(addprefix $(INSTALLED)/, $(PACKS))
-    foreach(x, $(SOURCES))
+    foreach(x => ..., $(SOURCES))
         DependPATH($(x))
         export
 
         ocamlfind remove $(PACKS)
         cd $(BUILD_DIR); ../install.sh
         cd $(BUILD_DIR); spotinstall $(PACKS)
-	foreach(x, $(PACKS))
+	foreach(x => ..., $(PACKS))
             CreateInstalled($(x), $(find $(OCAMLFIND_DESTDIR)$(DIRSEP)$(x) -f {}))
 
     install: $(installed)
     clean:
         rm -rf $(BUILD_DIR)
 
-    foreach(x, $(SOURCES))
+    foreach(x => ..., $(SOURCES))
         DependPATH($(x))
         export
 
 #     DOWNLOAD_URLS[]=$(list_filter $(fun x, $(is_url $(x))), $(URLS))
 list_filter(pred, list) =
   result=
-  foreach(x, $(list))
+  foreach(x => ..., $(list))
     if $(apply $(pred), $(x))
       result+=$(x)
       export
 
 TarExtractDir(f) =
   files=$(TarList $(f))
-  return $(set $(foreach $(fun x, $(TopDir $(x))), $(files)))
+  return $(set $(foreach $(fun x => $(TopDir $(x))), $(files)))
 
 #| Extract tar archive $(f) to directory $(dir).
 #  If the archive has more than one files or directories in its top directory structure,