Changeset ba748523 in rtems


Ignore:
Timestamp:
Dec 20, 2001, 5:33:23 PM (19 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, 4.8, 4.9, 5, master
Children:
8fec915
Parents:
f92cc34
Message:

2001-12-20 Ralf Corsepius <corsepiu@…>

  • configure.ac: Reworked for multilibs, reflect changes to aclocal/*.m4.
  • aclocal/subdirs.m4: New file.
  • aclocal/multi.m4: New file, adopted from autoconf-2.52 w/ modifications.
  • aclocal/check-posix.m4: Apply AS_IF.
  • aclocal/config-subdirs.m4: Reflect changes to other m4-macros.
  • aclocal/env-rtemsbsp.m4: Add PROJECT_INCLUDE, PROJECT_RELEASE. Add AM_CONDITIONAL(MULTILIB). Adapt GCC_SPECS to multilibs.
  • aclocal/env-rtemscpu.m4: Remove RTEMS_BSP. Add support for MULTIBUILDTOP, MULTISUBDIR. Adapt GCC_SPECS to multilibs. Add PROJECT_INCLUDE, PROJECT_RELEASE, includedir, libdir.
  • aclocal/multilib.m4: Fix m4-quoting, adopt automake-1.5's OUTPUT_COMMANDS.
  • aclocal/project-root.m4: Remove PROJECT_INCLUDE, PROJECT_RELEASE.
  • aclocal/rtems-debug.m4: Minor cleanups.
  • aclocal/rtems-top.m4: Minor cleanups.
  • automake/compile.am: Further steps towards automake's rules.
Files:
2 added
11 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    rf92cc34 rba748523  
     12001-12-20      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
     2
     3        * configure.ac: Reworked for multilibs, reflect changes to aclocal/*.m4.
     4        * aclocal/subdirs.m4: New file.
     5        * aclocal/multi.m4: New file, adopted from autoconf-2.52 w/
     6        modifications.
     7        * aclocal/check-posix.m4: Apply AS_IF.
     8        * aclocal/config-subdirs.m4: Reflect changes to other m4-macros.
     9        * aclocal/env-rtemsbsp.m4: Add PROJECT_INCLUDE, PROJECT_RELEASE.
     10        Add AM_CONDITIONAL(MULTILIB). Adapt GCC_SPECS to multilibs.
     11        * aclocal/env-rtemscpu.m4: Remove RTEMS_BSP. Add support for
     12        MULTIBUILDTOP, MULTISUBDIR. Adapt GCC_SPECS to multilibs.
     13        Add PROJECT_INCLUDE, PROJECT_RELEASE, includedir, libdir.
     14        * aclocal/multilib.m4: Fix m4-quoting, adopt automake-1.5's
     15        OUTPUT_COMMANDS.
     16        * aclocal/project-root.m4: Remove PROJECT_INCLUDE, PROJECT_RELEASE.
     17        * aclocal/rtems-debug.m4: Minor cleanups.
     18        * aclocal/rtems-top.m4: Minor cleanups.
     19        * automake/compile.am: Further steps towards automake's rules.
     20
    1212001-12-18      Ralf Corsepius <corsepiu@faw.uni-ulm.de>
    222
  • aclocal/check-posix.m4

    rf92cc34 rba748523  
    3131AC_DEFUN(RTEMS_DEFINE_POSIX_API,
    3232[AC_REQUIRE([RTEMS_CHECK_POSIX_API])dnl
    33 if test x"${HAS_POSIX_API}" = x"yes";
    34 then
    35   AC_DEFINE_UNQUOTED(RTEMS_POSIX_API,1,[if posix api is supported])
    36 fi
     33AS_IF(
     34  [test x"${HAS_POSIX_API}" = x"yes"],
     35  [AC_DEFINE_UNQUOTED(RTEMS_POSIX_API,1,[if posix api is supported])])
    3736])
  • aclocal/config-subdirs.m4

    rf92cc34 rba748523  
    8787    fi
    8888])
    89 
    90 AC_DEFUN(RTEMS_TARGET_CONFIG_PREPARE,[
    91 # Record target_configdirs and the configure arguments in Makefile.
    92 targargs=`echo "${ac_configure_args}" | \
    93         sed -e 's/--no[[^       ]]*//' \
    94             -e 's/--cache[[a-z-]]*=[[^  ]]*//' \
    95             -e 's/--ho[[a-z-]]*=[[^     ]]*//' \
    96             -e 's/--bu[[a-z-]]*=[[^     ]]*//' \
    97             -e 's/--ta[[a-z-]]*=[[^     ]]*//'`;
    98 
    99 targargs="--host=${target_alias} --build=${build} ${targargs}"
    100 AC_SUBST(targargs)
    101 ])
    102 
    103 AC_DEFUN(RTEMS_TARGET_CONFIG_SUBDIRS,[
    104 #
    105 # TARGET_CONFIG_SUBDIRS
    106 #
    107 if test "$no_recursion" != yes; then
    108  if test $target != $build; then
    109   # Remove --srcdir arguments so they do not pile up.
    110   ac_sub_configure_args=
    111   ac_prev=
    112   for ac_arg in $targargs; do
    113     if test -n "$ac_prev"; then
    114       ac_prev=
    115       continue
    116     fi
    117     case "$ac_arg" in
    118     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    119       ac_prev=srcdir ;;
    120     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    121       ;;
    122     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    123     esac
    124   done
    125 
    126   if test -n "$target_configdirs" && test -d $target_subdir;
    127   then :;
    128   else
    129     AS_MKDIR_P(["$target_subdir"])
    130   fi
    131 
    132   for ac_config_dir in $target_configdirs; do
    133     # Do not complain, so a configure script can configure whichever
    134     # parts of a large source tree are present.
    135     if test ! -d $srcdir/$ac_config_dir; then
    136       continue
    137     fi
    138 
    139     _RTEMS_PUSH_BUILDDIR([$target_subdir/$ac_config_dir])
    140 
    141     _RTEMS_SUB_SRCDIR([$ac_config_dir],[$target_subdir])
    142 
    143     # The recursion is here.
    144     if test -n "$ac_sub_configure"; then
    145 
    146       # Make the cache file name correct relative to the subdirectory.
    147       ac_sub_cache_file=$cache_file
    148       _RTEMS_GIVEN_INSTALL
    149 
    150       echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
    151       # The eval makes quoting arguments work.
    152       CC=${CC_FOR_TARGET}; export CC;
    153       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
    154         $ac_sub_configure_args --srcdir=$ac_sub_srcdir \
    155         --with-target-subdir=$target_subdir \
    156         --cache-file=$ac_sub_cache_file \
    157         --exec-prefix="\${prefix}/$target_subdir"
    158       then :
    159       else
    160         AC_MSG_ERROR([$ac_sub_configure failed for $ac_config_dir])
    161       fi
    162     fi
    163 
    164     _RTEMS_POP_BUILDDIR
    165   done
    166  fi
    167 fi
    168 ])
    169 
    170 AC_DEFUN(RTEMS_HOST_CONFIG_PREPARE,[
    171 # Record host_configdirs and the configure arguments in Makefile.
    172 hostargs=`echo "${ac_configure_args}" | \
    173         sed -e 's/--no[[^       ]]*//' \
    174             -e 's/--cache[[a-z-]]*=[[^  ]]*//' \
    175             -e 's/--ho[[a-z-]]*=[[^     ]]*//' \
    176             -e 's/--bu[[a-z-]]*=[[^     ]]*//' \
    177             -e 's/--ta[[a-z-]]*=[[^     ]]*//'`;
    178 
    179 hostargs="--host=${host_alias} --build=${build} --target=${target_alias} ${hostargs}"
    180 AC_SUBST(hostargs)
    181 ])
    182 
    183 AC_DEFUN(RTEMS_HOST_CONFIG_SUBDIRS,[
    184 #
    185 # HOST_CONFIG_SUBDIRS
    186 #
    187 if test "$no_recursion" != yes; then
    188 
    189  if test $build != $host; then
    190   # Remove --srcdir arguments so they do not pile up.
    191   ac_sub_configure_args=
    192   ac_prev=
    193   for ac_arg in $hostargs; do
    194     if test -n "$ac_prev"; then
    195       ac_prev=
    196       continue
    197     fi
    198     case "$ac_arg" in
    199     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
    200       ac_prev=srcdir ;;
    201     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
    202       ;;
    203     *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;;
    204     esac
    205   done
    206 
    207   if test -n "$host_configdirs" && test -d $host_subdir;
    208   then :;
    209   else
    210     AS_MKDIR_P(["$host_subdir"])
    211   fi
    212 
    213   for ac_config_dir in $host_configdirs; do
    214     # Do not complain, so a configure script can configure whichever
    215     # parts of a large source tree are present.
    216     if test ! -d $srcdir/$ac_config_dir; then
    217       continue
    218     fi
    219 
    220     _RTEMS_PUSH_BUILDDIR([$host_subdir/$ac_config_dir])
    221 
    222     _RTEMS_SUB_SRCDIR([$ac_config_dir],[$host_subdir])
    223 
    224     # The recursion is here.
    225     if test -n "$ac_sub_configure"; then
    226 
    227       # Make the cache file name correct relative to the subdirectory.
    228       ac_sub_cache_file=$cache_file
    229       _RTEMS_GIVEN_INSTALL
    230 
    231       echo "[running ${CONFIG_SHELL-/bin/sh} $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file] --srcdir=$ac_sub_srcdir"
    232       CC=${CC_FOR_HOST-$host_alias-gcc}; export CC;
    233       # The eval makes quoting arguments work.
    234       if eval ${CONFIG_SHELL-/bin/sh} $ac_sub_configure \
    235         $ac_sub_configure_args --srcdir=$ac_sub_srcdir \
    236         --with-target-subdir=$host_subdir \
    237         --cache-file=$ac_sub_cache_file
    238       then :
    239       else
    240         AC_MSG_ERROR([$ac_sub_configure failed for $ac_config_dir])
    241       fi
    242     fi
    243 
    244     _RTEMS_POP_BUILDDIR
    245   done
    246  fi
    247 fi
    248 ])
  • aclocal/env-rtemsbsp.m4

    rf92cc34 rba748523  
    2525AC_SUBST(RTEMS_BSP_SPECS)
    2626
    27 GCC_SPECS="-B\$(PROJECT_ROOT)/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/"
     27GCC_SPECS="-B\$(PROJECT_ROOT)/lib/ -B\$(PROJECT_ROOT)/$RTEMS_BSP/lib/"
    2828AC_SUBST(GCC_SPECS)
     29
     30PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
     31AC_SUBST(PROJECT_INCLUDE)
     32
     33PROJECT_RELEASE="\$(PROJECT_ROOT)/$RTEMS_BSP"   
     34AC_SUBST(PROJECT_RELEASE)
    2935
    3036RTEMS_ROOT=$PROJECT_ROOT/c/$RTEMS_BSP
     
    3541AC_SUBST(BARE_CPU_CFLAGS)
    3642
    37 AM_CONDITIONAL(RTEMS_CONFIG_PER_BSP, true);
     43AM_CONDITIONAL([RTEMS_CONFIG_PER_BSP],[true])
     44AM_CONDITIONAL([MULTILIB],[false])
    3845
    3946includedir="\${exec_prefix}/\$(RTEMS_BSP)/lib/include"
  • aclocal/env-rtemscpu.m4

    rf92cc34 rba748523  
    44[AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
    55
    6 if test x"$multilib" = x"no"; then
    7   RTEMS_ENV_RTEMSBSP
    8   RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
    9 else
     6if test x"$multilib" = x"yes"; then
    107## FIXME: There is no multilib BSP
    11   rtems_cv_RTEMS_BSP="multilib"
    12   RTEMS_BSP="$rtems_cv_RTEMS_BSP"
    13   AC_SUBST(RTEMS_BSP)
    14 
    158  RTEMS_BSP_SPECS=""
    169  AC_SUBST(RTEMS_BSP_SPECS)
    1710
    18   GCC_SPECS="-B\$(PROJECT_ROOT)/ -B\$(PROJECT_ROOT)/lib/"
     11  if test -n "$with_multisubdir"; then
     12    MULTIBUILDTOP=`echo "/$with_multisubdir" | sed 's,/[[^\\/]]*,../,g'`
     13  fi
     14  AC_SUBST(MULTIBUILDTOP)
     15
     16  if test -n "$with_multisubdir"; then
     17    MULTISUBDIR="/$with_multisubdir"
     18  fi
     19  AC_SUBST(MULTISUBDIR)
     20
     21  PROJECT_ROOT="${RTEMS_TOPdir}/\$(MULTIBUILDTOP)\$(top_builddir)"
     22  GCC_SPECS="-isystem \$(PROJECT_ROOT)/lib/include"
    1923  AC_SUBST(GCC_SPECS)
    2024
    21   RTEMS_ROOT=$PROJECT_ROOT/c
     25  PROJECT_INCLUDE="\$(PROJECT_ROOT)/lib/include"
     26  AC_SUBST(PROJECT_INCLUDE)
     27
     28  PROJECT_RELEASE="\$(PROJECT_ROOT)"
     29  AC_SUBST(PROJECT_RELEASE)
     30
     31  RTEMS_ROOT=${PROJECT_ROOT}
    2232  AC_SUBST(RTEMS_ROOT)
     33
     34  includedir="\${exec_prefix}/lib/include"
     35  libdir="${libdir}\$(MULTISUBDIR)"
     36else
     37  RTEMS_ENV_RTEMSBSP
     38  RTEMS_CHECK_CUSTOM_BSP(RTEMS_BSP)
    2339fi
    2440])
  • aclocal/multilib.m4

    rf92cc34 rba748523  
    1717])
    1818
    19 AC_DEFUN(RTEMS_ENABLE_MULTILIB_MASTER,
     19AC_DEFUN([RTEMS_ENABLE_MULTILIB_MASTER],
    2020[
    2121AC_REQUIRE([RTEMS_ENABLE_MULTILIB])
     
    4242
    4343AC_OUTPUT_COMMANDS(
    44 [if test -n "$CONFIG_FILES"; then
    45     ac_file=]ifelse([$1],,Makefile,[$1])[ \
    46       . ${multilib_basedir}/../config-ml.in
    47 fi],[
     44[case " $CONFIG_FILES " in
     45 *" ]m4_if([$1],,Makefile,[$1])[ "*)
     46    ac_file=]m4_if([$1],,Makefile,[$1])[ . ${multilib_basedir}/config-ml.in
     47esac],
     48[
    4849  srcdir=${srcdir}
    4950  host=${host}
  • aclocal/project-root.m4

    rf92cc34 rba748523  
    1919PACKHEX="\$(PROJECT_TOPdir)/tools/build/packhex"
    2020AC_SUBST(PACKHEX)
    21 
    22 PROJECT_INCLUDE="\$(PROJECT_ROOT)/$RTEMS_BSP/lib/include"
    23 AC_SUBST(PROJECT_INCLUDE)
    24 
    25 PROJECT_RELEASE="\$(PROJECT_ROOT)/$RTEMS_BSP"
    26 AC_SUBST(PROJECT_RELEASE)
    2721])
    2822
  • aclocal/rtems-debug.m4

    rf92cc34 rba748523  
    55AC_ARG_ENABLE(rtems-debug,
    66AC_HELP_STRING([--enable-rtems-debug],[enable RTEMS_DEBUG]),
    7 [case "${enableval}" in
    8   yes) RTEMS_DEBUG=yes ;;
    9   no) RTEMS_DEBUG=no ;;
    10   *) AC_MSG_ERROR([bad value ${enableval} for RTEMS_DEBUG]) ;;
    11 esac],[RTEMS_DEBUG=no])
     7[case "${enable_rtems_debug}" in
     8  yes) enable_rtems_debug=yes ;;
     9  no)  enable_rtems_debug=no ;;
     10  *) AC_MSG_ERROR([bad value ${enable_rtems_debug} for RTEMS_DEBUG]) ;;
     11esac],[enable_rtems_debug=no])
    1212])
    1313
    1414AC_DEFUN(RTEMS_CHECK_RTEMS_DEBUG,
    1515[AC_REQUIRE([RTEMS_ENABLE_RTEMS_DEBUG])
    16 if test x"${RTEMS_DEBUG}" = x"yes";
    17 then
    18   AC_DEFINE_UNQUOTED(RTEMS_DEBUG,1,[if RTEMS_DEBUG is enabled])
    19 fi
     16AS_IF([test x"${enable_rtems_debug}" = x"yes"]
     17  [AC_DEFINE_UNQUOTED(RTEMS_DEBUG,1,[if RTEMS_DEBUG is enabled])])
    2018])
    2119
  • aclocal/rtems-top.m4

    rf92cc34 rba748523  
    3737if test "$with_target_subdir" = "." ; then
    3838# Native
    39 PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)';
     39PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
    4040else
    4141# Cross
    42 PROJECT_ROOT=${RTEMS_TOPdir}/'$(top_builddir)'
     42PROJECT_ROOT="${RTEMS_TOPdir}/\$(top_builddir)"
    4343fi
    4444AC_SUBST(PROJECT_ROOT)
  • automake/compile.am

    rf92cc34 rba748523  
    119119        $(AM_LDFLAGS) $(LDFLAGS) -o $@
    120120
    121 CXXLD = $(CXX)
    122121CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
    123122        $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
     123CXXLD = $(CXX)
    124124CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) \
    125125        $(AM_LDFLAGS) $(LDFLAGS) -o $@
    126126
    127127AS = $(CC)
    128 ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS) -o $@
     128ASCOMPILE = $(AS) $(AM_ASFLAGS) $(ASFLAGS)
    129129
    130130${ARCH}/%.o: %.c
     
    144144
    145145${ARCH}/%.o: %.S
    146         ${ASCOMPILE} -DASM -c $<
     146        ${ASCOMPILE} -DASM -o $@ -c $<
    147147
    148148# Make foo.rel from foo.o
     
    177177##       Replace $(ARCH) value with string $(ARCH)
    178178##           so that it will for debug and profile cases
    179         $(COMPILE) $(AM_CPPFLAGS) $(AM_CFLAGS) -M   $^    |  \
     179        $(COMPILE) -M   $^    |  \
    180180        sed -e 's?^\(.*\)\.o[ ]*:?$$(ARCH)/\1.o:?' \
    181181            -e 's?$(ARCH)/?$$(ARCH)/?'   >$(DEPEND).tmp
     
    205205if RTEMS_USE_GCC272
    206206define make-rel
    207         $(LINK) -nostdlib -Wl,-r $(XLDFLAGS) -o $@ $^
     207        $(LINK) -nostdlib -Wl,-r $(XLDFLAGS) $^
    208208endef
    209209else
  • configure.ac

    rf92cc34 rba748523  
    66AC_INIT
    77AC_CONFIG_SRCDIR([c])
    8 RTEMS_TOP(.)
     8RTEMS_TOP([.])
    99
    1010# Abort if trying to build inside of the source tree.
     
    3434RTEMS_ENABLE_RTEMS_DEBUG
    3535RTEMS_ENABLE_RTEMSBSP(dummy)
     36RTEMS_ENABLE_MULTILIB
    3637
    3738if test $host != $build; then
     
    5455# these tools are built for the build environment
    5556#
    56 build_tools="tools/update"
     57RTEMS_BUILD_CONFIG_SUBDIRS([tools/update])
    5758
    58 # these libraries are built for the host environment
    59 #
    60 host_libs=""
     59RTEMS_HOST_CONFIG_SUBDIRS([tools/build])
     60RTEMS_HOST_CONFIG_SUBDIRS([tools/cpu])
    6161
    62 # these tools are built for the host environment
    63 #
    64 host_tools="tools/build tools/cpu"
    65 
    66 # these libraries are built for the target environment, and are built after
    67 # the host libraries and the host tools (which may be a cross compiler)
    68 #
    69 target_libs="c"
    70 
    71 # these tools are built using the target libs, and are intended to run only
    72 # in the target environment
    73 #
    74 target_tools=""
    75 
    76 ## All tools belong in one of the five categories, and are assigned above.
    77 ## ${host_configdirs} is directories we build using the host tools.
    78 ## ${target_configdirs} is directories we build using the target tools.
    79 #
    80 host_configdirs="${host_libs} ${host_tools}"
    81 AC_SUBST(host_configdirs)
    82 
    83 target_configdirs="${target_libs} ${target_tools}"
    84 AC_SUBST(target_configdirs)
    85 
    86 RTEMS_TARGET_CONFIG_PREPARE
    87 target_subdir=${target_alias}
    88 
    89 RTEMS_HOST_CONFIG_PREPARE
    90 host_subdir=${host_alias}
    91 
    92 if test $build = $host;
    93 then
    94   BUILD_SUBDIRS="$build_tools $host_configdirs"
    95 
    96   if test $build = $target;
    97   then
    98     BUILD_SUBDIRS="$BUILD_SUBDIRS $target_configdirs";
    99   else
    100     TARGET_SUBDIRS=`echo "$target_configdirs" | \
    101       sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
    102   fi
    103 else
    104 ## If building Canadian cross, disable the target directories
    105   target_configdirs=""
    106   BUILD_SUBDIRS="$build_tools"
    107   TARGET_SUBDIRS=`echo "$host_configdirs" | \
    108     sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
     62RTEMS_TARGET_CONFIG_SUBDIRS([c/make])
     63if test x"$enable_multilib" = x"yes"; then
     64RTEMS_TARGET_CONFIG_SUBDIRS([c/src/exec])
     65# FIXME: Not yet
     66# RTEMS_TARGET_CONFIG_SUBDIRS([c/src/lib])
    10967fi
    110 
    111 AC_CONFIG_SUBDIRS($BUILD_SUBDIRS)
    112 AC_SUBST(TARGET_SUBDIRS)
    113 AC_SUBST(BUILD_SUBDIRS)
     68RTEMS_TARGET_CONFIG_SUBDIRS([c])
    11469
    11570AC_CONFIG_FILES([Makefile
     
    12075make/compilers/Makefile
    12176doc/Makefile])
     77
    12278AC_OUTPUT
    123 
    124 RTEMS_TARGET_CONFIG_SUBDIRS
    125 RTEMS_HOST_CONFIG_SUBDIRS
Note: See TracChangeset for help on using the changeset viewer.