mirror of
https://github.com/libretro/libretro-super
synced 2024-11-28 20:14:22 +00:00
Merge pull request #133 from fr500/master
initial commit of new scripts for automated building
This commit is contained in:
commit
80eaf54a7f
4
buildbot.conf
Normal file
4
buildbot.conf
Normal file
@ -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 .
|
||||||
|
|
95
libretro-fetch-and-build.sh
Normal file
95
libretro-fetch-and-build.sh
Normal file
@ -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
|
||||||
|
|
Loading…
Reference in New Issue
Block a user