summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--Makefile.am2
-rw-r--r--acinclude.m4156
-rw-r--r--configure.ac7
-rw-r--r--tools/Makefile.am7
5 files changed, 74 insertions, 106 deletions
diff --git a/ChangeLog b/ChangeLog
index a07b08f544..f637462f5e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/Makefile.am b/Makefile.am
index c807ffd3a3..9f92e847c5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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 \
diff --git a/acinclude.m4 b/acinclude.m4
index 0a1b9d94da..d768827b99 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -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}"
],[])
])
diff --git a/configure.ac b/configure.ac
index 79f3ebda81..ca97f52452 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
])
diff --git a/tools/Makefile.am b/tools/Makefile.am
deleted file mode 100644
index a088ec9f6a..0000000000
--- a/tools/Makefile.am
+++ /dev/null
@@ -1,7 +0,0 @@
-## $Id$
-
-
-SUBDIRS = update cpu
-
-include $(top_srcdir)/automake/subdirs.am
-include $(top_srcdir)/automake/host.am