diff --git a/buildbot.conf b/buildbot.conf new file mode 100644 index 00000000..fb5e5df6 --- /dev/null +++ b/buildbot.conf @@ -0,0 +1,4 @@ +libretro-bsnes https://github.com/libretro/bsnes-libretro.git project NO GENERIC Makefile . +libretro-mame https://github.com/libretro/bsnes-libretro.git project NO GENERIC Makefile . +libretro-tgbdual https://github.com/libretro/tgbdual-libretro.git project YES GENERIC Makefile . + diff --git a/libretro-fetch-and-build.sh b/libretro-fetch-and-build.sh new file mode 100644 index 00000000..89dc6acd --- /dev/null +++ b/libretro-fetch-and-build.sh @@ -0,0 +1,95 @@ +#!/bin/bash +. ./libretro-config.sh + +#usage: +# ./libretro-fetch-and-build.sh configfile +# if you want to force all enabled cores to rebuild prepend FORCE=YES +# you may need to specify your make command by prepending it to the commandline, for instance MAKE=mingw32-make +# +# eg: FORCE=YES MAKE=mingw32-make ./libretro-fetch-and-build.sh buildbot.conf + + +#build commands +build_libretro_generic_makefile() { + + + DIR=$1 + SUBDIR=$2 + MAKEFILE=$3 + PLATFORM=$4 + SILENT=$5 + + cd $DIR + cd $SUBDIR + if [ -z "${NOCLEAN}" ]; + then + echo "cleaning up..." + "${MAKE}" "${SILENT}" platform="${4}" ${COMPILER} "-j${JOBS}" clean + if [ $? -eq 0 ]; + then + echo success! + else + echo error while cleaning up + fi + fi + + echo "compiling..." + + "${MAKE}" "${SILENT}" platform="${4}" ${COMPILER} "-j${JOBS}" + if [ $? -eq 0 ]; + then + echo success! + else + echo error while compiling $1 + fi + +} + + +#fetch a project and mark it for building if there have been any changes + +while read line; do + NAME=`echo $line | cut --fields=1 --delimiter=" "` + URL=`echo $line | cut --fields=2 --delimiter=" "` + TYPE=`echo $line | cut --fields=3 --delimiter=" "` + ENABLED=`echo $line | cut --fields=4 --delimiter=" "` + COMMAND=`echo $line | cut --fields=5 --delimiter=" "` + MAKEFILE=`echo $line | cut --fields=6 --delimiter=" "` + SUBDIR=`echo $line | cut --fields=7 --delimiter=" "` + + if [ "${ENABLED}" == "YES" ]; + then + echo "Processing $NAME" + echo ==================================== + if [ -d "${NAME}/.git" ]; + then + cd $NAME + echo "pulling from repo... " + OUT=`git pull` + + if [[ $OUT == *up-to-date* ]] + then + BUILD="NO" + else + BUILD="YES" + fi + + cd .. + + else + echo "cloning repo..." + git clone --depth=1 "$URL" "$NAME" + fi + + if [ "${BUILD}" == "YES" -o "${FORCE}" == "YES" ]; + then + echo building core... + build_libretro_generic_makefile $NAME $SUBDIR $MAKEFILE ${FORMAT_COMPILER_TARGET} "-s" + else + echo core already up-to-date... + fi + + fi + +done < $1 +