build.zsh/build/crystal.zsh

40 lines
752 B
Bash
Raw Normal View History

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 {
write -n "${target}: ${src[@]}"
for i in ${depends[$target]}; do
v=$(echo ${i} | tr '\n' ' ')
write -n " ${v}"
done
write " $(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}"
}