source: rtems/c/configure.ac @ 73dc152

4.104.114.84.9
Last change on this file since 73dc152 was 73dc152, checked in by Ralf Corsepius <ralf.corsepius@…>, on Dec 14, 2003 at 4:35:54 PM

2003-12-14 Ralf Corsepius <corsepiu@…>

  • Makefile.am: Remove RTEMS_BSP-subdir rule.
  • configure.ac: Let AC_CONFIG_FILES(Makefile..) append explictit rules for RTEMS_BSP-subdirs.
  • Property mode set to 100644
File size: 2.2 KB
Line 
1## Process this file with autoconf to produce a configure script.
2##
3## $Id$
4
5AC_PREREQ(2.59)
6AC_INIT([rtems-c],[_RTEMS_VERSION],[rtems-bugs@rtems.com])
7AC_CONFIG_SRCDIR([src])
8RTEMS_TOP(..)
9
10RTEMS_CANONICAL_TARGET_CPU
11
12AM_INIT_AUTOMAKE([no-define foreign 1.8])
13AM_MAINTAINER_MODE
14
15## These options are used within this file.
16RTEMS_ENABLE_BARE
17RTEMS_ENABLE_RTEMSBSP(rtems_bsp)
18
19RTEMS_CHECK_CPU
20
21AS_IF([test -z "$rtems_bsp"],
22  [RTEMS_CHECK_BSPS(rtems_bsp)])
23
24for i in $rtems_bsp; do
25
26    # make sure there is a make/custom file for the bsp
27    RTEMS_CHECK_CUSTOM_BSP(i)
28 
29    RTEMS_BSP_ALIAS($i,bspdir)
30
31    # Is there code where there should be for this BSP?
32    # The bare bsp is a special case as it is not under the RTEMS_CPU path
33    case $bspdir in
34      bare)
35        bspcpudir=
36        ;;
37      *)
38        bspcpudir=$RTEMS_CPU/
39        ;;
40    esac
41     
42    if test -d "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$bspcpudir$bspdir"; then
43      RTEMS_BSP_LIST="$RTEMS_BSP_LIST $i"
44    else
45      AC_MSG_ERROR([unable to find libbsp directory ($bspdir) for  $i])
46    fi
47done
48
49#
50# Compose the configuration arguments to be passed to c/src/configure
51#
52 ##
53## Partially borrowed from autoconf-2.13
54##
55
56## Adjust paths
57_RTEMS_ADJUST_SRCDIR([rtems_bsp_configure],[src])
58rtems_bsp_configure="$rtems_bsp_configure/configure"
59  RTEMS_CONFIGURE_ARGS_QUOTE([rtems_bsp_configure_args],
60    [-enable-rtemsbsp=* | --enable-rtemsbsp=* ) ;;])
61
62rtems_bsp_configure="$rtems_bsp_configure $rtems_bsp_configure_args"
63AC_SUBST(rtems_bsp_configure)
64
65AC_SUBST(RTEMS_BSP_LIST)
66
67# Explicitly list all Makefiles here
68AC_CONFIG_FILES([Makefile],[
69for bsp in : $RTEMS_BSP_LIST; do test "x$bsp" = x: && continue
70cat >> Makefile << BSPEOF
71
72$bsp: src/configure
73        @set fnord \$(MAKEFLAGS); amf=\[$]\[$]2; \\
74          echo "Configuring RTEMS_BSP=$bsp"; \\
75          \$(mkdir_p) $bsp; \\
76          ( cd $bsp && \\
77            CONFIG_SHELL=\$(SHELL) RTEMS_BSP=$bsp \$(rtems_bsp_configure) ) \\
78          || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac;
79BSPEOF
80done
81],[RTEMS_BSP_LIST="$RTEMS_BSP_LIST"])
82AC_OUTPUT
83
84echo
85echo target architecture: $target_cpu.
86echo available BSPs: $rtems_bsp.
87echo \'${MAKE} all\' will build the following BSPs: $RTEMS_BSP_LIST.
88echo other BSPs can be built with \'${MAKE} RTEMS_BSP=\"bsp1 bsp2 ...\"\'
89echo
Note: See TracBrowser for help on using the repository browser.