2003-03-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>

* tools/Makefile.am: Remove.
	* configure.ac: Remove tools/Makefile.am
	* acinclude.m4: Fix build_subdir handling.
	* Makefile.am: Remove tools from SUBDIRS.
	Rename HOST|BUILD|TARGET_SUBDIRS into host|build|target_SUBDIRS.
This commit is contained in:
Ralf Corsepius
2003-03-13 01:31:53 +00:00
parent 58dccb1d18
commit 19c69fa101
5 changed files with 74 additions and 106 deletions

View File

@@ -1,3 +1,11 @@
2003-03-12 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* tools/Makefile.am: Remove.
* configure.ac: Remove tools.
* acinclude.m4: Fix build_subdir handling.
* Makefile.am: Remove tools from SUBDIRS.
Rename HOST|BUILD|TARGET_SUBDIRS into host|build|target_SUBDIRS.
2003-03-06 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* configure.ac: Remove AC_CONFIG_AUX_DIR.

View File

@@ -8,7 +8,7 @@
ACLOCAL_AMFLAGS = -I aclocal
SUBDIRS = tools make $(BUILD_SUBDIRS) $(HOST_SUBDIRS) $(TARGET_SUBDIRS)
SUBDIRS = make $(build_SUBDIRS) $(host_SUBDIRS) $(target_SUBDIRS)
AUTOMAKE_FILES = automake/compile.am automake/host.am automake/lib.am \
automake/local.am automake/subdirs.am \

View File

