lalbornoz 340f4c
if is_build_script_done finished; then
lalbornoz 340f4c
        exit 212;
lalbornoz 340f4c
else
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	fetch_git perk ${GITROOT}/perk;
Lucio Andrés Illanes Albornoz (arab, vxp) c49754
	set_build_dir ${2} native;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done configured1; then
Lucio Andrés Illanes Albornoz (arab, vxp) 96b309
	rm_if_exists -m -c ${BUILD_DIR};
lalbornoz 340f4c
	../perk/configure;
lalbornoz 340f4c
	set_build_script_done configured1 -built1;
lalbornoz 340f4c
else
Lucio Andrés Illanes Albornoz (arab, vxp) 96b309
	cd ${BUILD_DIR};
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done built1; then
lalbornoz 340f4c
	make;
lalbornoz 340f4c
	set_build_script_done built1 -installed1;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done installed1; then
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	make DESTDIR=${PREFIX} install;
lalbornoz 340f4c
	set_build_script_done installed1 -configured2;
lalbornoz 340f4c
fi;
Lucio Andrés Illanes Albornoz (arab, vxp) c49754
set_build_dir ${2} cross;
lalbornoz 340f4c
if ! is_build_script_done configured2; then
Lucio Andrés Illanes Albornoz (arab, vxp) 96b309
	rm_if_exists -m -c ../${BUILD_DIR};
Lucio Andrés Illanes Albornoz (arab, vxp) 6e940c
	../perk/configure --target=${TARGET};
lalbornoz 340f4c
	set_build_script_done configured2 -built2;
lalbornoz 340f4c
else
Lucio Andrés Illanes Albornoz (arab, vxp) 96b309
	cd ../${BUILD_DIR};
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done built2; then
lalbornoz 340f4c
	make;
lalbornoz 340f4c
	set_build_script_done built2 -installed2;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
if ! is_build_script_done installed2; then
Lucio Andrés Illanes Albornoz (arab, vxp) f9c386
	make DESTDIR=${PREFIX_LVL} install;
lalbornoz 340f4c
	set_build_script_done installed2 finished;
lalbornoz 340f4c
fi;
lalbornoz 340f4c
lalbornoz 340f4c
# vim:filetype=sh