diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-07-26 20:00:37 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 1999-07-26 20:00:37 +0000 |
commit | 6693a68ffa99bfba4a7a8bd57337bf21c550fb1e (patch) | |
tree | a860b1cf1d7fff0f755b2d05c8a789f5ec9e91fb /tools/cpu | |
parent | Moved to top level directory per patch rtems-rc-19990709-0.diff.gz (diff) | |
download | rtems-6693a68ffa99bfba4a7a8bd57337bf21c550fb1e.tar.bz2 |
This is part of a major patch from Ralf Corsepius <corsepiu@faw.uni-ulm.de>
to move RTEMS more to automake/autoconf and GNU compliance.
Finally, here they are: the "big-patch" patches - merged into one big
patch (~1.5MB).
Sorry for the delay, but testing took much more time than I had expected
- esp. reworking the acpolish script triggered many more tiny issues
than I had expected (cf. below).
At least, now you've got something to spend your weekend with :-.
WARNINGS:
* I've gone a little (??) further than I had announced before.
* Several directories have been moved.
* Several files have been added and removed
* I have tested it with many BSPs/CPUs and a variety of permutiations of
configuration flags, but not with all.
* Most parts of the patch are automatically generated, however there are
many tiny manual modifications.
APPLYING THE PATCH:
./autogen -c
mkdir tools
mv c/src/exec/score/tools tools/cpu
mv c/build-tools tools/build
mv c/update-tools tools/update
patch -p1 -E < rtems-rc-19990709-0.diff
./autogen
If the patch doesn't apply to rtems-cvs, I would suggest that you should
try to apply it brute-force and then to run tools/update/rtems-polish.sh
-ac -am afterwards. A recursive diff between rtems-19990709 + patch and
rtems-cvs + patch then should report only a few dozen significant
changes to configuration files which need to be merged manually (IIRC, I
did not change any source files).
*** Attention: There are files to be removed, moved, copied and added
in/to CVS!
NEWS/CHANGES:
1. Configuration takes place in 3 stages: 1. per host (toplevel
configure script), 2. per target (c/configure), 3. per bsp
c/src/configure automatically triggered from ./configure and
c/Makefile.am.
2. Building of subdirectory c/ takes place in c/$(target_alias) for
cross-targets in c/ for native targets
3. Building of subdirectory c/src takes place in c/${target_alias}/<bsp>
for cross-targets, c/<bsp> for native targets
4. c/build-tools moved to tools/build
5. c/src/exec/score/cpu/tools moved to tools/cpu (=cpu-tools split out)
6. c/update-tools moved to tools/update
7. New subdirectory c/src/make, handles files from make/ on a per BSP
basis
8. Maintainer mode support: Ie. if configuring with
--enable-maintainer-mode disabled (the default), then tracking of many
dependencies will be disabled in Makefiles. Esp. many dependencies for
auto* generated files will be switched off in Makefiles. Ie. if not
using "--enable-maintainer-mode" many auto* generated files will not be
updated automatically, i.e. normal users should not be required to have
auto* tools anymore (untested).
9. Independent configuration scripts for / (toplevel), tools/build,
tools/cpu, tools/update, c/, c/src/, c/src/exec, c/src/lib, c/src/tests,
c/src/make
10. Automake support for all directories above and besides c/src
11. "preinstall" now is implemented as depth-first recursive make target
12. host compiled tools (exception bsp-tools) are accessed in location
in the build tree instead of inside the build-tree when building RTEMS.
13. RTEMS_ROOT and PROJECT_ROOT now point to directories inside the
build-tree - many tiny changes as consequence from this.
14. --with-cross-host support removed (offically announced obsolete by
cygnus)
15. Changing the order of building libraries below c/src/lib/
16. Former toplevel configure script broken into aclocal/*.m4 macros
17. Newlib now detected by configure macros, RTEMS_HAS_NEWLIB removed
from *cfg.
18. sptables.h now generated by autoconf
19. Rules for "mkinstalldirs temporary installation tree" moved from
c/Makefile to subdirectories.
20. Cpu-tools do not get installed.
21. FIX: Use ACLOCAL_AMFLAGS instead of ACLOCAL = -I ... in Makefile.ams
which are in directories with own configure scripts.
22. Hardcoding BSP names into libbsp/.../tools to avoid RTEMS_BSP get
overridden from the environment.
22. FIX: Handling of MP_PIECES in various Makefiles
23. FIX: Removing "::" rules from some Makefile.ins
24. FIX: File permission chaos: (-m 444 and -m 555 vs. -m 644 and -m
755) - Now all include files use -m 644.
25. Removed many gnumake-conditionals in Makefile.ins - Partially
replaced with automake-conditional, partially replaced with
conditionalized Makefile variables (... _yes_V)
26. Massively reworked acpolish: acpolish now parses Makefile.ins and
interprets parts of the Makefile.ins.
27. FIX: Some $(wildcard $(srcdir)/*.h) macros removed / replaced with
explicit lists of files in Makefile.ins.
28. FIX: Replacing MKLIB with RANLIB in Makefile.ins
29. HACK: Add preinstallation for pc386 specific
$(PROJECT_RELEASE)/BootImgs directory
... many more details, I can't recall
KNOWN BUGS:
1. make [debug|profile]_install do not do what they are promissing.
"make [debug|profile] install" does what "make [debug|profile]_install"
has been doing. Proposal: remove [debug|profile]_install
2. Dependencies between temporary installation tree and source tree are
not yet handled correctly.
3. Dependencies between temporary installation tree and source tree are
handled ineffencently (Using INSTALL_CHANGE instead of make
dependencies)
4. RTEMS_ROOT, PROJECT_ROOT, top_builddir, RTEMS_TOPdir now are
redundant.
5. The new configure scripts still are in their infancy. They contain
redundant checks and might still contain bugs, too.
6. RTEMS autoconf Makefile.ins use a mixture of configuration
information gathered in c/$(target_alias)/<bsp>/make and of information
collected from their configure scripts.
7. make dist is not fully functional
8. Subdirectory host-/build-/target- configure options (--target,
--host, --build) do not conform to Cygnus/GNU conventions.
9. Some RTEMS autoconf Makefile.in's makefile targets are not supported
in automake Makefile.ams/ins (e.g. get, clobber).
10. Some automake standard targets are not propagated from toplevel and
c/Makefile.am to autoconf subdirectories (eg. make dist).
11. rpcgen generated files are not part of the source-tree (Automake
conventions favor supplying generated files inside the source-tree,
however there is no support for rpcgen generated files in automake, cf.
yacc/lex support in automake).
12. RTEMS_HAS_RDBG handling is flaky. make/*.cfg use RTEMS_HAS_RDBG per
CPU, while librdb's sources can only be built per BSP. Raises the more
general question whether librdbg located correctly in the source-tree.
13. All make/*cfg files are configured per cpu, currently there is no
location to store per-bsp configuration information --> bsp.cfg, per
aconfig.h?
14. "make install" without having run "make all" beforehand does not
work.
15. handling of --enable-multiprocessing seems to be broken in
make/custom/*
16. Makefile.ins still exploit many gmake features.
17. File permisson chaos on libraries (no explict -m for
libraries/rels/etc).
18. mcp750 Makefiles are broken (Note: I *do* mean buggy - I am not
talking about "not-conforming to conventions", here :-).
19. Dependencies between configure scripts are not handled, eg. aborting
"make RTEMS_BSP=<bsp>" can leave the build-tree in an unusable state.
20. "make clean" does not delete <build-tree>/<bsp>. This is intentional
for now, because rerunning "make" after "make clean" requires an
explicit "make preinstall" afterwards now. This should be done
automatically, but doesn't work in this case for now. To work around
this problem <build-tree>/<bsp> is kept during "make clean" for now
(HACK).
TODO:
1. split out host-compiled bsp-tools
2. Use Cygnus/GNU standards for cross-compiling target-subdir
(CC=CC_FOR_TARGET .. configure --host=${target_alias}
--build=`config.guess'}), to be added to toplevel configure script after
splitting out bsp-tools.
3. Exploit per cpu support directory (c/src/<cpu>)- Splitting out
per-cpu libraries - Are there any?
4. Further automake support
5. Converting subdirectories into standalone / self-contained
subdirectories (Esp. moving their headers to the same common root as
their sources, eg. mv lib/include/rtems++
lib/librtems++/include/rtems++) - This is the main obstacle which
prevents moving further towards automake.
6. Propagating values from *.cfg into Makefiles instead of propagating
them at make time via Makefile-fragments (i.e. try to avoid using
*.cfg).
7. Testing on cygwin host (I *do* expect cygwin specific problems).
8. The ARCH in o-$(ARCH)-$(VARIANT) build-subdirectories is not needed
anymore.
GENERAL ISSUES:
1. Temporary installation tree -- Ian and I seem to disagree basically.
Though I think that I understand his argumentation, I do not share it.
IMO, his way of using the buildtree is mis-using the build-tree, relying
on an inofficial feature of RTEMS's current implementation, which
doesn't even work correctly in the current build-tree, though it
attempts hard to do so. From my very POV, it unnecessarily complicates
the structures of the source- and build-trees. It is not supported by
automake (No automatic generation for the necessary rules) and
complicates the transition to automake significantly (Generating the
rules with an enhanced version of acpolish could be possible).
As Ian correctly pointed out, here a management decision is needed -
though I don't see the need to draw this decision in short terms.
2. preinstallation generally is a sure means to spoil the structure of
the source tree, IMHO (No ranting intended, I am completly serious about
this one). eg. through tree dependencies. The worst problem related to
this I have found in the meantime is bsp_specs. bsp_specs is part of
libbsp, ie. there is *no* way to build *any* part of the source tree
*without* having a BSP *preinstalled*.
Note: This issue is related to issue 1., but is not identical - The
difference is the change of the order make rules have to be triggered.
While preinstallation triggers rules spread all over the source tree
before a "make all" can be run, a temporary installation tree could also
be installed by post "make all" hooks (all-local:, to be run after make
all in a directory is completed) if the directories' dependencies would
be a tree,
3. Stuctural dependencies between subdirectories.
4. Depth of the source tree (Prevents multilibbing and introduces many
unnecessary configure scripts).
5. per cpu vs. per bsp configuration (There are no real per-cpu parts
yets :-).
6. automake does not support $makefiles in AC_OUTPUT. Unlike before, we
now should try to avoid RTEMS_CHECK_MAKEFILE and to hard-code as much
paths to Makefiles as possible.
7. General redesign of the source tree
8. Main installation point - Changing it to ${prefix}/${target_alias}. ?
Besides item 8. (which is a must, IMHO), as far as I see most of them
can not be solved soon and will remain issues in the mid- to long-term
:-.
REMARKS:
* You (as the maintainer) should always use --enable-maintainer-mode
when building RTEMS to ensure that maintainer mode generated files (esp.
those in c/src/make) will be updated when make/* files have changed.
* Use @RTEMS_BSP@ in Makefile.ins and Makefile.ams below c/src/,
$(RTEMS_BSP) or ${RTEMS_BSP} will be overridden from environment
variables when using make RTEMS_BSP="....".
* c/src/make is a temporary cludge until configuration issues are
solved. At the moment it is configured per bsp, but contains
per-target/cpu info only. Its main purpose now is to circumvent
modifying make/*.cfg files, because I consider make/* to be frozen for
backward compatibilty.
* This patch should only affect configuration files. At least I do not
remember having touched any source files.
* To build the bare bsp you now need to mention it in --enable-rtemsbsp.
Example: building gensh1 and sh1/bare simultaneously:
../rtems-rc-19990709-1/configure --target=sh-rtems \
--enable-rtemsbsp="bare gensh1" \
--prefix=/tmp/rtems \
--enable-bare-cpu-cflags='-DMHZ=20 -m1
-DCPU_CONSOLE_DEVNAME=\"/dev/null\"' \
--enable-bare-cpu-model=sh7032 \
--enable-maintainer-mode \
--enable-cxx
make
make install
* The next steps in development would be to split out bsp-tools and then
to change to Cygnus/GNU canonicalization conventions for building the c/
subdirectory afterwards (i.e. many standard AC_*.m4 macros could be used
instead of customized versions)
FINAL REMARK:
The issues mentioned in the lists above sound much worser than the
situation actually is. Most of them are not specific to this patch, but
are also valid for the snapshot. I just wrote down what I came across
when working on the patch over the last few weeks.
I wouldn't be too surprised if you don't like the patch at the current
point in development. I am willing to discuss details and problems, I
also have no problem if you would post-pone applying this patch to times
after 4.1, but rejecting it as a whole for all times would be a false
management decision, IMHO.
Therefore I would suggest that you, if your time constaints allow it,
should at least play a little while with this patch to understand what
is going on and before drawing a decision on how to handle this
proposal. I know this patch is neither perfect nor complete, but I
consider it to be a major breakthrough. Don't be anxious because of the
size of the patch, the core of the patch is rather small, the size is
mainly the side effect of some systematic cleanups inside the Makefiles
(result of acpolish).
Feel free to ask if you encounter problems, if you don't understand
something or if you meet bugs - I am far from being perfect and am
prepared to answer them.
Ralf.
--
Ralf Corsepius
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu@faw.uni-ulm.de FAX: +49/731/501-999
http://www.faw.uni-ulm.de
Diffstat (limited to '')
-rw-r--r-- | tools/cpu/Makefile.in | 418 | ||||
-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 | ||||
-rw-r--r-- | tools/cpu/hppa1.1/Makefile.am | 13 | ||||
-rw-r--r-- | tools/cpu/hppa1.1/aclocal.m4 | 72 | ||||
-rw-r--r-- | tools/cpu/hppa1.1/configure | 122 | ||||
-rw-r--r-- | tools/cpu/hppa1.1/configure.in | 7 | ||||
-rw-r--r-- | tools/cpu/sh/Makefile.am | 6 | ||||
-rw-r--r-- | tools/cpu/sh/Makefile.in | 21 | ||||
-rw-r--r-- | tools/cpu/sh/aclocal.m4 | 72 | ||||
-rw-r--r-- | tools/cpu/sh/configure | 128 | ||||
-rw-r--r-- | tools/cpu/sh/configure.in | 7 | ||||
-rw-r--r-- | tools/cpu/unix/Makefile.am | 20 | ||||
-rw-r--r-- | tools/cpu/unix/Makefile.in | 47 | ||||
-rw-r--r-- | tools/cpu/unix/aclocal.m4 | 72 | ||||
-rw-r--r-- | tools/cpu/unix/configure | 122 | ||||
-rw-r--r-- | tools/cpu/unix/configure.in | 7 |
21 files changed, 1090 insertions, 270 deletions
diff --git a/tools/cpu/Makefile.in b/tools/cpu/Makefile.in index 731772bf72..3f5e69e0d2 100644 --- a/tools/cpu/Makefile.in +++ b/tools/cpu/Makefile.in @@ -1,25 +1,421 @@ +# Makefile.in generated automatically by automake 1.4 from Makefile.am + +# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + # -# $Id$ +# $Id$ # -@SET_MAKE@ + + + +SHELL = @SHELL@ + srcdir = @srcdir@ top_srcdir = @top_srcdir@ -top_builddir = ../../../../.. -subdir = c/src/exec/score/tools +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include + +DESTDIR = + +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ + +top_builddir = . + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +transform = @program_transform_name@ -RTEMS_ROOT = $(top_srcdir)/@RTEMS_TOPdir@ +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +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@ +RTEMS_TOPdir = @RTEMS_TOPdir@ +VERSION = @VERSION@ +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 1.4 +ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal + +SUBDIRS = @subdirs@ +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs +CONFIG_CLEAN_FILES = +DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in -VPATH = @srcdir@ -include $(RTEMS_ROOT)/make/custom/${RTEMS_BSP}.cfg -include $(RTEMS_ROOT)/make/directory.cfg +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -SUB_DIRS=generic $(wildcard $(RTEMS_CPU)) +TAR = tar +GZIP_ENV = --best +all: all-redirect +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/../../automake/subdirs.am $(top_srcdir)/../../automake/local.am + cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES) cd $(top_builddir) \ - && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status + && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status + +$(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: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. + +@SET_MAKE@ + +all-recursive install-data-recursive install-exec-recursive \ +installdirs-recursive install-recursive uninstall-recursive \ +check-recursive installcheck-recursive info-recursive dvi-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ + rev="$$subdir $$rev"; \ + test "$$subdir" = "." && dot_seen=yes; \ + done; \ + test "$$dot_seen" = "no" && rev=". $$rev"; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done + +tags: TAGS + +ID: $(HEADERS) $(SOURCES) $(LISP) + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + here=`pwd` && cd $(srcdir) \ + && mkid -f$$here/ID $$unique $(LISP) + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS)'; \ + unique=`for i in $$list; do echo $$i; done | \ + awk ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags $$unique $(LISP) -o $$here/TAGS) + +mostlyclean-tags: + +clean-tags: + +distclean-tags: + -rm -f TAGS ID + +maintainer-clean-tags: + +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + -rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz + mkdir $(distdir)/=build + mkdir $(distdir)/=inst + dc_install_base=`cd $(distdir)/=inst && pwd`; \ + cd $(distdir)/=build \ + && ../configure --srcdir=.. --prefix=$$dc_install_base \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) dist + -rm -rf $(distdir) + @banner="$(distdir).tar.gz is ready for distribution"; \ + dashes=`echo "$$banner" | sed s/./=/g`; \ + echo "$$dashes"; \ + echo "$$banner"; \ + echo "$$dashes" +dist: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +dist-all: distdir + -chmod -R a+r $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) +distdir: $(DISTFILES) + -rm -rf $(distdir) + mkdir $(distdir) + -chmod 777 $(distdir) + here=`cd $(top_builddir) && pwd`; \ + top_distdir=`cd $(distdir) && pwd`; \ + distdir=`cd $(distdir) && pwd`; \ + cd $(top_srcdir) \ + && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + for subdir in $(SUBDIRS); do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + chmod 777 $(distdir)/$$subdir; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ + || exit 1; \ + fi; \ + done +info-am: +info: info-recursive +dvi-am: +dvi: dvi-recursive +check-am: all-am +check: check-recursive +installcheck-am: +installcheck: installcheck-recursive +install-exec-am: +install-exec: install-exec-recursive + +install-data-am: +install-data: install-data-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-recursive +uninstall-am: +uninstall: uninstall-recursive +all-am: Makefile +all-redirect: all-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install +installdirs: installdirs-recursive +installdirs-am: + + +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* + +maintainer-clean-generic: +mostlyclean-am: mostlyclean-tags mostlyclean-generic + +mostlyclean: mostlyclean-recursive + +clean-am: clean-tags clean-generic mostlyclean-am + +clean: clean-recursive + +distclean-am: distclean-tags distclean-generic clean-am + +distclean: distclean-recursive + -rm -f config.status + +maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ + distclean-am + @echo "This command is intended for maintainers to use;" + @echo "it deletes files that may require special tools to rebuild." + +maintainer-clean: maintainer-clean-recursive + -rm -f config.status + +.PHONY: install-data-recursive uninstall-data-recursive \ +install-exec-recursive uninstall-exec-recursive installdirs-recursive \ +uninstalldirs-recursive all-recursive check-recursive \ +installcheck-recursive info-recursive dvi-recursive \ +mostlyclean-recursive distclean-recursive clean-recursive \ +maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ +distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs-am \ +installdirs mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean + + +depend-recursive \ +clobber-recursive \ +preinstall-recursive \ +debug-recursive \ +debug_install-recursive \ +profile-recursive \ +profile_install-recursive: + @set fnord $(MAKEFLAGS); amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +debug: debug-recursive +.PHONY: debug-recursive + +debug_install: debug_install-recursive +.PHONY: debug_install-recursive + +profile: profile-recursive +.PHONY: profile-recursive + +profile_install: profile_install-recursive +.PHONY: profile-recursive + +preinstall: preinstall-recursive +.PHONY: preinstall-recursive + +clobber: clobber-recursive +.PHONY: clobber-recursive + +depend: depend-recursive +.PHONY: depend-recursive + +debug-am: +debug: debug-am +.PHONY: debug debug-am + +debug_install-am: +debug_install: debug_install-am +.PHONY: debug_install debug_install-am + +profile-am: +profile: profile-am +.PHONY: profile profile-am + +profile_install-am: +profile_install: profile_install-am +.PHONY: profile_install profile_install-am + +preinstall-am: +preinstall: preinstall-am +.PHONY: preinstall preinstall-am + +clobber-am: +clobber: clobber-am +.PHONY: clobber clobber-am + +depend-am: +depend: depend-am +.PHONY: depend depend-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. +.NOEXPORT: 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 \ diff --git a/tools/cpu/hppa1.1/Makefile.am b/tools/cpu/hppa1.1/Makefile.am index 16063eaeb7..2a18d9084a 100644 --- a/tools/cpu/hppa1.1/Makefile.am +++ b/tools/cpu/hppa1.1/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_PROGRAMS=genoffsets @@ -18,11 +18,4 @@ INCLUDES = \ -I$(PROJECT_INCLUDE) \ -I$(CPU_DIR) -# HACK: install to build-tree -preinstall: install-exec-local - -install-exec-local: genoffsets - $(mkinstalldirs) $(PROJECT_ROOT)/${RTEMS_BSP}/bin - $(INSTALL_PROGRAM) genoffsets ${PROJECT_ROOT}/${RTEMS_BSP}/bin - -include $(top_srcdir)/../../../../../../automake/local.am +include $(top_srcdir)/../../../automake/local.am diff --git a/tools/cpu/hppa1.1/aclocal.m4 b/tools/cpu/hppa1.1/aclocal.m4 index 0b2ab1016a..417d59f161 100644 --- a/tools/cpu/hppa1.1/aclocal.m4 +++ b/tools/cpu/hppa1.1/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,10 +177,45 @@ 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]) + 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) @@ -199,5 +227,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/hppa1.1/configure b/tools/cpu/hppa1.1/configure index 11e562e665..a74d0d8e35 100644 --- a/tools/cpu/hppa1.1/configure +++ b/tools/cpu/hppa1.1/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-hppa +PACKAGE=rtems-cpu-tools-hppa 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,11 +914,34 @@ 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 + + # 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:926: checking for $ac_word" >&5 +echo "configure:945: 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 @@ -952,7 +971,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:956: checking for $ac_word" >&5 +echo "configure:975: 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 @@ -1003,7 +1022,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:1007: checking for $ac_word" >&5 +echo "configure:1026: 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 @@ -1035,7 +1054,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1058: 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. @@ -1046,12 +1065,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1050 "configure" +#line 1069 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1074: \"$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 @@ -1077,12 +1096,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:1081: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1100: 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:1086: checking whether we are using GNU C" >&5 +echo "configure:1105: 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 @@ -1091,7 +1110,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1095: \"$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:1114: \"$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 @@ -1110,7 +1129,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:1114: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1133: 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 @@ -1143,8 +1162,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)' @@ -1157,6 +1195,11 @@ project_libdir='$(tooldir)/lib$(MULTISUBDIR)' project_bindir='$(tooldir)/bin' +rtems_bspdir='$(prefix)/${RTEMS_BSP}' + +rtems_makedir='$(prefix)/make' + + trap '' 1 2 15 cat > confcache <<\EOF @@ -1304,8 +1347,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 @@ -1333,11 +1374,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%@CC@%$CC%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 CEOF EOF diff --git a/tools/cpu/hppa1.1/configure.in b/tools/cpu/hppa1.1/configure.in index c361bf10bc..3d6b624500 100644 --- a/tools/cpu/hppa1.1/configure.in +++ b/tools/cpu/hppa1.1/configure.in @@ -3,12 +3,13 @@ dnl dnl $Id$ AC_INIT(genoffsets.c) -AC_CONFIG_AUX_DIR(../../../../../..) +AC_CONFIG_AUX_DIR(../../..) -RTEMS_TOP(../../../../../..) +RTEMS_TOP(../../..) RTEMS_CANONICAL_TARGET_CPU -AM_INIT_AUTOMAKE(rtems-exec-score-tools-hppa,$RTEMS_VERSION,no) +AM_INIT_AUTOMAKE(rtems-cpu-tools-hppa,$RTEMS_VERSION,no) +AM_MAINTAINER_MODE AC_PROG_CC diff --git a/tools/cpu/sh/Makefile.am b/tools/cpu/sh/Makefile.am index fb8b99ee93..c2fa4807fc 100644 --- a/tools/cpu/sh/Makefile.am +++ b/tools/cpu/sh/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_PROGRAMS=shgen @@ -12,4 +12,4 @@ sci.h \ sci.c \ shgen.c -include $(top_srcdir)/../../../../../../automake/local.am +include $(top_srcdir)/../../../automake/local.am diff --git a/tools/cpu/sh/Makefile.in b/tools/cpu/sh/Makefile.in index cee00c4a36..a2379c180d 100644 --- a/tools/cpu/sh/Makefile.in +++ b/tools/cpu/sh/Makefile.in @@ -44,6 +44,8 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . + +ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ @@ -67,8 +69,11 @@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ CC = @CC@ +INSTALL_CHANGE = @INSTALL_CHANGE@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +PACKHEX = @PACKHEX@ PROJECT_ROOT = @PROJECT_ROOT@ RTEMS_CPU = @RTEMS_CPU@ RTEMS_ROOT = @RTEMS_ROOT@ @@ -77,17 +82,19 @@ VERSION = @VERSION@ 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_PROGRAMS = shgen shgen_SOURCES = sci.h sci.c shgen.c ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../mkinstalldirs CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) @@ -119,19 +126,19 @@ OBJECTS = $(shgen_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s -$(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) mostlyclean-noinstPROGRAMS: diff --git a/tools/cpu/sh/aclocal.m4 b/tools/cpu/sh/aclocal.m4 index 0b2ab1016a..417d59f161 100644 --- a/tools/cpu/sh/aclocal.m4 +++ b/tools/cpu/sh/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,10 +177,45 @@ 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]) + 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) @@ -199,5 +227,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/sh/configure b/tools/cpu/sh/configure index 54a509926a..4c0dbf24a2 100644 --- a/tools/cpu/sh/configure +++ b/tools/cpu/sh/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-sh +PACKAGE=rtems-cpu-tools-sh 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,11 +914,34 @@ 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 + + # 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:926: checking for $ac_word" >&5 +echo "configure:945: 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 @@ -952,7 +971,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:956: checking for $ac_word" >&5 +echo "configure:975: 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 @@ -1003,7 +1022,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:1007: checking for $ac_word" >&5 +echo "configure:1026: 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 @@ -1035,7 +1054,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1058: 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. @@ -1046,12 +1065,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1050 "configure" +#line 1069 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1074: \"$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 @@ -1077,12 +1096,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:1081: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1100: 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:1086: checking whether we are using GNU C" >&5 +echo "configure:1105: 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 @@ -1091,7 +1110,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1095: \"$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:1114: \"$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 @@ -1110,7 +1129,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:1114: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1133: 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 @@ -1142,7 +1161,7 @@ else fi echo $ac_n "checking for fabs in -lm""... $ac_c" 1>&6 -echo "configure:1146: checking for fabs in -lm" >&5 +echo "configure:1165: checking for fabs in -lm" >&5 ac_lib_var=`echo m'_'fabs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -1150,7 +1169,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <<EOF -#line 1154 "configure" +#line 1173 "configure" #include "confdefs.h" /* Override any gcc2 internal prototype to avoid an error. */ /* We use char because int might match the return type of a gcc2 @@ -1161,7 +1180,7 @@ int main() { fabs() ; return 0; } EOF -if { (eval echo configure:1165: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1190,8 +1209,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)' @@ -1204,6 +1242,11 @@ project_libdir='$(tooldir)/lib$(MULTISUBDIR)' project_bindir='$(tooldir)/bin' +rtems_bspdir='$(prefix)/${RTEMS_BSP}' + +rtems_makedir='$(prefix)/make' + + trap '' 1 2 15 cat > confcache <<\EOF @@ -1351,8 +1394,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 @@ -1380,11 +1421,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%@CC@%$CC%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 CEOF EOF diff --git a/tools/cpu/sh/configure.in b/tools/cpu/sh/configure.in index a93a660603..6275c5b613 100644 --- a/tools/cpu/sh/configure.in +++ b/tools/cpu/sh/configure.in @@ -3,12 +3,13 @@ dnl dnl $Id$ AC_INIT(shgen.c) -AC_CONFIG_AUX_DIR(../../../../../..) +AC_CONFIG_AUX_DIR(../../..) -RTEMS_TOP(../../../../../..) +RTEMS_TOP(../../..) RTEMS_CANONICAL_TARGET_CPU -AM_INIT_AUTOMAKE(rtems-exec-score-tools-sh,$RTEMS_VERSION,no) +AM_INIT_AUTOMAKE(rtems-cpu-tools-sh,$RTEMS_VERSION,no) +AM_MAINTAINER_MODE AC_PROG_CC AC_CHECK_LIB(m,fabs) diff --git a/tools/cpu/unix/Makefile.am b/tools/cpu/unix/Makefile.am index 65147c0a2b..9c7367d149 100644 --- a/tools/cpu/unix/Makefile.am +++ b/tools/cpu/unix/Makefile.am @@ -2,25 +2,11 @@ # $Id$ # -AUTOMAKE_OPTIONS = foreign -ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal +AUTOMAKE_OPTIONS = foreign 1.4 +ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal noinst_PROGRAMS=gensize gensize_SOURCES=gensize.c -# We use files that have not been installed yet. -CPU_DIR=$(srcdir)/../../cpu/$(RTEMS_CPU) - -INCLUDES = \ --I$(PROJECT_ROOT)/${RTEMS_BSP}/include \ --I$(CPU_DIR) - -# HACK: install into the build-tree -preinstall: install-exec-local - -install-exec-local: gensize - $(mkinstalldirs) $(PROJECT_ROOT)/${RTEMS_BSP}/bin - $(INSTALL_PROGRAM) gensize $(PROJECT_ROOT)/${RTEMS_BSP}/bin - -include $(top_srcdir)/../../../../../../automake/local.am +include $(top_srcdir)/../../../automake/local.am diff --git a/tools/cpu/unix/Makefile.in b/tools/cpu/unix/Makefile.in index 9168409cd3..f32afab2c4 100644 --- a/tools/cpu/unix/Makefile.in +++ b/tools/cpu/unix/Makefile.in @@ -44,6 +44,8 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . + +ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ @@ -67,8 +69,11 @@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ CC = @CC@ +INSTALL_CHANGE = @INSTALL_CHANGE@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +PACKHEX = @PACKHEX@ PROJECT_ROOT = @PROJECT_ROOT@ RTEMS_CPU = @RTEMS_CPU@ RTEMS_ROOT = @RTEMS_ROOT@ @@ -77,22 +82,18 @@ VERSION = @VERSION@ 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_PROGRAMS = gensize gensize_SOURCES = gensize.c - -# We use files that have not been installed yet. -CPU_DIR = $(srcdir)/../../cpu/$(RTEMS_CPU) - -INCLUDES = -I$(PROJECT_ROOT)/${RTEMS_BSP}/include -I$(CPU_DIR) - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -mkinstalldirs = $(SHELL) $(top_srcdir)/../../../../../../mkinstalldirs +mkinstalldirs = $(SHELL) $(top_srcdir)/../../../mkinstalldirs CONFIG_CLEAN_FILES = PROGRAMS = $(noinst_PROGRAMS) @@ -123,19 +124,19 @@ OBJECTS = $(gensize_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .o .s -$(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) mostlyclean-noinstPROGRAMS: @@ -289,7 +290,7 @@ check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am -install-exec-am: install-exec-local +install-exec-am: install-exec: install-exec-am install-data-am: @@ -348,20 +349,12 @@ mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir mostlyclean-depend \ distclean-depend clean-depend maintainer-clean-depend info-am info \ -dvi-am dvi check check-am installcheck-am installcheck \ -install-exec-local install-exec-am install-exec install-data-am \ -install-data install-am install uninstall-am uninstall all-redirect \ -all-am all installdirs mostlyclean-generic distclean-generic \ -clean-generic maintainer-clean-generic clean mostlyclean distclean \ -maintainer-clean - - -# HACK: install into the build-tree -preinstall: install-exec-local +dvi-am dvi check check-am installcheck-am installcheck install-exec-am \ +install-exec install-data-am install-data install-am install \ +uninstall-am uninstall all-redirect all-am all installdirs \ +mostlyclean-generic distclean-generic clean-generic \ +maintainer-clean-generic clean mostlyclean distclean maintainer-clean -install-exec-local: gensize - $(mkinstalldirs) $(PROJECT_ROOT)/${RTEMS_BSP}/bin - $(INSTALL_PROGRAM) gensize $(PROJECT_ROOT)/${RTEMS_BSP}/bin debug-am: debug: debug-am diff --git a/tools/cpu/unix/aclocal.m4 b/tools/cpu/unix/aclocal.m4 index 0b2ab1016a..417d59f161 100644 --- a/tools/cpu/unix/aclocal.m4 +++ b/tools/cpu/unix/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,10 +177,45 @@ 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]) + 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) @@ -199,5 +227,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/unix/configure b/tools/cpu/unix/configure index a945b21498..bae42e6623 100644 --- a/tools/cpu/unix/configure +++ b/tools/cpu/unix/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-unix +PACKAGE=rtems-cpu-tools-unix 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,11 +914,34 @@ 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 + + # 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:926: checking for $ac_word" >&5 +echo "configure:945: 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 @@ -952,7 +971,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:956: checking for $ac_word" >&5 +echo "configure:975: 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 @@ -1003,7 +1022,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:1007: checking for $ac_word" >&5 +echo "configure:1026: 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 @@ -1035,7 +1054,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1039: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1058: 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. @@ -1046,12 +1065,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1050 "configure" +#line 1069 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1055: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1074: \"$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 @@ -1077,12 +1096,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:1081: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1100: 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:1086: checking whether we are using GNU C" >&5 +echo "configure:1105: 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 @@ -1091,7 +1110,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1095: \"$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:1114: \"$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 @@ -1110,7 +1129,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:1114: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1133: 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 @@ -1143,8 +1162,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)' @@ -1157,6 +1195,11 @@ project_libdir='$(tooldir)/lib$(MULTISUBDIR)' project_bindir='$(tooldir)/bin' +rtems_bspdir='$(prefix)/${RTEMS_BSP}' + +rtems_makedir='$(prefix)/make' + + trap '' 1 2 15 cat > confcache <<\EOF @@ -1304,8 +1347,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 @@ -1333,11 +1374,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%@CC@%$CC%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 CEOF EOF diff --git a/tools/cpu/unix/configure.in b/tools/cpu/unix/configure.in index 302364be14..bf53d69ba5 100644 --- a/tools/cpu/unix/configure.in +++ b/tools/cpu/unix/configure.in @@ -3,12 +3,13 @@ dnl dnl $Id$ AC_INIT(gensize.c) -AC_CONFIG_AUX_DIR(../../../../../..) +AC_CONFIG_AUX_DIR(../../..) -RTEMS_TOP(../../../../../..) +RTEMS_TOP(../../..) RTEMS_CANONICAL_TARGET_CPU -AM_INIT_AUTOMAKE(rtems-exec-score-tools-unix,$RTEMS_VERSION,no) +AM_INIT_AUTOMAKE(rtems-cpu-tools-unix,$RTEMS_VERSION,no) +AM_MAINTAINER_MODE AC_PROG_CC |