source: rtems/c/configure.ac @ c8dcdf54

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