# HG changeset patch # User gthomas # Date 1062770249 0 # Node ID e68cf4daeda430b22754939d857f98c5ec8889f5 # Parent ecbb5d87bfe0a65d0b1f6f7f9b0792485120e16a Update build_Make* to handle ConfigTool generated trees diff --git a/examples/build_Make.params b/examples/build_Make.params --- a/examples/build_Make.params +++ b/examples/build_Make.params @@ -5,13 +5,21 @@ # the automatically generated Makefile (via the script # 'build_Makefile') -# Copied from 'makefile' the "install" tree +# Copied from 'makefile' in the "install" tree -HOME=${1-`pwd`} -if [ ! -d ${HOME}/install ]; then - echo "Not an eCos install tree" - echo "usage: /build_Make.params []" - exit +ECOS_BUILD_DIR=${1-`pwd`} +ECOS_INSTALL_DIR=`echo ${ECOS_BUILD_DIR}/install` +if [ ! -d ${ECOS_BUILD_DIR}/install ]; then + if [ ! -d ${ECOS_BUILD_DIR}/*_build ]; then + echo "Not an eCos install tree" + echo "usage: /build_Make.params []" + echo "... where is the directory which contains" + echo " the *.ecc configuration file used to build the kernel" + exit + else + ECOS_INSTALL_DIR=`echo ${ECOS_BUILD_DIR}/*_install` + ECOS_BUILD_DIR=`echo ${ECOS_BUILD_DIR}/*_build` + fi fi cat <Make.params @@ -20,7 +28,7 @@ cat <Make.params EOF -grep export ${HOME}/makefile >>Make.params +grep export ${ECOS_BUILD_DIR}/makefile >>Make.params cat <>Make.params @@ -30,7 +38,7 @@ cat <>Make.params EOF -cat ${HOME}/install/include/pkgconf/ecos.mak >>Make.params +cat ${ECOS_INSTALL_DIR}/include/pkgconf/ecos.mak >>Make.params diff --git a/examples/build_Makefile b/examples/build_Makefile --- a/examples/build_Makefile +++ b/examples/build_Makefile @@ -6,15 +6,7 @@ # usage: /build_Makefile [] # env: ${SRCS} - the default list of source files # ${DST} - the default target - -HOME=${1-`pwd`} -if [ ! -d ${HOME}/install ]; then - echo "Not an eCos install tree" - echo "usage: /build_Makefile []" - echo "env: \${SRCS} - the default list of source files" - echo " \${DST} - the default target" - exit -fi +ECOS_DIR=${1-`pwd`} cat <Makefile # @@ -42,6 +34,6 @@ EOF # Create actual parameters -`dirname $0`/build_Make.params ${HOME} +`dirname $0`/build_Make.params ${ECOS_DIR}