@@ -23,6 +23,21 @@ AC_DEFUN([_RTEMS_SUBST_IFNOT],
[AC_SUBST([$1],["[$]$1 $2"])])
])
AC_DEFUN([_RTEMS_TOOLS],
[
m4_ifdef([_RTEMS_$2_CONFIGDIRS_LIST],
[
_RTEMS_ARG_VAR([CC_FOR_$2],
[c-compiler to be used for $1 subdirs (default: auto-detected)])
_RTEMS_ARG_VAR([CFLAGS_FOR_$2],
[c-flags to be used for $1 subdirs (default: provided by autoconf)])
_RTEMS_ARG_VAR([CXX_FOR_$2],
[c++-compiler to be used for $1 subdirs (default: auto-detected)])
_RTEMS_ARG_VAR([CXXFLAGS_FOR_$2],
[c++-flags to be used for $1 subdirs (default: provided by autoconf)])
])
])
AC_DEFUN([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS],
[
AC_CONFIG_COMMANDS_PRE([
@@ -31,60 +46,61 @@ _RTEMS_HOST_CONFIG_PREPARE
_RTEMS_TARGET_CONFIG_PREPARE
AS_IF([test $build = $host],
[
[dnl
AS_IF([test $host = $target],
[dnl b=h, h=t, t=b
BUILD_SUBDIRS="${build_configdirs}"
build_SUBDIRS="${build_configdirs}"
build_configdirs="${build_configdirs}"
HOST_SUBDIRS=""
host_configdirs=""
TARGET_SUBDIRS=""
target_configdirs=""],
host_SUBDIRS="${host_configdirs}"
host_configdirs="${host_configdirs}"
target_SUBDIRS="${target_configdirs}"
target_configdirs="${target_configdirs}"],
[dnl b=h, h!=t, t!=b
BUILD_SUBDIRS="${build_configdirs}"
build_SUBDIRS="${build_configdirs}"
build_configdirs="${build_configdirs}"
HOST_SUBDIRS=""
host_configdirs=""
TARGET_SUBDIRS=`echo "${target_configdirs}" | \
host_SUBDIRS="${host_configdirs}"
host_configdirs="${host_configdirs}"
target_SUBDIRS=`echo "${target_configdirs}" | \
sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
target_configdirs="${target_configdirs}"
])
],[
],[dnl
AS_IF([test $host = $target],
[ dnl b!=h, h=t, b!=t
BUILD_SUBDIRS="${build_configdirs}"
build_SUBDIRS="${build_configdirs}"
build_configdirs="${build_configdirs}"
HOST_SUBDIRS=`echo "${host_configdirs}" | \
host_SUBDIRS=`echo "${host_configdirs}" | \
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
host_configdirs="${host_configdirs}"
TARGET_SUBDIRS=""
target_configdirs=""],
[
# target_SUBDIRS=`echo "${target_configdirs}" | \
# sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
# target_configdirs="${target_configdirs}"],
[dnl
AS_IF([test $build = $target],
[dnl b!=h, h!=t, b=t
BUILD_SUBDIRS="${build_configdirs}"
build_SUBDIRS="${build_configdirs}"
build_configdirs="${build_configdirs}"
HOST_SUBDIRS=`echo "${host_configdirs}" | \
host_SUBDIRS=`echo "${host_configdirs}" | \
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
host_configdirs="${host_configdirs}"
TARGET_SUBDIRS=""
target_configdirs=""],
# target_SUBDIRS="${target_configdirs}"
# target_configdirs="${target_configdirs}"],
[dnl b!=h, h!=t, b!=t
BUILD_SUBDIRS="${build_configdirs}"
build_SUBDIRS="${build_configdirs}"
build_configdirs="${build_configdirs}"
HOST_SUBDIRS=`echo "${host_configdirs}" | \
host_SUBDIRS=`echo "${host_configdirs}" | \
sed -e "s%\([[^ ]][[^ ]]*\)%$host_alias/\1%g"`
host_configdirs="${host_configdirs}"
TARGET_SUBDIRS=`echo "${target_configdirs}" | \
sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
target_configdirs="${target_configdirs}"
# target_SUBDIRS=`echo "${target_configdirs}" | \
# sed -e "s%\([[^ ]][[^ ]]*\)%$target_alias/\1%g"`
# target_configdirs="${target_configdirs}"
])
])
])
AC_SUBST(HOST_SUBDIRS)
AC_SUBST(TARGET_SUBDIRS)
AC_SUBST(BUILD_SUBDIRS)
AC_SUBST(host_SUBDIRS)
AC_SUBST(target_SUBDIRS)
AC_SUBST(build_SUBDIRS)
])
AC_CONFIG_COMMANDS_POST([
@@ -160,23 +176,18 @@ dnl _RTEMS_OUTPUT_SUBDIRS([host|target|build],[HOST|TARGET|BUILD])
AC_DEFUN([_RTEMS_OUTPUT_SUBDIRS],[
m4_ifdef([_RTEMS_$2_CONFIGDIRS_LIST],
[
_RTEMS_ARG_VAR([CC_FOR_$2],
[c-compiler to be used for $1 subdirs (default: auto-detected)])
_RTEMS_ARG_VAR([CFLAGS_FOR_$2],
[c-flags to be used for $1 subdirs (default: provided by autoconf)])
_RTEMS_ARG_VAR([CXX_FOR_$2],
[c++-compiler to be used for $1 subdirs (default: auto-detected)])
_RTEMS_ARG_VAR([CXXFLAGS_FOR_$2],
[c++-flags to be used for $1 subdirs (default: provided by autoconf)])
if test "$no_recursion" != yes; then
if test -n "${$2_SUBDIRS}"; then
if test -n "${$1_SUBDIRS}"; then
ac_sub_configure_args="[$]$1args"
# Always prepend --prefix to ensure using the same prefix
# in subdir configurations.
ac_sub_configure_args="'--prefix=$prefix' $ac_sub_configure_args"
# make sure that $1_subdir is not empty
test -n "$$1_subdir" || $1_subdir="."
case "$$1_subdir" in
"." ) ;;
* )
@@ -184,9 +195,6 @@ if test "$no_recursion" != yes; then
;;
esac
# make sure that $1_subdir is not empty
test -n "$$1_subdir" || $1_subdir="."
ac_popdir=`pwd`
for ac_dir in $$1_configdirs; do
@@ -247,18 +255,6 @@ fi
])
])
## PUBLIC: RTEMS_BUILD_CONFIG_SUBDIRS(build_subdir)
# subdirs to be built for the build environment
AC_DEFUN([RTEMS_BUILD_CONFIG_SUBDIRS],[
m4_append([_RTEMS_BUILD_CONFIGDIRS_LIST],[ $1])
dnl Always append to build_configdirs
AC_SUBST(build_configdirs,"$build_configdirs $1")
m4_divert_text([DEFAULTS],
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
])
AC_DEFUN([_RTEMS_CONFIGURE_ARGS_PRUNE],
[
$1_prune()
@@ -311,18 +307,28 @@ $1_prune()
}
])
## PUBLIC: RTEMS_BUILD_CONFIG_SUBDIRS(build_subdir)
# subdirs to be built for the build environment
AC_DEFUN([RTEMS_BUILD_CONFIG_SUBDIRS],[
m4_append([_RTEMS_BUILD_CONFIGDIRS_LIST],[ $1])
dnl Always append to build_configdirs
AC_SUBST(build_configdirs,"$build_configdirs $1")
m4_divert_text([DEFAULTS],
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
])
AC_DEFUN(_RTEMS_BUILD_CONFIG_PREPARE,[
## # Record the configure arguments in Makefile.
m4_ifdef([_RTEMS_BUILD_CONFIGDIRS_LIST],
[
m4_expand_once([_RTEMS_TOOLS([build],[BUILD])])
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([buildargs])])
eval buildargs_prune $ac_configure_args
buildargs="'--host=${build}' '--build=${build}' ${buildargs}"
test -n "${target_alias}" && \
buildargs="${buildargs} --target='${target_alias}'"
## AC_SUBST(buildargs)
build_subdir="."
],[])
])
@@ -332,21 +338,7 @@ build_subdir="."
AC_DEFUN([RTEMS_HOST_CONFIG_SUBDIRS],[
m4_append([_RTEMS_HOST_CONFIGDIRS_LIST],[ $1])dnl
if test $build = $host;
then
AS_IF([test $host = $target],
[_RTEMS_SUBST_IFNOT([build_configdirs],[$1])],
[_RTEMS_SUBST_IFNOT([build_configdirs],[$1])]
)
else
AS_IF([test $host = $target],
[_RTEMS_SUBST_IFNOT([host_configdirs],[$1])],
[AS_IF([test $build = $target],
[_RTEMS_SUBST_IFNOT([host_configdirs],[$1])],
[_RTEMS_SUBST_IFNOT([host_configdirs],[$1])]
)]
)
fi
_RTEMS_SUBST_IFNOT([host_configdirs],[$1])
m4_divert_text([DEFAULTS],
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
@@ -356,12 +348,10 @@ m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
AC_DEFUN(_RTEMS_HOST_CONFIG_PREPARE,[
m4_ifdef([_RTEMS_HOST_CONFIGDIRS_LIST],
[
## Record configure arguments in Makefile.
m4_expand_once([_RTEMS_TOOLS([host],[HOST])])
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([hostargs])])
eval hostargs_prune $ac_configure_args
hostargs="'--host=${host_alias}' '--build=${build}' '--target=${target_alias}' ${hostargs}"
## AC_SUBST(hostargs)
host_subdir="${host_alias}"
],[])
])
@@ -371,21 +361,7 @@ host_subdir="${host_alias}"
AC_DEFUN([RTEMS_TARGET_CONFIG_SUBDIRS],[
m4_append([_RTEMS_TARGET_CONFIGDIRS_LIST],[ $1])
if test $build = $host;
then
AS_IF([test $host = $target],
[_RTEMS_SUBST_IFNOT([build_configdirs],[$1])],
[_RTEMS_SUBST_IFNOT([target_configdirs],[$1])]
)
else
AS_IF([test $host = $target],
[_RTEMS_SUBST_IFNOT([host_configdirs],[$1])],
[AS_IF([test $build = $target],
[_RTEMS_SUBST_IFNOT([build_configdirs],[$1])],
[_RTEMS_SUBST_IFNOT([target_configdirs],[$1])]
)]
)
fi
_RTEMS_SUBST_IFNOT([target_configdirs],[$1])
m4_divert_text([DEFAULTS],
[ac_subdirs_all="$ac_subdirs_all m4_normalize([$1])"])
@@ -395,12 +371,10 @@ m4_expand_once([_RTEMS_COMMANDS_POST_CONFIG_SUBDIRS])
AC_DEFUN(_RTEMS_TARGET_CONFIG_PREPARE,[
m4_ifdef([_RTEMS_TARGET_CONFIGDIRS_LIST],
[
## Record the configure arguments in Makefile.
m4_expand_once([_RTEMS_TOOLS([target],[TARGET])])
m4_expand_once([_RTEMS_CONFIGURE_ARGS_PRUNE([targetargs])])
eval targetargs_prune $ac_configure_args
targetargs="'--host=${target_alias}' '--build=${build}' '--target=${target_alias}' ${targetargs}"
## AC_SUBST(targetargs)
target_subdir="${target_alias}"
],[])
])

View File

@@ -49,14 +49,8 @@ AC_MSG_WARN([]
fi
## NOTES:
## The tools/*-directories situation is unclear
## * tools/build are host-native tools to be installed on the host.
## * tools/cpu are host-native or host-cross-target-tools
## * tools/update are build-host-native tools
# these tools are built for the build environment
#
RTEMS_BUILD_CONFIG_SUBDIRS([tools/update])
RTEMS_HOST_CONFIG_SUBDIRS([tools/build])
RTEMS_HOST_CONFIG_SUBDIRS([tools/cpu])
@@ -70,7 +64,6 @@ AS_IF([test x"$enable_multilib" = x"yes"],[
RTEMS_TARGET_CONFIG_SUBDIRS([c])
AC_CONFIG_FILES([Makefile
tools/Makefile
make/Makefile
make/custom/Makefile
])

View File

@@ -1,7 +0,0 @@
## $Id$
SUBDIRS = update cpu
include $(top_srcdir)/automake/subdirs.am
include $(top_srcdir)/automake/host.am