This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

build_Make* fixes for ConfigTool trees


My previous scripts only worked well for trees built using ecosconfig.
These changes allow it to work with trees build using ConfigTool as
well.  (n.b. it's too bad that the two tools generate such different
build trees!)

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates
Index: examples/build_Make.params
===================================================================
RCS file: /misc/cvsfiles/ecos/examples/build_Make.params,v
retrieving revision 1.1
diff -u -5 -p -r1.1 build_Make.params
--- examples/build_Make.params	25 Nov 2002 23:28:08 -0000	1.1
+++ examples/build_Make.params	5 Sep 2003 13:55:30 -0000
@@ -3,34 +3,42 @@
 # This script will set up a Makefile fragment with 
 # platform specifics.  This fragement can be used by
 # 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: <eCos_repository>/build_Make.params [<eCos_install_dir>]"
-  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: <eCos_repository>/build_Make.params [<eCos_install_dir>]"
+    echo "... where <eCos_install_dir> 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 <<EOF >Make.params
 
 # Copied from 'makefile' in the "install" tree
 
 EOF
 
-grep export ${HOME}/makefile >>Make.params
+grep export ${ECOS_BUILD_DIR}/makefile >>Make.params
 
 cat <<EOF >>Make.params
 
 #
 # Target specific flags, etc.
 #
 
 EOF
 
-cat ${HOME}/install/include/pkgconf/ecos.mak >>Make.params
+cat ${ECOS_INSTALL_DIR}/include/pkgconf/ecos.mak >>Make.params
 
 
 
Index: examples/build_Makefile
===================================================================
RCS file: /misc/cvsfiles/ecos/examples/build_Makefile,v
retrieving revision 1.4
diff -u -5 -p -r1.4 build_Makefile
--- examples/build_Makefile	25 Nov 2002 23:28:08 -0000	1.4
+++ examples/build_Makefile	5 Sep 2003 13:48:16 -0000
@@ -4,19 +4,11 @@
 # suitable for use with an installed eCos configuration.
 
 # usage: <eCos_repository>/build_Makefile [<eCos_install_dir>]
 # 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: <eCos_repository>/build_Makefile [<eCos_install_dir>]"
-  echo "env:   \${SRCS} - the default list of source files"
-  echo "       \${DST}  - the default target"
-  exit
-fi
+ECOS_DIR=${1-`pwd`}
 
 cat <<EOF >Makefile
 #
 # Makefile for eCos tests
 #
@@ -40,8 +32,8 @@ DST=${DST-result_prog}
 
 EOF
 
 # Create actual parameters
 
-`dirname $0`/build_Make.params ${HOME}
+`dirname $0`/build_Make.params ${ECOS_DIR}
 
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]