Commits

camlspotter  committed 9105143

make foreach back to older version

  • Participants
  • Parent commits 3fc8a47

Comments (0)

Files changed (3)

   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