42 lines
876 B
Plaintext
42 lines
876 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 "{tempfile}"`"
|
|
set i 0
|
|
loop
|
|
break if ! "`exists "{tempfile}.{i}"`"
|
|
evaluate i += 1
|
|
end
|
|
set tempfile "{tempfile}.{i}"
|
|
end
|
|
|
|
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
|
|
|
|
"{tempfile}"
|
|
|
|
Delete -i "{tempfile}"
|