ocaml/tools/DoMake

34 lines
751 B
Plaintext

# domake
# Execute the output of "Make -f Makefile.Mac -f Makefile.Mac.depend"
# or "Make -f Makefile -f Makefile.depend" if "Makefile.Mac" does not exist.
# usage: domake [-quiet] <make arguments>
set echo 0
set tempfile "{TempFolder}temp-domake-`Date -n`"
if "`exists Makefile.Mac`" != ""
set domake_main "Makefile.Mac"
else
set domake_main "Makefile"
end
if "`exists "{domake_main}".depend`" != ""
set domake_files "-f {domake_main} -f {domake_main}.depend"
else
set domake_files "-f {domake_main}"
end
if "{1}" == "-quiet"
shift
make {domake_files} {"Parameters"} >"{TempFile}"
else
echo 'set echo 1' >"{tempfile}"
make {domake_files} {"Parameters"} >>"{TempFile}"
end
unset domake_files
"{tempfile}"
Delete -i "{tempfile}"