diff options
Diffstat (limited to 'tools/cpu/generic')
-rw-r--r-- | tools/cpu/generic/Makefile.am | 6 | ||||
-rw-r--r-- | tools/cpu/generic/Makefile.in | 21 | ||||
-rw-r--r-- | tools/cpu/generic/aclocal.m4 | 72 | ||||
-rw-r--r-- | tools/cpu/generic/configure | 104 | ||||
-rw-r--r-- | tools/cpu/generic/configure.in | 7 | ||||
-rw-r--r-- | tools/cpu/generic/size_rtems.in | 16 |
6 files changed, 172 insertions, 54 deletions
diff --git a/tools/cpu/generic/Makefile.am b/tools/cpu/generic/Makefile.am index 92f0ea787e..8e9e63f553 100644 --- a/tools/cpu/generic/Makefile.am +++ b/tools/cpu/generic/Makefile.am @@ -2,8 +2,8 @@ # $Id$ # -AUTOMAKE_OPTIONS = foreign -ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal +AUTOMAKE_OPTIONS = foreign 1.4 +ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal noinst_SCRIPTS=size_rtems -include $(top_srcdir)/../../../../../../automake/local.am +include $(top_srcdir)/../../../automake/local.am diff --git a/tools/cpu/generic/Makefile.in b/tools/cpu/generic/Makefile.in index 0ca2e08190..d98fa92e7c 100644 --- a/tools/cpu/generic/Makefile.in +++ b/tools/cpu/generic/Makefile.in @@ -44,6 +44,8 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . + +ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ @@ -66,9 +68,12 @@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ +INSTALL_CHANGE = @INSTALL_CHANGE@ KSH = @KSH@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +PACKHEX = @PACKHEX@ PROJECT_ROOT = @PROJECT_ROOT@ RTEMS_CPU = @RTEMS_CPU@ RTEMS_ROOT = @RTEMS_ROOT@ @@ -78,14 +83,16 @@ program_prefix = @program_prefix@ project_bindir = @project_bindir@ project_includedir = @project_includedir@ project_libdir = @project_libdir@ +rtems_bspdir = @rtems_bspdir@ +rtems_makedir = @rtems_makedir@ tooldir = @tooldir@ -AUTOMAKE_OPTIONS = foreign -ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal +AUTOMAKE_OPTIONS = foreign 1.4 +ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal noinst_SCRIPTS = size_rtems ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../mkinstalldirs CONFIG_CLEAN_FILES = size_rtems SCRIPTS = $(noinst_SCRIPTS) @@ -99,19 +106,19 @@ TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/../../../../../../automake/local.am +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/../../../automake/local.am cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -$(ACLOCAL_M4): configure.in - cd $(srcdir) && $(ACLOCAL) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck -$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) +$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) size_rtems: $(top_builddir)/config.status size_rtems.in cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status diff --git a/tools/cpu/generic/aclocal.m4 b/tools/cpu/generic/aclocal.m4 index a732cffc8a..4bca817c92 100644 --- a/tools/cpu/generic/aclocal.m4 +++ b/tools/cpu/generic/aclocal.m4 @@ -27,10 +27,6 @@ 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 dnl Hopefully, Joel never changes its format ;- AC_MSG_CHECKING([for RTEMS Version]) @@ -46,9 +42,6 @@ if test -z "$RTEMS_VERSION"; then AC_MSG_ERROR(Unable to determine version) fi AC_MSG_RESULT($RTEMS_VERSION) - -RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; -AC_SUBST(RTEMS_ROOT) ])dnl dnl @@ -184,6 +177,39 @@ else fi AC_SUBST($1)]) +# Add --enable-maintainer-mode option to configure. +# From Jim Meyering + +# serial 1 + +AC_DEFUN(AM_MAINTAINER_MODE, +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT($USE_MAINTAINER_MODE) + AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +# Define a conditional. + +AC_DEFUN(AM_CONDITIONAL, +[AC_SUBST($1_TRUE) +AC_SUBST($1_FALSE) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi]) + dnl $Id$ AC_DEFUN(RTEMS_PATH_KSH, @@ -203,6 +229,8 @@ AC_DEFUN(RTEMS_TOOLPATHS, [ # tooldir='$(exec_prefix)/'$target_alias # Temporary work-around until building in source tree is supported +AC_REQUIRE([RTEMS_PROJECT_ROOT]) + tooldir='$(PROJECT_ROOT)' AC_SUBST(tooldir) @@ -214,5 +242,35 @@ AC_SUBST(project_libdir) project_bindir='$(tooldir)/bin' AC_SUBST(project_bindir) + +rtems_bspdir='$(prefix)/${RTEMS_BSP}' +AC_SUBST(rtems_bspdir) +rtems_makedir='$(prefix)/make' +AC_SUBST(rtems_makedir) +]) + +dnl +dnl $Id$ +dnl + +AC_DEFUN(RTEMS_PROJECT_ROOT, +[dnl +AC_REQUIRE([RTEMS_TOP]) +if test "$TARGET_SUBDIR" = "." ; then +PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)'; +else +PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)' +fi +AC_SUBST(PROJECT_ROOT) + +RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP +AC_SUBST(RTEMS_ROOT) + +INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change" +AC_SUBST(INSTALL_CHANGE) + +PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex" +AC_SUBST(PACKHEX) ]) + diff --git a/tools/cpu/generic/configure b/tools/cpu/generic/configure index 3342f81d95..eb5d48658c 100644 --- a/tools/cpu/generic/configure +++ b/tools/cpu/generic/configure @@ -13,6 +13,9 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help --with-target-subdir=DIR" +ac_help="$ac_help + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -524,7 +527,7 @@ fi ac_aux_dir= -for ac_dir in ../../../../../.. $srcdir/../../../../../..; do +for ac_dir in ../../.. $srcdir/../../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" @@ -536,7 +539,7 @@ for ac_dir in ../../../../../.. $srcdir/../../../../../..; do fi done if test -z "$ac_aux_dir"; then - { echo "configure: error: can not find install-sh or install.sh in ../../../../../.. $srcdir/../../../../../.." 1>&2; exit 1; } + { echo "configure: error: can not find install-sh or install.sh in ../../.. $srcdir/../../.." 1>&2; exit 1; } fi ac_config_guess=$ac_aux_dir/config.guess ac_config_sub=$ac_aux_dir/config.sub @@ -552,15 +555,11 @@ else fi -RTEMS_TOPdir="../../../../../.."; - - -PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; -test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.." +RTEMS_TOPdir="../../.."; echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6 -echo "configure:564: checking for RTEMS Version" >&5 +echo "configure:563: 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'` @@ -572,9 +571,6 @@ 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. @@ -604,7 +600,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:608: checking host system type" >&5 +echo "configure:604: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -625,7 +621,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:629: checking target system type" >&5 +echo "configure:625: checking target system type" >&5 target_alias=$target case "$target_alias" in @@ -643,7 +639,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:647: checking build system type" >&5 +echo "configure:643: checking build system type" >&5 build_alias=$build case "$build_alias" in @@ -666,7 +662,7 @@ test "$host_alias" != "$target_alias" && program_prefix=${target_alias}- echo $ac_n "checking rtems target cpu""... $ac_c" 1>&6 -echo "configure:670: checking rtems target cpu" >&5 +echo "configure:666: checking rtems target cpu" >&5 case "${target}" in # hpux unix port should go here i[3456]86-go32-rtems*) @@ -704,7 +700,7 @@ echo "$ac_t""$RTEMS_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:708: checking for a BSD compatible install" >&5 +echo "configure:704: 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 @@ -757,7 +753,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:761: checking whether build environment is sane" >&5 +echo "configure:757: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -814,7 +810,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:818: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:814: 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 @@ -841,7 +837,7 @@ else fi -PACKAGE=rtems-exec-score-tools-generic +PACKAGE=rtems-cpu-tools-generic VERSION=$RTEMS_VERSION @@ -853,7 +849,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:857: checking for working aclocal" >&5 +echo "configure:853: 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. @@ -866,7 +862,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:870: checking for working autoconf" >&5 +echo "configure:866: 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. @@ -879,7 +875,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:883: checking for working automake" >&5 +echo "configure:879: 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. @@ -892,7 +888,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:896: checking for working autoheader" >&5 +echo "configure:892: 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. @@ -905,7 +901,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:909: checking for working makeinfo" >&5 +echo "configure:905: 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. @@ -918,6 +914,29 @@ else fi +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +echo "configure:919: checking whether to enable maintainer-specific portions of Makefiles" >&5 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi + + echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + MAINT=$MAINTAINER_MODE_TRUE + + for ac_prog in bash ksh sh @@ -925,7 +944,7 @@ do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:929: checking for $ac_word" >&5 +echo "configure:948: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_KSH'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -968,8 +987,27 @@ fi +if test "$TARGET_SUBDIR" = "." ; then +PROJECT_ROOT=$RTEMS_TOPdir/'$(top_builddir)'; +else +PROJECT_ROOT=../$RTEMS_TOPdir/'$(top_builddir)' +fi + + +RTEMS_ROOT=$RTEMS_TOPdir/'$(top_builddir)'/c/$RTEMS_BSP + + +INSTALL_CHANGE="\$(KSH) \$(PROJECT_ROOT)/tools/build/install-if-change" + + +PACKHEX="\$(PROJECT_ROOT)/tools/build/packhex" + + + # tooldir='$(exec_prefix)/'$target_alias # Temporary work-around until building in source tree is supported + + tooldir='$(PROJECT_ROOT)' @@ -982,6 +1020,11 @@ project_libdir='$(tooldir)/lib$(MULTISUBDIR)' project_bindir='$(tooldir)/bin' +rtems_bspdir='$(prefix)/${RTEMS_BSP}' + +rtems_makedir='$(prefix)/make' + + trap '' 1 2 15 @@ -1131,8 +1174,6 @@ s%@oldincludedir@%$oldincludedir%g 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 @@ -1160,11 +1201,20 @@ s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g s%@SET_MAKE@%$SET_MAKE%g +s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g +s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g +s%@MAINT@%$MAINT%g s%@KSH@%$KSH%g +s%@PROJECT_ROOT@%$PROJECT_ROOT%g +s%@RTEMS_ROOT@%$RTEMS_ROOT%g +s%@INSTALL_CHANGE@%$INSTALL_CHANGE%g +s%@PACKHEX@%$PACKHEX%g s%@tooldir@%$tooldir%g s%@project_includedir@%$project_includedir%g s%@project_libdir@%$project_libdir%g s%@project_bindir@%$project_bindir%g +s%@rtems_bspdir@%$rtems_bspdir%g +s%@rtems_makedir@%$rtems_makedir%g s%@program_prefix@%$program_prefix%g CEOF diff --git a/tools/cpu/generic/configure.in b/tools/cpu/generic/configure.in index 7e144ad375..ac8c82b0db 100644 --- a/tools/cpu/generic/configure.in +++ b/tools/cpu/generic/configure.in @@ -3,12 +3,13 @@ dnl dnl $Id$ AC_INIT(size_rtems.in) -AC_CONFIG_AUX_DIR(../../../../../..) +AC_CONFIG_AUX_DIR(../../..) -RTEMS_TOP(../../../../../..) +RTEMS_TOP(../../..) RTEMS_CANONICAL_TARGET_CPU -AM_INIT_AUTOMAKE(rtems-exec-score-tools-generic,$RTEMS_VERSION,no) +AM_INIT_AUTOMAKE(rtems-cpu-tools-generic,$RTEMS_VERSION,no) +AM_MAINTAINER_MODE RTEMS_PATH_KSH diff --git a/tools/cpu/generic/size_rtems.in b/tools/cpu/generic/size_rtems.in index 41281e69e8..26f81584f2 100644 --- a/tools/cpu/generic/size_rtems.in +++ b/tools/cpu/generic/size_rtems.in @@ -98,21 +98,23 @@ else EOL="\\c" fi -if [ ! -d ${board} ] ; then +if [ ! -d ../${board} ] ; then echo "${board} does not exist ... is the current directory the build directory?" exit 1 fi #DIRLIST -- so greps for DIRLIST will find this file -CPUOBJ=c/src/exec/score/cpu/${rtems_cpu}/wrap/${ARCH} -COREOBJ=c/src/exec/score/src/${ARCH} -RTEMSOBJ=c/src/exec/rtems/src/${ARCH} -SAPIOBJ=c/src/exec/sapi/src/${ARCH} -OPTOBJ=c/src/exec/rtems/optman/${ARCH} +CPUOBJ=exec/score/cpu/${rtems_cpu}/wrap/${ARCH} +COREOBJ=exec/score/src/${ARCH} +RTEMSOBJ=exec/rtems/src/${ARCH} +SAPIOBJ=exec/sapi/src/${ARCH} +OPTOBJ=exec/rtems/optman/${ARCH} # XXX These have been split up MANLIST=" \ -${RTEMSOBJ}/clock.o \ +${RTEMSOBJ}/clockget.o \ +${RTEMSOBJ}/clockset.o \ +${RTEMSOBJ}/clocktick.o \ ${RTEMSOBJ}/dpmem.o \ ${RTEMSOBJ}/event.o \ ${RTEMSOBJ}/intr.o \ |