From b9ca4ba9c9f4d536bda98932a149095af6115dad Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 1 Dec 1997 17:07:52 +0000 Subject: Even more cleanup to make sure all the --enable/disable options avoid generating Makefiles where possible. Added code to make sure make/custom file and bsp directory exist for configured bsps. This code also accounts for "aliased" BSPs. --- configure.in | 90 +++++++++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 68 insertions(+), 22 deletions(-) (limited to 'configure.in') diff --git a/configure.in b/configure.in index 095ffa790c..d8ee497dea 100644 --- a/configure.in +++ b/configure.in @@ -152,6 +152,12 @@ case "${target}" in ;; esac +# Override the set of BSPs to be built. +AC_ARG_ENABLE(rtemsbsp, \ + [ --enable-rtemsbsp=bsp1 bsp2 .. BSPs to include in build], \ + rtems_bsp=$enableval \ +) + # Is this a supported CPU? AC_MSG_CHECKING([if cpu $target_cpu is supported]) if test -d "$srcdir/c/src/exec/score/cpu/$target_cpu"; then @@ -163,9 +169,12 @@ fi # find all the Executive Makefiles RTEMS_CHECK_MAKEFILE(c/src/exec/rtems) -RTEMS_CHECK_MAKEFILE(c/src/exec/posix) RTEMS_CHECK_MAKEFILE(c/src/exec/sapi) -RTEMS_CHECK_MAKEFILE(c/src/exec/wrapup) + +if test "$RTEMS_HAS_POSIX" = "yes"; then + RTEMS_CHECK_MAKEFILE(c/src/exec/posix) + makefiles="$makefiles c/src/exec/posix/Makefile" +fi # find all the Makefiles for the BSPs if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then @@ -189,7 +198,33 @@ if test -d "$srcdir/c/src/lib/libbsp/$target_cpu"; then # collect makefiles for each bsp for i in $rtems_bsp; do - RTEMS_CHECK_MAKEFILE(c/src/lib/libbsp/$target_cpu/$i) + # make sure there is a make/custom file for the bsp + if test ! -r "$srcdir/c/make/custom/${i}.cfg"; then + AC_MSG_ERROR([no make/custom/${i}.cfg file for BSP $i]) + fi + + # account for "aliased" bsps which share source code + case $i in + mvme162lx) bspdir=mvme162 ;; # mvme162 board variant + gen68360_040) bspdir=gen68360 ;; # 68360 in companion mode + go32_p5) bspdir=go32 ;; # go32 on Pentium class CPU + p4600) bspdir=p4000 ;; # p4000 board with IDT 4600 + p4650) bspdir=p4000 ;; # p4000 board with IDT 4650 + *) bspdir=$i;; + esac + + # Is there code where there should be for this BSP? + if test -d "$srcdir/c/src/lib/libbsp/$target_cpu/$bspdir"; then + RTEMS_BSP="$RTEMS_BSP $i" + # make sure the Makefiles in a bsp directory are only done once + echo $bspdirs | grep $bspdir >/dev/null 2>&1 + if test $? -ne 0 ; then + bspdirs="$bspdirs $bspdir" + RTEMS_CHECK_MAKEFILE(c/src/lib/libbsp/$target_cpu/$bspdir) + fi + else + AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for $i]) + fi done fi @@ -222,7 +257,7 @@ fi dnl AC_PROG_CC dnl AC_PROG_CXX -RTEMS_BSP=$rtems_bsp +dnl RTEMS_BSP=$rtems_bsp RTEMS_HOST=$host_os RTEMS_ROOT=`cd $srcdir/c; pwd` PROJECT_ROOT=`pwd;` @@ -235,30 +270,39 @@ makefiles="$makefiles c/src/lib/librtems++/Makefile" # If the tests are enabled, then find all the test suite Makefiles AC_MSG_CHECKING([Are the test suites enabled? ]) +tests_enabled=yes AC_ARG_ENABLE(tests, \ -[ --disable-tests disable tests], \ - AC_MSG_ERROR(no), \ - AC_MSG_RESULT(yes) \ - RTEMS_CHECK_MAKEFILE(c/src/tests/tools/$target_cpu) \ - RTEMS_CHECK_MAKEFILE(c/src/tests/libtests) \ - RTEMS_CHECK_MAKEFILE(c/src/tests/sptests) \ - RTEMS_CHECK_MAKEFILE(c/src/tests/tmtests) \ - RTEMS_CHECK_MAKEFILE(c/src/tests/mptests) \ - RTEMS_CHECK_MAKEFILE(c/src/tests/psxtests) \ +[ --enable-tests enable tests], \ + [case "${enableval}" in + yes) AC_MSG_RESULT(yes) ;; + no) AC_MSG_RESULT(no) ; tests_enabled=no ;; + *) AC_MSG_ERROR(bad value ${enableval} for tests option) ;; + esac], +AC_MSG_RESULT(yes) ) +if test "$tests_enabled" = "yes"; then + RTEMS_CHECK_MAKEFILE(c/src/tests/tools/$target_cpu) + RTEMS_CHECK_MAKEFILE(c/src/tests/libtests) + RTEMS_CHECK_MAKEFILE(c/src/tests/sptests) + RTEMS_CHECK_MAKEFILE(c/src/tests/tmtests) + RTEMS_CHECK_MAKEFILE(c/src/tests/mptests) + if test "$RTEMS_HAS_POSIX" = "yes"; then + RTEMS_CHECK_MAKEFILE(c/src/tests/psxtests) + fi +fi + # If the HWAPI is enabled, the find the HWAPI Makefiles AC_MSG_CHECKING([Is the HWAPI enabled? ]) AC_ARG_ENABLE(hwapi, \ - [ --enable-hwapi enable hardware API library], \ - AC_MSG_RESULT(yes) \ - RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi), \ - AC_MSG_ERROR(no) \ -) - -AC_ARG_ENABLE(rtemsbsp, \ - [ --enable-rtemsbsp=bsp1 bsp2 .. BSPs to include in build], \ - RTEMS_BSP=$enableval \ +[ --enable-hwapi enable hardware API library], \ + [case "${enableval}" in + yes) AC_MSG_RESULT(yes) + RTEMS_CHECK_MAKEFILE(c/src/lib/libhwapi);; + no) AC_MSG_RESULT(no) ;; + *) AC_MSG_ERROR(bad value ${enableval} for hwapi option) ;; + esac], + AC_MSG_RESULT(no) ) AC_SUBST(RTEMS_BSP) @@ -294,6 +338,8 @@ c/src/exec/score/inline/Makefile c/src/exec/score/src/Makefile c/src/exec/score/tools/Makefile c/src/exec/score/tools/generic/Makefile +c/src/exec/wrapup/Makefile +c/src/exec/wrapup/rtems/Makefile c/src/lib/Makefile c/src/lib/include/Makefile c/src/lib/libbsp/Makefile -- cgit v1.2.3