source: rtems/c/configure.ac @ 309dbd0

4.104.115
Last change on this file since 309dbd0 was 309dbd0, checked in by Ralf Corsepius <ralf.corsepius@…>, on 11/28/09 at 06:28:41

Whitespace removal.

  • Property mode set to 100644
File size: 2.5 KB
RevLine 
[66387986]1## Process this file with autoconf to produce a configure script.
[309dbd0]2##
[66387986]3## $Id$
[eb299afc]4
[ba2c04f]5AC_PREREQ(2.60)
[fcb0cd46]6AC_INIT([rtems-c],[_RTEMS_VERSION],[http://www.rtems.org/bugzilla])
[1204f22]7AC_CONFIG_SRCDIR([TOOL_TARGETS])
[eb299afc]8RTEMS_TOP(..)
9
10RTEMS_CANONICAL_TARGET_CPU
11
[ba2c04f]12AM_INIT_AUTOMAKE([no-define foreign 1.10])
[eb299afc]13AM_MAINTAINER_MODE
14
[66387986]15## These options are used within this file.
[1204f22]16RTEMS_ENABLE_RTEMSBSP
[eb299afc]17
[2d1daae]18# Set up rtems_bsp
[1204f22]19AS_IF([test x"$enable_rtemsbsp" = x"no"],[
[2d1daae]20# --disable-rtemsbsp
[1204f22]21  rtems_bsp=""
22],[
23  AS_IF([test -z "$enable_rtemsbsp"],
[2d1daae]24    [# --enable-rtemsbsp=""
25    RTEMS_CHECK_BSPS(rtems_bsp)],
26    [# --enable-rtemsbsp="list"
27    rtems_bsp="$enable_rtemsbsp"])
28])
[eb299afc]29
[2d1daae]30# Check sanity of BSPs in $rtems_bsp
31for _rtems_bsp in : $rtems_bsp; do test "x$_rtems_bsp" = x: && continue
32  # make sure there is a make/custom file for the bsp
33  _RTEMS_CHECK_CUSTOM_BSP([$_rtems_bsp.cfg],[bsp_cfg])
[eb299afc]34
[2d1daae]35  AS_IF([test -n "$bsp_cfg"],
36  [
37    # retrieve bsp_family
38    RTEMS_BSP_ALIAS([$_rtems_bsp],[rtems_bsp_family])
[eb299afc]39
[309dbd0]40    # Is there a configure script for the BSP?
[8d9d5bd]41    AS_IF([test -r "$srcdir/$RTEMS_TOPdir/c/src/lib/libbsp/$RTEMS_CPU/$rtems_bsp_family/configure"],
[2d1daae]42      [RTEMS_BSP_LIST="$RTEMS_BSP_LIST $_rtems_bsp"])
43  ])
[eb299afc]44done
45
46#
47# Compose the configuration arguments to be passed to c/src/configure
48#
[1204f22]49##
[eb299afc]50## Partially borrowed from autoconf-2.13
51##
52
53## Adjust paths
[eab41f63]54_RTEMS_ADJUST_SRCDIR([rtems_bsp_configure],[src])
55rtems_bsp_configure="$rtems_bsp_configure/configure"
[2fe08ccb]56  RTEMS_CONFIGURE_ARGS_QUOTE([rtems_bsp_configure_args],
[45789f2]57    [-enable-rtemsbsp=* | --enable-rtemsbsp=* ) ;;])
[eb299afc]58
59rtems_bsp_configure="$rtems_bsp_configure $rtems_bsp_configure_args"
[1b7c9183]60rtems_bsp_configure="$rtems_bsp_configure '--with-project-root=../../'"
61rtems_bsp_configure="$rtems_bsp_configure '--with-project-top=../../'"
[eb299afc]62AC_SUBST(rtems_bsp_configure)
63
64AC_SUBST(RTEMS_BSP_LIST)
65
[70810dc]66# Explicitly list all Makefiles here
[73dc152]67AC_CONFIG_FILES([Makefile],[
68for bsp in : $RTEMS_BSP_LIST; do test "x$bsp" = x: && continue
69cat >> Makefile << BSPEOF
70
71$bsp: src/configure
72        @set fnord \$(MAKEFLAGS); amf=\[$]\[$]2; \\
73          echo "Configuring RTEMS_BSP=$bsp"; \\
[92de6270]74          \$(MKDIR_P) $bsp; \\
[73dc152]75          ( cd $bsp && \\
76            CONFIG_SHELL=\$(SHELL) RTEMS_BSP=$bsp \$(rtems_bsp_configure) ) \\
77          || case "\$\$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac;
78BSPEOF
79done
80],[RTEMS_BSP_LIST="$RTEMS_BSP_LIST"])
[66387986]81AC_OUTPUT
[2d1daae]82AS_IF([test -n "$RTEMS_BSP_LIST"],[
[eb299afc]83echo
84echo target architecture: $target_cpu.
[2d1daae]85echo available BSPs: $RTEMS_BSP_LIST.
[7b79761]86echo \'${MAKE} all\' will build the following BSPs: $RTEMS_BSP_LIST.
87echo other BSPs can be built with \'${MAKE} RTEMS_BSP=\"bsp1 bsp2 ...\"\'
[eb299afc]88echo
[2d1daae]89])
Note: See TracBrowser for help on using the repository browser.