2016-05-07 13:52:26 +02:00
|
|
|
|
2019-11-05 01:16:59 +01:00
|
|
|
function crystal.prelude {
|
2019-11-14 14:49:35 +01:00
|
|
|
if ! has_array_key CRFLAGS; then
|
2019-11-05 01:16:59 +01:00
|
|
|
variables+=(CRFLAGS "--release")
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2016-05-07 13:52:26 +02:00
|
|
|
function crystal.build {
|
2019-06-09 19:19:50 +02:00
|
|
|
write "${target}: ${src[@]} ${depends[$target]} $(dirdep $target)"
|
2019-05-28 18:45:35 +02:00
|
|
|
write "\t@echo '${fg_bold[magenta]} CR > ${fg_bold[white]}$target${reset_color}'"
|
2019-11-05 01:16:59 +01:00
|
|
|
write "\t${Q}crystal build ${crflags[$target]} \$(CRFLAGS) ${src[@]} -o '${target}'"
|
2016-05-07 13:52:26 +02:00
|
|
|
|
|
|
|
write "\n"
|
|
|
|
}
|
|
|
|
|
|
|
|
function crystal.install {
|
|
|
|
binary.install "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
function crystal.uninstall {
|
|
|
|
binary.uninstall "$@"
|
|
|
|
}
|
|
|
|
|
|
|
|
function crystal.clean {
|
2019-05-28 18:45:35 +02:00
|
|
|
write "${target}.clean:"
|
|
|
|
write "\t@echo '$(RM ${target})'"
|
|
|
|
write "\t${Q}rm -f ${target}"
|
|
|
|
write
|
2016-05-07 13:52:26 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
function crystal.distfiles {
|
|
|
|
echo "${target}"
|
|
|
|
}
|
|
|
|
|