Conner
Code: Select all
#!/bin/sh
# where the CVS directory is
CVS_SRC=/usr/src/e17
# where we want E to be installed
BUILD_DIR=/usr/local/e17
# gcc flags
FLAGS="-march=athlon-tbird -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -falign-functions=4 -maccumulate-outgoing-args"
blah() {
make distclean &> /dev/null
# configure, make, & install with logs
# i didn't need it
#if [ "$X" == "imlib2" ]; then
#sed s/ASFLAGS="$ASFLAGS/CCASFLAGS="$ASFLAGS/ configure.ac > configure.ac.2
#mv configure.ac.2 configure.ac
#sed s/AS=$CC/CCAS=$CC/ configure.ac > configure.ac.2
#mv configure.ac.2 configure.ac
#sed s/'AC_SUBST(ASFLAGS)'/'AC_SUBST(CCASFLAGS)'/ configure.ac > configure.ac.2
#mv configure.ac.2 configure.ac
#sed s/'AC_SUBST(AS)'/'AC_SUBST(CCAS)'/ configure.ac > configure.ac.2
#mv configure.ac.2 configure.ac
#fi
if [ "$X" == "imlib2" ]; then
./autogen.sh --disable-mmx --prefix=$BUILD_DIR &> $CVS_SRC/logs/$X.log; else
./autogen.sh --prefix=$BUILD_DIR &> $CVS_SRC/logs/$X.log
fi
if [ "$X" == "evas" ]; then
sed s/'LIBS = '/'LIBS = $(imlib2_libs) $(gl_libs) $(ttf_libs) $(x_libs)'/ test/Makefile > test/Makefile2
mv test/Makefile2 test/Makefile
fi
if [ "$X" == "ebits" ]; then
sed s/'LIBS = '/'LIBS = $(X_LIBS) $(imlib2_libs) $(gl_libs) $(ttf_libs) $(x_libs) $(evas_libs)'/ src/Makefile > src/Makefile2
mv src/Makefile2 src/Makefile
fi
if [ "$X" == "estyle" ]; then
sed s/'LIBS = '/'LIBS = $(ewd_libs)'/ test/Makefile > test/Makefile2
mv test/Makefile2 test/Makefile
fi
if [ "$X" == "ewl" ]; then
sed s/'LIBS = '/'LIBS = $(ebits_libs) $(ecore_libs) $(estyle_libs) $(estyle_libs)'/ test/Makefile > test/Makefile2
mv test/Makefile2 test/Makefile
fi
if [ "$X" == "etcher" ]; then
sed s/'SUBDIRS = m4 po src'/'SUBDIRS = src'/ Makefile > Makefile2
sleep 5
rm Makefile
mv Makefile2 Makefile
fi
if [ "$X" == "e" ]; then
sed s/'intl\/Makefile'// configure > configure2
mv configure2 configure
chmod +x configure
./configure --prefix=$BUILD_DIR &> $CVS_SRC/logs/$X.log
sed s/'SUBDIRS = m4 po src lib client tools doc'/'SUBDIRS = src lib client tools doc'/ Makefile > Makefile2
mv Makefile2 Makefile
fi
if [ "$X" == "entice" ]; then
sed s/'SUBDIRS = m4 po src'/'SUBDIRS = src'/ Makefile > Makefile2
cp Makefile2 Makefile
fi
if [ "$X" == "imlib2_tools" ]; then
./configure --with-imlib2=/usr/local/e17 --prefix=/usr/local/e17
fi
make -j2 CFLAGS="$FLAGS" &> cat >> $CVS_SRC/logs/$X.log
make install &> /dev/null
env-update
if [ $(grep -c Error $CVS_SRC/logs/$X.log) != 0 ]; then
echo "Compile failed : $X"
cat $CVS_SRC/logs/$X.log
exit 0
fi
}
# clean up old stuff
rm -rf $BUILD_DIR/*
rm -rf $CVS_SRC/logs
mkdir $CVS_SRC/logs
# build libraries
for X in edb imlib2 imlib2_loaders evas ewd ebits ecore ebg estyle etox ewl
do
echo $(date +%T) - Now building $X
cd $CVS_SRC/libs/$X
blah
done
# build apps
for X in etcher ebony med efsd ebindings e esmall imlib2_tools # entice doesn't work
#####################
# entice Substitution of m4 and po doesn't work. Makefile stays the same
# don't know why...
#####################
do
echo $(date +%T) - Now building $X
cd $CVS_SRC/apps/$X
blah
done


