source: rtems/c/configure.ac @ 1efa1c8

5
Last change on this file since 1efa1c8 was aa567bc1, checked in by Chris Johns <chrisj@…>, on 04/10/18 at 06:06:39

configure: Add subdir-objects to all automake flags.

This option silences warning with automake-1.16.1 allowing us to
upgrade to that version.

This change has been tested with automake-1.12.6 and automake-1.16.1.
It seems version 1.16.1 configures slower than 1.12.6 for the same
source and BSP. The newer versions is 6 second slower.

Close #3387.

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