source: rtems/c/configure.ac @ 7a6c7fe3

4.115
Last change on this file since 7a6c7fe3 was 12072880, checked in by Sebastian Huber <sebastian.huber@…>, on 12/04/14 at 09:03:50

Update bug report URL

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