midipix / build / midipix_build

Forked from build/midipix_build 4 years ago
Clone
Blob Blame History Raw
#
# . ./build.vars and set -o errexit -o noglob are assumed.
#

if ! is_build_script_done fetch; then
	fetch_git perk ${GITROOT}/perk;
	set_build_script_done fetch -configure1;
fi;
set_build_dir ${2} native;
if ! is_build_script_done configure1; then
	rm_if_exists -m -c ${PKG_BUILD_DIR};
	../perk/configure --prefix=/usr;
	set_build_script_done configure1 clean1 -build1;
else
	cd ${PKG_BUILD_DIR};
fi;
if ! is_build_script_done clean1; then
	make ${MAKEFLAGS} clean;
	set_build_script_done clean1 -build1;
fi;
if ! is_build_script_done build1; then
	make;
	set_build_script_done build1 -install1;
fi;
if ! is_build_script_done install1; then
	make DESTDIR=${PREFIX} install;
	set_build_script_done install1 -configure2;
fi;
set_build_dir ${2} cross;
if ! is_build_script_done configure2; then
	rm_if_exists -m -c ../${PKG_BUILD_DIR};
	../perk/configure --prefix=/usr --target=${TARGET};
	set_build_script_done configure2 clean2 -build2;
else
	cd ../${PKG_BUILD_DIR};
fi;
if ! is_build_script_done clean2; then
	make ${MAKEFLAGS} clean;
	set_build_script_done clean2 -build2;
fi;
if ! is_build_script_done build2; then
	make;
	set_build_script_done build2 -install2;
fi;
if ! is_build_script_done install2; then
	make DESTDIR=${PKG_PREFIX} install;
	set_build_script_done install2 finish;
fi;

# vim:filetype=sh