From 8cdb582b49c1528216cfd316183536735474c899 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Mon, 12 Apr 1999 15:41:33 +0000 Subject: Patch from Ralf Corsepius : This patch addresses a few minor issues and contains a few (minor) preparations for automake. * configure.in: Fix for handing c/src/tests subdirectory handling (FIX) * aclocal/rtems-top.m4: + Add TARGET_SUBDIR and --with-target-subdir (preparation of future enhancements for cross-compiling) + Activate RTEMS_ROOT handling (automake preparation) * automake/*.am: replace comments "#" with "##" so that comments won't get included into Makefile.in's anymore * c/update-tools/* automake support (NEW) * ./autogen update/enhancement (cf. ./autogen for details) After applying this patch please run: ./autogen cvs add c/update-tools/configure.in cvs add c/update-tools/Makefile.am cvs add c/update-tools/aclocal.m4 --- tools/cpu/unix/Makefile.in | 18 ++++++++------ tools/cpu/unix/aclocal.m4 | 11 ++++++--- tools/cpu/unix/configure | 61 +++++++++++++++++++++++++++++----------------- 3 files changed, 56 insertions(+), 34 deletions(-) (limited to 'tools/cpu/unix') diff --git a/tools/cpu/unix/Makefile.in b/tools/cpu/unix/Makefile.in index 935ecd11b1..a0c2ff2ba7 100644 --- a/tools/cpu/unix/Makefile.in +++ b/tools/cpu/unix/Makefile.in @@ -15,13 +15,6 @@ # -# $Id$ - -# NOTE: This is a temporary work-around to keep -# "make debug" and "make debug_install" working. -# Once automake is fully integrated these make targets -# and this file will probably be removed - SHELL = @SHELL@ @@ -77,6 +70,7 @@ CC = @CC@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PROJECT_ROOT = @PROJECT_ROOT@ +RTEMS_ROOT = @RTEMS_ROOT@ RTEMS_TOPdir = @RTEMS_TOPdir@ VERSION = @VERSION@ project_bindir = @project_bindir@ @@ -376,6 +370,8 @@ debug_install-am: debug_install: debug_install-am +.PHONY: debug debug_install debug-am + profile-am: profile: profile-am @@ -384,7 +380,13 @@ profile_install-am: profile_install: profile_install-am -.PHONY: debug debug_install profile profile_install +.PHONY: profile profile_install profile-am + +preinstall-am: + +preinstall: preinstall-am + +.PHONY: preinstall preinstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff --git a/tools/cpu/unix/aclocal.m4 b/tools/cpu/unix/aclocal.m4 index 6a13d52366..5b6113bc96 100644 --- a/tools/cpu/unix/aclocal.m4 +++ b/tools/cpu/unix/aclocal.m4 @@ -19,10 +19,16 @@ dnl $1 .. relative path from this configure.in to the toplevel configure.in dnl AC_DEFUN(RTEMS_TOP, [dnl +AC_ARG_WITH(target-subdir, +[ --with-target-subdir=DIR], +TARGET_SUBDIR="$withval", +TARGET_SUBDIR=".") + RTEMS_TOPdir="$1"; AC_SUBST(RTEMS_TOPdir) PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; +test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.." AC_SUBST(PROJECT_ROOT) dnl Determine RTEMS Version string from the VERSION file @@ -41,9 +47,8 @@ AC_MSG_ERROR(Unable to determine version) fi AC_MSG_RESULT($RTEMS_VERSION) -dnl FIXME: This once gets activated in future or will be removed -dnl RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; -dnl AC_SUBST(RTEMS_ROOT) +RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; +AC_SUBST(RTEMS_ROOT) ])dnl dnl diff --git a/tools/cpu/unix/configure b/tools/cpu/unix/configure index cd5b3cdb4b..57139ca44d 100644 --- a/tools/cpu/unix/configure +++ b/tools/cpu/unix/configure @@ -11,6 +11,8 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: +ac_help="$ac_help + --with-target-subdir=DIR" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -541,14 +543,24 @@ ac_config_sub=$ac_aux_dir/config.sub ac_configure=$ac_aux_dir/configure # This should be Cygnus configure. +# Check whether --with-target-subdir or --without-target-subdir was given. +if test "${with_target_subdir+set}" = set; then + withval="$with_target_subdir" + TARGET_SUBDIR="$withval" +else + TARGET_SUBDIR="." +fi + + RTEMS_TOPdir="../../../../../.."; PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; +test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.." echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6 -echo "configure:552: checking for RTEMS Version" >&5 +echo "configure:564: checking for RTEMS Version" >&5 if test -r "${srcdir}/${RTEMS_TOPdir}/VERSION"; then RTEMS_VERSION=`grep Version ${srcdir}/${RTEMS_TOPdir}/VERSION | \ sed -e 's%RTEMS[ ]*Version[ ]*\(.*\)[ ]*%\1%g'` @@ -560,6 +572,8 @@ if test -z "$RTEMS_VERSION"; then fi echo "$ac_t""$RTEMS_VERSION" 1>&6 +RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; + # Do some error checking and defaulting for the host and target type. @@ -589,7 +603,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:593: checking host system type" >&5 +echo "configure:607: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -610,7 +624,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$host" 1>&6 echo $ac_n "checking target system type""... $ac_c" 1>&6 -echo "configure:614: checking target system type" >&5 +echo "configure:628: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -628,7 +642,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` echo "$ac_t""$target" 1>&6 echo $ac_n "checking build system type""... $ac_c" 1>&6 -echo "configure:632: checking build system type" >&5 +echo "configure:646: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -653,7 +667,7 @@ test "$host_alias" != "$target_alias" && echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6 -echo "configure:657: checking rtems target cpu" >&5 +echo "configure:671: checking rtems target cpu" >&5 case "${target}" in # hpux unix port should go here i[3456]86-go32-rtems*) @@ -693,7 +707,7 @@ echo "$ac_t""$target_cpu" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:697: checking for a BSD compatible install" >&5 +echo "configure:711: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -746,7 +760,7 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:750: checking whether build environment is sane" >&5 +echo "configure:764: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -803,7 +817,7 @@ test "$program_suffix" != NONE && test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:807: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:821: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -842,7 +856,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:846: checking for working aclocal" >&5 +echo "configure:860: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -855,7 +869,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:859: checking for working autoconf" >&5 +echo "configure:873: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -868,7 +882,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:872: checking for working automake" >&5 +echo "configure:886: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -881,7 +895,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:885: checking for working autoheader" >&5 +echo "configure:899: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -894,7 +908,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:898: checking for working makeinfo" >&5 +echo "configure:912: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -911,7 +925,7 @@ fi # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:915: checking for $ac_word" >&5 +echo "configure:929: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -941,7 +955,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:945: checking for $ac_word" >&5 +echo "configure:959: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -992,7 +1006,7 @@ fi # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:996: checking for $ac_word" >&5 +echo "configure:1010: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1024,7 +1038,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1028: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1042: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1035,12 +1049,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1039 "configure" +#line 1053 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1058: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1066,12 +1080,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1070: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1084: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1075: checking whether we are using GNU C" >&5 +echo "configure:1089: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1080,7 +1094,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1084: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1098: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1099,7 +1113,7 @@ ac_test_CFLAGS="${CFLAGS+set}" ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1103: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1117: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1294,6 +1308,7 @@ s%@infodir@%$infodir%g s%@mandir@%$mandir%g s%@RTEMS_TOPdir@%$RTEMS_TOPdir%g s%@PROJECT_ROOT@%$PROJECT_ROOT%g +s%@RTEMS_ROOT@%$RTEMS_ROOT%g s%@host@%$host%g s%@host_alias@%$host_alias%g s%@host_cpu@%$host_cpu%g -- cgit v1.2.3