source: rtems/c/configure.ac @ 5cbc9c5

5
Last change on this file since 5cbc9c5 was adb85dd, checked in by Sebastian Huber <sebastian.huber@…>, on 04/21/18 at 08:22:08

bsps: Move make/custom/* files to bsps

Adjust various build files. Remove automatic generation of the
c/src/lib/libbsp/*/acinclude.m4 files from bootstrap script.

This patch is a part of the BSP source reorganization.

Update #3285.

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