diff --git a/.cvsignore b/.cvsignore new file mode 100644 index 0000000..420c0df --- /dev/null +++ b/.cvsignore @@ -0,0 +1 @@ +RTEMS_SETTINGS diff --git a/ChangeLog b/ChangeLog index e69de29..5f1adf8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -0,0 +1,6 @@ +2009-12-19 Joel Sherrill + + * .cvsignore, Makefile.settings, do_it: New files. + Can now build with do_it. Crude but works. + + diff --git a/Makefile.settings b/Makefile.settings new file mode 100644 index 0000000..7f75e7e --- /dev/null +++ b/Makefile.settings @@ -0,0 +1,27 @@ +# +# Makefile to pull BSP specific information into a form the script can use +# + +include $(RTEMS_MAKEFILE_PATH)/Makefile.inc + +include $(RTEMS_CUSTOM) +include $(PROJECT_ROOT)/make/leaf.cfg + +# Tool helpers +rtemsdir=${RTEMS_MAKEFILE_PATH} +CARGS += $(CPU_CFLAGS) $(LDFLAGS) $(AM_LDFLAGS) + +all: RTEMS_SETTINGS + +RTEMS_SETTINGS: + (echo "CC=\"$(CC)\""; \ + echo "AS=$(AS)"; \ + echo "TARGET=$(AS:%-as=%)" ; \ + echo "CPU_CFLAGS=\"$(CPU_CFLAGS)\""; \ + echo "CFLAGS=\"$(CFLAGS)\"" ; \ + echo "LDFLAGS=\"$(LDFLAGS)\"" ; \ + ) >$@ + @cat RTEMS_SETTINGS + +clean: + rm -f RTEMS_SETTINGS diff --git a/do_it b/do_it new file mode 100755 index 0000000..9131baa --- /dev/null +++ b/do_it @@ -0,0 +1,88 @@ +#! /bin/sh +# +# $Id$ +# + +test_exit() +{ + exit_code=$1 + exit $exit_code +} + +progname=${0##*/} # fast basename hack for ksh, bash + +USAGE=\ +"usage: $progname [ -opts ] test [ test ... ] +" + +check_status() +{ + if [ $1 -ne 0 ] ; then + shift + echo "FAILED: " "$*" >&2 + exit 1 + fi +} + + +if [ X${RTEMS_MAKEFILE_PATH} = X ] ; then + echo RTEMS_MAKEFILE_PATH not set + exit 1 +fi + +make -f Makefile.settings +check_status $? Could not generate RTEMS_SETTINGS + +source ./RTEMS_SETTINGS + +PREFIX=/tmp/joel + +echo WARNING USING ${PREFIX} for install point!!! + +case $1 in + configure) + cd jpeg-7 + check_status $? Could not cd to jpeg-7 + + echo "configuring jpeg-7 ..." + CFLAGS="${CPU_CFLAGS}" ./configure --build=${TARGET} --prefix=${PREFIX} \ + >c.log 2>&1 + check_status $? Could not configure jpeg-7 + + cd ../tiff-3.9.2 + check_status $? Could not cd to tiff-3.9.2 + + echo "configuring tiff-3.9.2 ..." + CFLAGS="${CPU_CFLAGS}" ./configure --build=${TARGET} --prefix=${PREFIX} \ + >c.log 2>&1 + check_status $? Could not configure tiff-3.9.2 + + cd .. + ;; + build|clean|distclean|install) + action=${1} + if [ ${1} = build ] ; then + action= + fi + + for d in jpeg-7 tiff-3.9.2 + do + echo "Performing ${1} on ${d} ..." + + cd ${d} + check_status $? Could not cd to ${d} + make ${action} >${1}.log 2>&1 + check_status $? Could not ${1} in ${d} + + #if [ ${1} = distclean ] ; then + # rm -f build.log c.log clean.log distclean.log + #fi + cd .. + done + ;; + *) + check_status 1 Unknown action ${1} + ;; +esac + +exit 0