####################################################################### # # # Camlp4 # # # # Damien Doligez, projet Para, INRIA Rocquencourt # # # # Copyright 1999 Institut National de Recherche en Informatique et # # en Automatique. Distributed only by permission. # # # ####################################################################### # $Id$ set echo 0 exit if {#} < 1 set args1 "" set file "" loop break if {#} == 0 if "{1}" =~ /Å.mlÅ/ set file "{1}" else set args1 "{args1} `quote "{1}"`" end shift end set firstline "`streamedit -e '1 exit' "{file}"`" ³ dev:null || set status 0 if "{firstline}" =~ /[Â ]+ camlp4r (Å)¨0/ set args0 "`echo "{¨0}" | streamedit -e '1,$ replace -c ° /[()*]/ ""' ¶ -e '1,$ replace -c ° /.¶// ":"'`" set comm "{OTOP}boot:ocamlrun ::boot:camlp4r -nolib -I ::boot:" echo "{comm} {args0} {args1} {file}" {comm} {args0} {args1} "{file}" else if "{firstline}" =~ /[Â ]+ camlp4 (Å)¨0/ set args0 "`echo "{¨0}" | streamedit -e '1,$ replace -c ° /[()*]/ ""' ¶ -e '1,$ replace -c ° /.¶// ":"'`" set comm "{OTOP}boot:ocamlrun ::boot:camlp4 -nolib -I ::boot:" echo "{comm} {args0} {args1} {file}" {comm} {args0} {args1} "{file}" else if "{file}" =~ /(Å)¨0.mli/ echo duplicate -y {file} {¨0}.ppi duplicate -y "{file}" "{¨0}.ppi" else if "{file}" =~ /(Å)¨0.ml/ echo duplicate -y {file} {¨0}.ppo duplicate -y "{file}" "{¨0}.ppo" else echo duplicate -y {file} {file}.ppo duplicate -y "{file}" "{file}.ppo" end