diff options
Diffstat (limited to '')
34 files changed, 2096 insertions, 629 deletions
diff --git a/tools/build/Makefile.am b/tools/build/Makefile.am index 97374498b8..ed0be76b44 100644 --- a/tools/build/Makefile.am +++ b/tools/build/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 bin_PROGRAMS=cklength eolstrip packhex unhex @@ -20,20 +20,4 @@ rcs-clean noinst_SCRIPTS = search-id.sh -# -# HACK: Install to build directory -# -install-exec-local: $(bin_PROGRAMS) $(bin_SCRIPTS) - if test -n "${RTEMS_BSP}"; then \ - $(mkinstalldirs) $(PROJECT_ROOT)/${RTEMS_BSP}/build-tools; \ - for i in $(bin_SCRIPTS); do \ - $(INSTALL_SCRIPT) $$i $(PROJECT_ROOT)/${RTEMS_BSP}/build-tools; \ - done; \ - for i in $(bin_PROGRAMS); do \ - $(INSTALL_PROGRAM) $$i $(PROJECT_ROOT)/${RTEMS_BSP}/build-tools; \ - done; \ - fi - -preinstall: install-exec-local - include $(top_srcdir)/../../automake/local.am diff --git a/tools/build/Makefile.in b/tools/build/Makefile.in index b0154fca94..ae7cb5e9c5 100644 --- a/tools/build/Makefile.in +++ b/tools/build/Makefile.in @@ -1,15 +1,22 @@ -# Makefile.in generated automatically by automake 1.2 from Makefile.am +# Makefile.in generated automatically by automake 1.4 from Makefile.am -# Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. +# 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, distribute and modify it. +# 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$ # -SHELL = /bin/sh + +SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -30,53 +37,54 @@ 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@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ -NORMAL_INSTALL = true -PRE_INSTALL = true -POST_INSTALL = true -NORMAL_UNINSTALL = true -PRE_UNINSTALL = true -POST_UNINSTALL = true +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ CC = @CC@ +EXEEXT = @EXEEXT@ KSH = @KSH@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ -PROJECT_ROOT = @PROJECT_ROOT@ -RTEMS_ROOT = @RTEMS_ROOT@ RTEMS_TOPdir = @RTEMS_TOPdir@ VERSION = @VERSION@ -AUTOMAKE_OPTIONS = foreign -ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal +AUTOMAKE_OPTIONS = foreign 1.4 +ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal -bin_PROGRAMS=cklength eolstrip packhex unhex +bin_PROGRAMS = cklength eolstrip packhex unhex cklength_SOURCES = cklength.c eolstrip_SOURCES = eolstrip.c -packhex_SOURCES = packhex.c -unhex_SOURCES = unhex.c +packhex_SOURCES = packhex.c +unhex_SOURCES = unhex.c + +bin_SCRIPTS = install-if-change lock-directory unlock-directory rcs-clean -bin_SCRIPTS=\ -install-if-change \ -lock-directory \ -unlock-directory \ -rcs-clean noinst_SCRIPTS = search-id.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -84,6 +92,8 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = install-if-change lock-directory rcs-clean \ unlock-directory +bin_PROGRAMS = cklength$(EXEEXT) eolstrip$(EXEEXT) packhex$(EXEEXT) \ +unhex$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) @@ -93,86 +103,98 @@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ cklength_OBJECTS = cklength.o cklength_LDADD = $(LDADD) +cklength_DEPENDENCIES = cklength_LDFLAGS = eolstrip_OBJECTS = eolstrip.o eolstrip_LDADD = $(LDADD) +eolstrip_DEPENDENCIES = eolstrip_LDFLAGS = packhex_OBJECTS = packhex.o packhex_LDADD = $(LDADD) +packhex_DEPENDENCIES = packhex_LDFLAGS = unhex_OBJECTS = unhex.o unhex_LDADD = $(LDADD) +unhex_DEPENDENCIES = unhex_LDFLAGS = SCRIPTS = $(bin_SCRIPTS) $(noinst_SCRIPTS) CFLAGS = @CFLAGS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) -LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ -DIST_COMMON = README Makefile.am Makefile.in aclocal.m4 config.h.in \ -configure configure.in install-if-change.in lock-directory.in \ -rcs-clean.in stamp-h.in unlock-directory.in +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) +CCLD = $(CC) +LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ +DIST_COMMON = README ./stamp-h.in Makefile.am Makefile.in aclocal.m4 \ +config.h.in configure configure.in install-if-change.in \ +lock-directory.in rcs-clean.in unlock-directory.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar -GZIP = --best +GZIP_ENV = --best DEP_FILES = .deps/cklength.P .deps/eolstrip.P .deps/packhex.P \ .deps/unhex.P SOURCES = $(cklength_SOURCES) $(eolstrip_SOURCES) $(packhex_SOURCES) $(unhex_SOURCES) OBJECTS = $(cklength_OBJECTS) $(eolstrip_OBJECTS) $(packhex_OBJECTS) $(unhex_OBJECTS) -default: all - +all: all-redirect .SUFFIXES: -.SUFFIXES: .c .o -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +.SUFFIXES: .S .c .o .s +$(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) +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: $(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) config.h: stamp-h + @if test ! -f $@; then \ + rm -f stamp-h; \ + $(MAKE) stamp-h; \ + else :; fi stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status - @echo timestamp > stamp-h -$(srcdir)/config.h.in: $(srcdir)/stamp-h.in + @echo timestamp > stamp-h 2> /dev/null +$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/stamp-h.in; \ + $(MAKE) $(srcdir)/stamp-h.in; \ + else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) - @echo timestamp > $(srcdir)/stamp-h.in + @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: - rm -f config.h + -rm -f config.h maintainer-clean-hdr: install-if-change: $(top_builddir)/config.status install-if-change.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status lock-directory: $(top_builddir)/config.status lock-directory.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status rcs-clean: $(top_builddir)/config.status rcs-clean.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status unlock-directory: $(top_builddir)/config.status unlock-directory.in - cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= ./config.status + cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-binPROGRAMS: clean-binPROGRAMS: - test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) + -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) distclean-binPROGRAMS: @@ -180,85 +202,97 @@ maintainer-clean-binPROGRAMS: install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(bindir) + $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ - echo " $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_PROGRAM) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ + echo " $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done uninstall-binPROGRAMS: - $(NORMAL_UNINSTALL) + @$(NORMAL_UNINSTALL) list='$(bin_PROGRAMS)'; for p in $$list; do \ - rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ done -.c.o: +.s.o: + $(COMPILE) -c $< + +.S.o: $(COMPILE) -c $< mostlyclean-compile: - rm -f *.o core + -rm -f *.o core *.core clean-compile: distclean-compile: - rm -f *.tab.c + -rm -f *.tab.c maintainer-clean-compile: -cklength: $(cklength_OBJECTS) $(cklength_DEPENDENCIES) - @rm -f cklength +cklength$(EXEEXT): $(cklength_OBJECTS) $(cklength_DEPENDENCIES) + @rm -f cklength$(EXEEXT) $(LINK) $(cklength_LDFLAGS) $(cklength_OBJECTS) $(cklength_LDADD) $(LIBS) -eolstrip: $(eolstrip_OBJECTS) $(eolstrip_DEPENDENCIES) - @rm -f eolstrip +eolstrip$(EXEEXT): $(eolstrip_OBJECTS) $(eolstrip_DEPENDENCIES) + @rm -f eolstrip$(EXEEXT) $(LINK) $(eolstrip_LDFLAGS) $(eolstrip_OBJECTS) $(eolstrip_LDADD) $(LIBS) -packhex: $(packhex_OBJECTS) $(packhex_DEPENDENCIES) - @rm -f packhex +packhex$(EXEEXT): $(packhex_OBJECTS) $(packhex_DEPENDENCIES) + @rm -f packhex$(EXEEXT) $(LINK) $(packhex_LDFLAGS) $(packhex_OBJECTS) $(packhex_LDADD) $(LIBS) -unhex: $(unhex_OBJECTS) $(unhex_DEPENDENCIES) - @rm -f unhex +unhex$(EXEEXT): $(unhex_OBJECTS) $(unhex_DEPENDENCIES) + @rm -f unhex$(EXEEXT) $(LINK) $(unhex_LDFLAGS) $(unhex_OBJECTS) $(unhex_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) - $(mkinstalldirs) $(bindir) + $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_SCRIPTS)'; for p in $$list; do \ if test -f $$p; then \ - echo " $(INSTALL_SCRIPT) $$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $$p $(bindir)/`echo $$p|sed '$(transform)'`; \ + echo " $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else if test -f $(srcdir)/$$p; then \ - echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(bindir)/`echo $$p|sed '$(transform)'`"; \ - $(INSTALL_SCRIPT) $(srcdir)/$$p $(bindir)/`echo $$p|sed '$(transform)'`; \ + echo " $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`"; \ + $(INSTALL_SCRIPT) $(srcdir)/$$p $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ else :; fi; fi; \ done uninstall-binSCRIPTS: - $(NORMAL_UNINSTALL) + @$(NORMAL_UNINSTALL) list='$(bin_SCRIPTS)'; for p in $$list; do \ - rm -f $(bindir)/`echo $$p|sed '$(transform)'`; \ + rm -f $(DESTDIR)$(bindir)/`echo $$p|sed '$(transform)'`; \ done tags: TAGS -ID: $(HEADERS) $(SOURCES) - here=`pwd` && cd $(srcdir) && mkid -f$$here/ID $(SOURCES) $(HEADERS) +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: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) +TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ - test -z "$(ETAGS_ARGS)config.h.in$(SOURCES)$(HEADERS)$$tags" \ - || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $(SOURCES) $(HEADERS) -o $$here/TAGS) + 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)config.h.in$$unique$(LISP)$$tags" \ + || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS) mostlyclean-tags: clean-tags: distclean-tags: - rm -f TAGS ID + -rm -f TAGS ID maintainer-clean-tags: @@ -269,52 +303,54 @@ top_distdir = $(distdir) # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist - rm -rf $(distdir) - GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz + -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) \ - && $(MAKE) dvi \ - && $(MAKE) check \ - && $(MAKE) install \ - && $(MAKE) installcheck \ - && $(MAKE) dist - rm -rf $(distdir) - @echo "========================"; \ - echo "$(distdir).tar.gz is ready for distribution"; \ - echo "========================" + && $(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) $(TAR) chozf $(distdir).tar.gz $(distdir) - rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) - GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir) - rm -rf $(distdir) + GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) + -rm -rf $(distdir) distdir: $(DISTFILES) - rm -rf $(distdir) + -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) here=`cd $(top_builddir) && pwd`; \ - top_distdir=`cd $(top_distdir) && 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); \ - test -f $(distdir)/$$file \ - || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ - || cp -p $$d/$$file $(distdir)/$$file; \ + 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 -MKDEP = gcc -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) - DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :) --include .deps/.P -.deps/.P: $(BUILT_SOURCES) - echo > $@ -include $(DEP_FILES) @@ -323,104 +359,137 @@ mostlyclean-depend: clean-depend: distclean-depend: + -rm -rf .deps maintainer-clean-depend: - rm -rf .deps - -.deps/%.P: %.c - @echo "Computing dependencies for $<..." - @o='o'; \ - test -n "$o" && o='$$o'; \ - $(MKDEP) $< >$@.tmp \ - && sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," < $@.tmp > $@ \ - && rm -f $@.tmp -info: -dvi: -check: all - $(MAKE) -installcheck: -install-exec: install-binPROGRAMS install-binSCRIPTS install-exec-local - @$(NORMAL_INSTALL) - -install-data: - @$(NORMAL_INSTALL) - -install: install-exec install-data all - @: - -uninstall: uninstall-binPROGRAMS uninstall-binSCRIPTS - -all: Makefile $(PROGRAMS) $(SCRIPTS) config.h +%.o: %.c + @echo '$(COMPILE) -c $<'; \ + $(COMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-cp .deps/$(*F).pp .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm .deps/$(*F).pp + +%.lo: %.c + @echo '$(LTCOMPILE) -c $<'; \ + $(LTCOMPILE) -Wp,-MD,.deps/$(*F).pp -c $< + @-sed -e 's/^\([^:]*\)\.o[ ]*:/\1.lo \1.o :/' \ + < .deps/$(*F).pp > .deps/$(*F).P; \ + tr ' ' '\012' < .deps/$(*F).pp \ + | sed -e 's/^\\$$//' -e '/^$$/ d' -e '/:$$/ d' -e 's/$$/ :/' \ + >> .deps/$(*F).P; \ + rm -f .deps/$(*F).pp +info-am: +info: info-am +dvi-am: +dvi: dvi-am +check-am: all-am +check: check-am +installcheck-am: +installcheck: installcheck-am +all-recursive-am: config.h + $(MAKE) $(AM_MAKEFLAGS) all-recursive + +install-exec-am: install-binPROGRAMS install-binSCRIPTS +install-exec: install-exec-am + +install-data-am: +install-data: install-data-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am +install: install-am +uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS +uninstall: uninstall-am +all-am: Makefile $(PROGRAMS) $(SCRIPTS) config.h +all-redirect: all-am install-strip: - $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install + $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: - $(mkinstalldirs) $(bindir) $(bindir) + $(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir) mostlyclean-generic: - test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES) clean-generic: - test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: - rm -f Makefile $(DISTCLEANFILES) - rm -f config.cache config.log stamp-h stamp-h[0-9]* - test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -rm -f Makefile $(CONFIG_CLEAN_FILES) + -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: - test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) - test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -mostlyclean: mostlyclean-hdr mostlyclean-binPROGRAMS \ +mostlyclean-am: mostlyclean-hdr mostlyclean-binPROGRAMS \ mostlyclean-compile mostlyclean-tags mostlyclean-depend \ mostlyclean-generic -clean: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ - clean-depend clean-generic mostlyclean +mostlyclean: mostlyclean-am + +clean-am: clean-hdr clean-binPROGRAMS clean-compile clean-tags \ + clean-depend clean-generic mostlyclean-am + +clean: clean-am + +distclean-am: distclean-hdr distclean-binPROGRAMS distclean-compile \ + distclean-tags distclean-depend distclean-generic \ + clean-am -distclean: distclean-hdr distclean-binPROGRAMS distclean-compile \ - distclean-tags distclean-depend distclean-generic clean - rm -f config.status +distclean: distclean-am + -rm -f config.status -maintainer-clean: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ +maintainer-clean-am: maintainer-clean-hdr maintainer-clean-binPROGRAMS \ maintainer-clean-compile maintainer-clean-tags \ maintainer-clean-depend maintainer-clean-generic \ - distclean + distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." - rm -f config.status -.PHONY: default mostlyclean-hdr distclean-hdr clean-hdr \ -maintainer-clean-hdr mostlyclean-binPROGRAMS distclean-binPROGRAMS \ -clean-binPROGRAMS maintainer-clean-binPROGRAMS uninstall-binPROGRAMS \ -install-binPROGRAMS mostlyclean-compile distclean-compile clean-compile \ +maintainer-clean: maintainer-clean-am + -rm -f config.status + +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +mostlyclean-binPROGRAMS distclean-binPROGRAMS clean-binPROGRAMS \ +maintainer-clean-binPROGRAMS uninstall-binPROGRAMS install-binPROGRAMS \ +mostlyclean-compile distclean-compile clean-compile \ maintainer-clean-compile uninstall-binSCRIPTS install-binSCRIPTS tags \ mostlyclean-tags distclean-tags clean-tags maintainer-clean-tags \ distdir mostlyclean-depend distclean-depend clean-depend \ -maintainer-clean-depend info dvi installcheck install-exec install-data \ -install uninstall all installdirs mostlyclean-generic distclean-generic \ -clean-generic maintainer-clean-generic clean mostlyclean distclean \ -maintainer-clean +maintainer-clean-depend info-am info dvi-am dvi check check-am \ +installcheck-am installcheck all-recursive-am 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 to build directory -# -install-exec-local: $(bin_PROGRAMS) $(bin_SCRIPTS) - if test -n "${RTEMS_BSP}"; then \ - $(mkinstalldirs) $(PROJECT_ROOT)/${RTEMS_BSP}/build-tools; \ - for i in $(bin_SCRIPTS); do \ - $(INSTALL_SCRIPT) $$i $(PROJECT_ROOT)/${RTEMS_BSP}/build-tools; \ - done; \ - for i in $(bin_PROGRAMS); do \ - $(INSTALL_PROGRAM) $$i $(PROJECT_ROOT)/${RTEMS_BSP}/build-tools; \ - done; \ - fi - -preinstall: install-exec-local - -include $(top_srcdir)/../../automake/local.am +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. diff --git a/tools/build/aclocal.m4 b/tools/build/aclocal.m4 index 019b89fb09..2d41a48f57 100644 --- a/tools/build/aclocal.m4 +++ b/tools/build/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 # Do all the work for Automake. This macro actually does too much -- @@ -143,6 +136,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, diff --git a/tools/build/configure b/tools/build/configure index 04bd93f50a..5641970730 100644 --- a/tools/build/configure +++ b/tools/build/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 @@ -554,12 +557,8 @@ fi RTEMS_TOPdir="../.."; -PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; -test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.." - - echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6 -echo "configure:563: checking for RTEMS Version" >&5 +echo "configure:562: 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'` @@ -571,9 +570,6 @@ if test -z "$RTEMS_VERSION"; then fi echo "$ac_t""$RTEMS_VERSION" 1>&6 -RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; - - # Make sure we can run config.sub. @@ -582,7 +578,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:586: checking host system type" >&5 +echo "configure:582: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -615,7 +611,7 @@ echo "$ac_t""$host" 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:619: checking for a BSD compatible install" >&5 +echo "configure:615: 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 @@ -668,7 +664,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:672: checking whether build environment is sane" >&5 +echo "configure:668: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -725,7 +721,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:729: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:725: 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 @@ -764,7 +760,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:768: checking for working aclocal" >&5 +echo "configure:764: 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. @@ -777,7 +773,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:781: checking for working autoconf" >&5 +echo "configure:777: 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. @@ -790,7 +786,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:794: checking for working automake" >&5 +echo "configure:790: 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. @@ -803,7 +799,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:807: checking for working autoheader" >&5 +echo "configure:803: 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. @@ -816,7 +812,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:820: checking for working makeinfo" >&5 +echo "configure:816: 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. @@ -829,13 +825,36 @@ else fi +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +echo "configure:830: 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 + + echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6 -echo "configure:834: checking for Cygwin environment" >&5 +echo "configure:853: checking for Cygwin environment" >&5 if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 839 "configure" +#line 858 "configure" #include "confdefs.h" int main() { @@ -846,7 +865,7 @@ int main() { return __CYGWIN__; ; return 0; } EOF -if { (eval echo configure:850: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_cygwin=yes else @@ -863,19 +882,19 @@ echo "$ac_t""$ac_cv_cygwin" 1>&6 CYGWIN= test "$ac_cv_cygwin" = yes && CYGWIN=yes echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6 -echo "configure:867: checking for mingw32 environment" >&5 +echo "configure:886: checking for mingw32 environment" >&5 if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 872 "configure" +#line 891 "configure" #include "confdefs.h" int main() { return __MINGW32__; ; return 0; } EOF -if { (eval echo configure:879: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_mingw32=yes else @@ -894,7 +913,7 @@ test "$ac_cv_mingw32" = yes && MINGW32=yes echo $ac_n "checking for executable suffix""... $ac_c" 1>&6 -echo "configure:898: checking for executable suffix" >&5 +echo "configure:917: checking for executable suffix" >&5 if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -904,7 +923,7 @@ else rm -f conftest* echo 'int main () { return 0; }' > conftest.$ac_ext ac_cv_exeext= - if { (eval echo configure:908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then + if { (eval echo configure:927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then for file in conftest.*; do case $file in *.c | *.o | *.obj) ;; @@ -928,7 +947,7 @@ ac_exeext=$EXEEXT # 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:932: checking for $ac_word" >&5 +echo "configure:951: 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 @@ -958,7 +977,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:962: checking for $ac_word" >&5 +echo "configure:981: 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 @@ -1009,7 +1028,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:1013: checking for $ac_word" >&5 +echo "configure:1032: 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 @@ -1041,7 +1060,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1045: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1064: 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. @@ -1052,12 +1071,12 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext << EOF -#line 1056 "configure" +#line 1075 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1080: \"$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 @@ -1083,12 +1102,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:1087: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1106: 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:1092: checking whether we are using GNU C" >&5 +echo "configure:1111: 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 @@ -1097,7 +1116,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1101: \"$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:1120: \"$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 @@ -1116,7 +1135,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:1120: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1139: 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 @@ -1150,12 +1169,12 @@ fi for ac_func in strerror do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1154: checking for $ac_func" >&5 +echo "configure:1173: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <<EOF -#line 1159 "configure" +#line 1178 "configure" #include "confdefs.h" /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); below. */ @@ -1178,7 +1197,7 @@ $ac_func(); ; return 0; } EOF -if { (eval echo configure:1182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1201: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -1209,7 +1228,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:1213: checking for $ac_word" >&5 +echo "configure:1232: 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 @@ -1394,8 +1413,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 @@ -1412,6 +1429,9 @@ 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%@EXEEXT@%$EXEEXT%g s%@CC@%$CC%g s%@KSH@%$KSH%g diff --git a/tools/build/configure.in b/tools/build/configure.in index 33f4c8ac77..fe1fefaa42 100644 --- a/tools/build/configure.in +++ b/tools/build/configure.in @@ -10,6 +10,7 @@ RTEMS_TOP(../..) AC_CANONICAL_HOST AM_INIT_AUTOMAKE(rtems-build-tools,$RTEMS_VERSION,no) +AM_MAINTAINER_MODE AC_EXEEXT AC_PROG_CC 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 diff --git a/tools/update/Makefile.am b/tools/update/Makefile.am index 256cf69c78..af77500d1c 100644 --- a/tools/update/Makefile.am +++ b/tools/update/Makefile.am @@ -3,7 +3,7 @@ # AUTOMAKE_OPTIONS = foreign 1.4 -ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal +ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal # NOTE: It doesn't make much sense to install these files CLEANFILES = update word-replace diff --git a/tools/update/Makefile.in b/tools/update/Makefile.in index 529a1bafed..0a774c2163 100644 --- a/tools/update/Makefile.in +++ b/tools/update/Makefile.in @@ -44,6 +44,8 @@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . + +ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ @@ -62,9 +64,12 @@ PRE_UNINSTALL = : POST_UNINSTALL = : host_alias = @host_alias@ host_triplet = @host@ +INSTALL_CHANGE = @INSTALL_CHANGE@ KSH = @KSH@ +MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ +PACKHEX = @PACKHEX@ PERL = @PERL@ PROJECT_ROOT = @PROJECT_ROOT@ RTEMS_ROOT = @RTEMS_ROOT@ @@ -73,10 +78,12 @@ 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 1.4 -ACLOCAL = @ACLOCAL@ -I $(RTEMS_TOPdir)/aclocal +ACLOCAL_AMFLAGS = -I $(RTEMS_TOPdir)/aclocal # NOTE: It doesn't make much sense to install these files CLEANFILES = update word-replace @@ -107,19 +114,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) tags: TAGS TAGS: diff --git a/tools/update/aclocal.m4 b/tools/update/aclocal.m4 index c3a3c776a8..079a0bfcc1 100644 --- a/tools/update/aclocal.m4 +++ b/tools/update/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 # Do all the work for Automake. This macro actually does too much -- @@ -143,6 +136,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, @@ -171,23 +197,12 @@ AC_MSG_WARN( fi ]) -# 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 +214,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/update/acpolish b/tools/update/acpolish index d348bf9ae6..6c3fc7a4b9 100755 --- a/tools/update/acpolish +++ b/tools/update/acpolish @@ -1,5 +1,11 @@ #!/usr/bin/perl +# use strict 'subs' ; +# use strict 'vars' ; +# use strict 'refs' ; + +# use strict ; + # # Perl script to beautify and enhance RTEMS autoconf Makefile.ins # @@ -9,20 +15,74 @@ # acpolish <Makefile.in >Makefile.in~ # mv Makefile.in~ Makefile.in # -# ATTENTION: This file contains embedded tabs +# Note: This tool is not indented to be exported from the source-tree +# if ( -f "Makefile.am" ) { - # Refuse to work on autoconfiscated Makefile.ins; + # Refuse to work on Makefile.ins generated from automake; # redirecting STDOUT to Makefile.in will trash the Makefile.in ;- - die "acpolish must not be run in autoconfiscated directories" ; + die "acpolish must not be run in automake directories" ; } - +my $experimental = 0 ; # enable experimental/unsafe features +my $verbose = 0 ; my $build_pgms_seen = "" ; +my $make_exe_seen = 0 ; +my $install_seen = 0 ; my $top_builddir = ""; my $subdir = ""; +my @installdirs = () ; + +my @pieces = () ; +my @files = () ; +my @variants = () ; +my @vars = () ; + +sub print_macro($$) +{ + my $line = $_[0] ; + my $input = $_[1] ; + $input =~ s/\\\\/ /g; + my @l = split(' ',$input); + + foreach (@l) { + if ( ( length($line) + length($_) ) < 76 ) + { + $line .= " $_"; + } + else + { + print "$line \\\n"; + $line = " $_" ; + } + } + print "$line\n" ; +} + +# Strip off duplicate entries from a list +sub purge($) +{ + my $list = $_[0] ; # Reference to list ! + my (@tmp) = () ; + + foreach my $l ( @{$list} ) + { + my $i = 1 ; + foreach my $t (@tmp) + { + if ( $t eq $l ) + { + $i = 0 ; + last ; + } + } + push @tmp,$l if ($i) ; + } + + @{$list} = @tmp ; +} sub find_root { @@ -58,100 +118,477 @@ sub find_root find_root(); -my $nl_seen = 0 ; +my @buffer = () ; -while( <> ) -{ - if ( /^[ ]*$/o ) - { - $nl_seen = $nl_seen+1; +sub subst_line +{ +# substitute obsolete variables + if ( /^([^\s]*)[\s]+$/o ) + { # strip trailing spaces + $_ = "$1\n"; } - - if ( /^(.*)\$\(RTEMS_BSP\)(.*)$/o ) + if ( /^(.*)MKLIB(.*)$/o ) { - $_ = "$1\$\{RTEMS_BSP\}$2\n" ; + s/MKLIB/RANLIB/g ; } - - if ( /^(.*)\$\(PROJECT_ROOT\)\/\$\{RTEMS_BSP\}\/lib\/include(.*)$/o ) + if ( /^(.*)\$\(INSTINCFLAGS\)(.*)$/o ) { - $_ = "$1\$\(PROJECT_INCLUDE\)$2\n" ; + s/\$\(INSTINCFLAGS\)/-m 644/g ; } - - if ( /^(.*)\$\{PROJECT_RELEASE\}(.*)$/o ) + if ( /^(.*)ASM(_FILES|_PIECES|_O_FILES)(.*)$/o ) { - $_ = "$1\$\{PROJECT_RELEASE\}$2\n" ; + s/ASM_FILES/S_FILES/g ; + s/ASM_PIECES/S_PIECES/g ; + s/ASM_O_FILES/S_O_FILES/g ; + print STDERR "ASM: $_" if ( $verbose > 0) ; } - - if ( /^[ ]*srcdir[ ]*=.*$/o ) - { - print "\@SET_MAKE\@\n" ; - print "$_" ; - print "top_srcdir = \@top_srcdir\@\n" ; - print "top_builddir = $top_builddir\n" ; - print "subdir = $subdir\n" if "$subdir" ; - print "\nINSTALL = \@INSTALL\@\n\n"; - print "RTEMS_ROOT = \$(top_srcdir)/\@RTEMS_TOPdir\@\n" ; - print "PROJECT_ROOT = \@PROJECT_ROOT\@\n\n" ; - $nl_seen=1; + if ( /^(.*)MP_PIECES(.*)$/o ) + { # HACK: this is not always correct + s/MP_PIECES/MP_C_PIECES/g ; + print STDERR "MP_PIECES: $_" if ( $verbose > 0 ); } - elsif ( /^[ ]*top_srcdir[ ]*=.*$/o ) + if ( /^(.*)\$\(RTEMS_BSP\)(.*)$/o ) { - # remove the line + s/\$\(RTEMS_BSP\)/\@RTEMS_BSP\@/g ; } - elsif ( /^[ ]*top_builddir[ ]*=.*$/o ) + if ( /^(.*)\$\(RTEMS_ROOT\)\/mkinstalldirs(.*)$/o ) { - # remove the line + $_ = "$1\$\(mkinstalldirs\)$2\n" ; } - elsif ( /^[ ]*Makefile:.*/o ) - { # consume the block - while( <> ) { last if /^[ ]*$/o ; } + if ( /^(.*)\$\{(.*)_FILES\}(.*)$/o ) + { + $_ = "$1\$\($2_FILES\)$3\n" ; } - elsif ( /^[ ]*%:[ ]\$\(srcdir\)\/%\.in.*$/o ) - { # consume the block - while( <> ) { last if /^[ ]*$/o ; } + if ( /^(.*)\$\{(.*)_PIECES\}(.*)$/o ) + { + $_ = "$1\$\($2_PIECES\)$3\n" ; } - elsif ( /^[ ]*RTEMS_ROOT[ ]*=.*$/o ) + if ( /^(.*)\$\(PROJECT_ROOT\)\/\@RTEMS_BSP\@\/lib\/include(.*)$/o ) { - # remove the line + $_ = "$1\$\(PROJECT_INCLUDE\)$2\n" ; } - elsif ( /^[ ]*PROJECT_ROOT[ ]*=.*$/o ) + if ( /^(.*)\$\{PROJECT_RELEASE\}(.*)$/o ) { - # remove the line + $_ = "$1\$\(PROJECT_RELEASE\)$2\n" ; } - elsif ( /^[ ]*INSTALL[ ]*=[ ]*\@INSTALL\@.*$/o ) + if ( /^(.*\$\(INSTALL_[A-Z]+\))[\s]+-m[\s]+([54])([0-9][0-9].*)$/o ) { - # remove the line + my $v = $2 + 2 ; + $_ = "$1 -m $v$3\n" ; } - elsif ( /^[ ]*subdir[ ]*=.*$/o ) + if ( /^H_FILES[\s]*=[\s]*\$\(wildcard[\s]+\$\(srcdir\)\/\*\.h\)[\s]*$/o ) { - # remove the line + my $files =`ls *.h 2>/dev/null`; + print STDERR "WARNING: Replacing \"\(wildcard... in $_\n" ; + $line = "H_FILES ="; + @l = split(' ',$files) ; + foreach(@l) { $line .= " \$\(srcdir\)/$_"; } + $line .= "\n" ; + $_ = "$line" ; } - elsif ( /^[ ]*\@SET_MAKE\@.*$/o ) + if ( /^.*\$\(make\-exe\).*$/o ) { - # remove the line + $make_exe_seen = 1 ; } - elsif ( /^include[ ]*.*rtems\.cfg.*$/o ) + if ( /^.*\$\(INSTALL_(DATA|SCRIPT|PROGRAM)\)(.*)$/o ) { - # remove the line + $install_seen = 1 ; } - elsif ( /^[ ]*BUILD_PGMS.*=.*$/o ) +} + +{ +# 1st PASS: +# * Read input file +# * concatenate multiple lines +# * Remove obsolete variables + + my @ibuf = () ; + my $line = "" ; + + while ( <> ) { - $build_pgms_seen = "true" ; - print "$_" ; - $nl_seen=0; + &subst_line ; + if ( /^(#.*)$/o ) + { # preserve comments + $line = "$_" ; + push @ibuf, $line ; + $line = "" ; + } + elsif ( /^.*\\$/o ) + { # multilines + chop ; + $line .= "$_\\" ; + } + else + { + $line .= "$_" ; + push @ibuf, $line ; + $line = "" ; + } } - elsif ( /^[ ]*$/o ) + @buffer = @ibuf; +} + +{ +# 2nd PASS: +# * remove automatically generated lines +# * process some selected make rules + my $line = "" ; + my @tbuf = () ; + foreach (@buffer) { - print "$_" if $nl_seen < 2 ; + if ( /^[\t](.*)$/o ) + { # make rule production + my $line = $1 ; + tr/\\/ / ; + my @l = split(/;/,$_); + foreach (@l) + { # try to get installation directories + if ( /^.*\$\(mkinstalldirs\).*\s\$\(INSTALLDIRS\)$/o ) + { + } + elsif ( /^.*\$\(mkinstalldirs\).*\s([^\s]+)$/o ) + { + push @installdirs, "$1" ; + } + elsif ( /^.*\$\(INSTALL_CHANGE\).*\s([^\s]+)$/o ) + { + push @installdirs, "$1" ; + } + } + push @tbuf, "§3$line" + } + elsif ( /^[\s]*\#.*$/o ) + { # comment + push @tbuf, "$_" ; + } + elsif ( /^[\s]*([A-Z_]*)_FILES[\s]*\=[\s]*(.*)$/o ) + { # *_FILES = ... Macros + if ( /^[\s]*([A-Z_]*_|)(CC|C|EQ|H|I|O|S|X)_FILES[\s]*\=[\s]*(.*)$/o ) + { +# print STDERR "FILES: <$1>--<$2>--<$3>\n" ; + my $f = "$1$2_FILES" ; + ${"var_$f"}="$3" ; + if ( ( $experimental > 0 ) + and ( ( "$2" eq "C" ) or ( "$2" eq "CC" ) or ( "$2" eq "S" ) + or ( "$2" eq "I" ) or ( "$2" eq "H" ) ) ) + { + my $p = "$1$2_PIECES" ; + if ( not defined ${"var_$p"} ) + { + print STDERR "ADDING $p\n" ; + ${"var_$p"} = "" ; + push @tbuf, "§4$p\n" ; + push @pieces, "$p" ; + } + } + # place a marker + push @tbuf, "§4$f\n" ; + push @files, "$f" ; + } + else + { # found a bug + print STDERR "UNKNOWN _FILES: $_\n" ; + my $f = "$1_FILES" ; + ${"var_$f"}="$2" ; + # place a marker + push @tbuf, "§4$f\n" ; + push @files, "$f" ; + } + } + elsif ( /^[\s]*([A-Z_]*)_PIECES[\s]*\=[\s]*(.*)$/o ) + { # *_PIECES = ... Macros + if ( /^[\s]*([A-Z][A-Z0-9_]*_|)(CC|C|EQ|H|I|O|S|X|REL)_PIECES[\s]*\=[\s]*(.*)$/o ) + { + my $p = "$1$2_PIECES" ; + + if ( not defined ${"var_$p"} ) + { + ${"var_$p"} = "$3" ; + push @tbuf, "§4$p\n" ; + push @pieces, "$p" ; + } + else + { + ${"var_$p"} .= " $3" ; + } + } + elsif ( /^[\s]*(BSP|CPU|GENERIC)_PIECES[\s]*\=[\s]*(.*)$/o ) + { # Explicit exceptions from the *_PIECES naming conventions + # They should better be replaced in future + my $p = "$1_PIECES" ; + ${"var_$p"}="$2" ; + # place a marker + push @tbuf, "§4$p\n" ; + push @pieces, "$p" ; + } + else + { # found a bug + print STDERR "UNKNOWN _PIECES: $_\n" ; + my $p = "$1_PIECES" ; + ${"var_$p"}="$2" ; + # place a marker + push @tbuf, "§4$p\n" ; + push @pieces, "$p" ; + } + } + elsif ( /^[\s]*([A-Z_]+)_PIECES_([^\s]+)_V[\s]*\=[\s]*(.*)$/o ) + { # *_PIECES_.._V = ... Macros + if ( /^[\s]*([A-Z][A-Z0-9_]*_|)(CC|C|EQ|H|I|O|S|X|REL)_PIECES_([^\s]+)_V[\s]*\=[\s]*(.*)$/o ) + { + my @l = split(/_/,$3); + my $v = "$1$2-$#l" ; + if ( not defined @{"variants_$v"} ) { push @variants, "$v" ; } + + my $p = "$1$2_PIECES_$3_V" ; + push @{"variants_${v}"}, "$p" ; + + ${"var_$p"}="$4" ; + # place a marker + push @tbuf, "§4$p\n" ; + push @pieces, "$p" ; + } + else + { # found a bug + print STDERR "UNKNOWN _PIECES: $_\n" ; + my $p = "$1_PIECES" ; + ${"var_$p"}="$2" ; + # place a marker + push @tbuf, "§4$p\n" ; + push @pieces, "$p" ; + } + } + elsif ( /^[\s]*([^\s+=]+)[\s]*\=[\s]*(.*)$/o ) + { # makefile variable + if ( ( "$1" eq "subdir" ) + or ( "$1" eq "top_srcdir" ) + or ( "$1" eq "top_builddir" ) + or ( "$1" eq "RTEMS_ROOT" ) + or ( "$1" eq "PROJECT_ROOT" ) + or ( "$1" eq "INSTALL" ) + or ( "$1" eq "PACKHEX" ) + or ( "$1" eq "INSTALL_CHANGE" ) + or ( "$1" eq "mkinstalldirs" ) + ) + { + print STDERR "REMOVE: $1\n" if $verbose ; + } + elsif ( "$1" eq "srcdir" ) + { # place marker + push @tbuf, "§0\n"; + } + elsif ( "$1" eq "INSTALLDIRS" ) + { # process the block + my $input = $2 ; + $input =~ s/\\\\/ /g ; + my @l = split(' ',$input); + foreach (@l) + { + if ( /[\s]*([^\s]+)[\s]*$/o ) + { + push @installdirs, "$1" ; + } + } + } + else + { +# print STDERR "MACRO: <$1> = <$2>\n"; + my $p = "$1" ; + ${"var_$p"}="$2" ; + # place a marker + push @tbuf, "§4$p\n" ; + push @vars, "$p" ; + } + } + elsif ( /^[\s]*([^\s+=]+)[\s]*\+\=[\s]*(.*)$/o ) + { # makefile variable addition +# print STDERR "MACRO: <$1> += <$2>\n"; + my $p = "$1" ; + ${"var_$p+"}="$2" ; + # place a marker + push @tbuf, "§5$p\n" ; + push @vars, "$p+" ; + } + elsif ( /^[\s]*(\@[^\s]+\@)$/o ) + { # autoconf variable + if ( "$1" eq "\@SET_MAKE\@" ) + { + } + else + { + push @tbuf, "$1\n" ; + } + } + elsif ( /^[\s]*include[\s]+(.*)$/o ) + { # include line + push @tbuf, "$_" ; + if ( /^include[\s\t]*.*(directory|leaf|lib)\.cfg.*$/o ) + { + push @tbuf, "§1\n" ; + push @tbuf, "PACKHEX = \@PACKHEX\@\n" if ( $make_exe_seen == 1 ) ; + push @tbuf, "§2\n" ; + } + } + elsif ( /^[\s]*(ifeq|ifneq|else|endif)[\s]+(.*)$/o ) + { # gmake conditionals + # Most of them are removed, but we still have some :- + push @tbuf, "$1 $2\n" ; + } + elsif ( /^[\s]*([^:]+)[\s]*(:[:]*)[\s]*(.*)$/o ) + { + if ( "$2" eq "::" ) + { + # Warn about "::"-rules + # Will be silently removed below. + print STDERR "WARNING: Removing \"::\" in RULE $_\n" ; + } + + if ( ( "$1" eq "Makefile" ) + or ( "$1" eq "\$\(INSTALLDIRS\)" ) ) + { # delete entry + shift @buffer ; + } + elsif ( ( "$1" eq "all" ) + or ( "$1" eq "preinstall" ) ) + { + # Note the dependencies + # Not yet exploited, but could be useful for dependency + # tracking in future + if ( defined ${"var_$1"} ) + { ${"var_$1"} .= " $3" ; } + else + { ${"var_$1"} = "$3" ; } + push @tbuf, "$1: $3\n" ; + } + else + { # make rule + push @tbuf, "$1: $3\n" ; + } + } + elsif ( /^[\s]*$/o ) + { # empty line + push @tbuf, "\n" ; + } + else + { + die "PASS 2: Unhandled $_" ; + } } - else + @buffer = @tbuf ; + purge \@installdirs ; + purge \@pieces ; +} + +# A fragment to debug conditionals +#foreach( @variants ) +#{ +# my $v = $_ ; +# print STDERR "VARIANT: $v\n"; +# foreach (@{"variants_${v}"}) +# { +# print STDERR "* $_\n;" ; +# } +#} + +# sanity check on *_FILES macros +# too fragile for the time being, +# therefore disabled by default +if ( $experimental > 1 ) +{ + foreach( @files ) { - print "$_" ; - $nl_seen = 0; + my $file = "$_" ; + my $line = ${"var_$_"} ; + $line =~ tr /\\/ /; + my @l = split(' ',$line); + my @o = () ; + foreach (@l) + { + if ( /^([^\.]+)\.([a-z]+)$/o ) + { + print STDERR "$file: *.$2 in $_\n" ; + } + elsif ( /^\$\(.*\)$/o ) + { + print STDERR "$file: REF: $_\n" ; + } + else + { + print STDERR "$file: UNHANDLED: $_\n" ; + } + } } -} # while +} + +# print STDERR "PASS 2: @buffer" ; -print "\n" if $nl_seen < 1 ; +{ +# PASS 3: +# * output to new Makefile +# * prettyprint newlines + + my $nl_seen = 0 ; + foreach ( @buffer ) + { + if ( /^$/o ) + { + $nl_seen++ ; + print "\n" if ( $nl_seen < 2 ); + } + elsif ( /^\§0$/o ) + { + print "\@SET_MAKE\@\n" ; + print "srcdir = \@srcdir\@\n" ; + print "top_srcdir = \@top_srcdir\@\n" ; + print "top_builddir = $top_builddir\n" ; + print "subdir = $subdir\n" if "$subdir" ; + print "\nRTEMS_ROOT = \@RTEMS_ROOT\@\n" ; + print "PROJECT_ROOT = \@PROJECT_ROOT\@\n\n" ; + $nl_seen = 1 ; + } + elsif ( /^\§1$/o ) + { + print "\n" ; + print "INSTALL = \@INSTALL\@\n" if ( $install_seen > 0 ); + print "INSTALL_CHANGE = \@INSTALL_CHANGE\@\n" ; + $nl_seen = 0 ; + } + elsif ( /^\§2$/o ) + { # Handle installdirs related items + if ( $#installdirs >= 0 ) + { + print "mkinstalldirs = \$(SHELL) \$(top_srcdir)/\@RTEMS_TOPdir\@/mkinstalldirs\n\n" ; + my $line = join( ' ',@installdirs ); + print_macro "INSTALLDIRS =", $line ; + print "\n\$(INSTALLDIRS):\n\t\@\$(mkinstalldirs) \$(INSTALLDIRS)\n\n" ; + $nl_seen = 1 ; + } + } + elsif ( /^\§3(.*)$/o ) + { # pretty print a shell script fragment/make production + my @l = split(/\\\\/,$1); + if ( $#l >= 0 ) { my $i = shift @l ; print "\t$i"; } + foreach( @l ) { print "\\\n$_"; } + print "\n" ; + $nl_seen = 0 ; + } + elsif ( /^\§4(.*)$/o ) + { # pretty print a make variable + print_macro "$1 =", ${"var_$1"} ; + $nl_seen = 0 ; + } + elsif ( /^\§5(.*)$/o ) + { # pretty print an addition to a make variable + print_macro "$1 +=", ${"var_$1+"} ; + $nl_seen = 0 ; + } + else + { + $nl_seen = 0 ; + print "$_" ; + } + } +} # Add rules for config.status generated files if ( "$build_pgms_seen" ) @@ -164,7 +601,7 @@ print "\$@ CONFIG_HEADERS= \$(SHELL) ./config.status\n"; } else { -print "Makefile: \$(srcdir)/Makefile.in \$(top_builddir)/config.status\n" ; +print "Makefile: \@MAINTAINER_MODE_TRUE\@ \$(srcdir)/Makefile.in \$(top_builddir)/config.status\n" ; print " cd \$(top_builddir) \\\n" ; print " && CONFIG_FILES=" ; print "\$(subdir)/" if ( "$subdir" ); diff --git a/tools/update/ampolish b/tools/update/ampolish index c105f9e7b5..1fb5c3341f 100755 --- a/tools/update/ampolish +++ b/tools/update/ampolish @@ -48,6 +48,10 @@ my $rtems_cfg = find_file(".","configure.in"); # find relative up-path from configure.in to VERSION my $rtems_top = find_file("$rtems_cfg","VERSION"); +if ( "$rtems_top" eq "." ) +{ $rtems_top = "" ; } +else { $rtems_top .= "/" ; } + my $nl_seen = 0 ; while( <> ) @@ -56,30 +60,33 @@ while( <> ) print "$_" ; } -print "\nAUTOMAKE_OPTIONS = foreign\n"; +print "\nAUTOMAKE_OPTIONS = foreign 1.4\n"; if ( "$rtems_cfg" eq "." ) { - print "ACLOCAL = \@ACLOCAL\@ -I \$(RTEMS_TOPdir)/aclocal\n" + print "ACLOCAL_AMFLAGS = -I \$(RTEMS_TOPdir)/aclocal\n" } while( <> ) { - if ( /^[ ]*$/o ) + if ( /^[\s\t]*$/o ) { $nl_seen = $nl_seen+1; } - if ( /^[ ]*AUTOMAKE_OPTIONS.*$/o ) + if ( /^[\s\t]*AUTOMAKE_OPTIONS.*$/o ) + { # remove the line + } + elsif ( /^[\s\t]*ACLOCAL[\s\t]*=[\s\t]*\@ACLOCAL\@.*$/o ) { # remove the line } - elsif ( /^[ ]*ACLOCAL[ ]*=[ ]*\@ACLOCAL\@.*$/o ) + elsif ( /^[\s\t]*ACLOCAL_AMFLAGS[\s\t]*=[\s\t]*.*$/o ) { # remove the line } - elsif ( /^[ ]*include[ ]*\$\(top_srcdir\)[\.\/]*automake\/(.*)\.am$/o ) + elsif ( /^[\s\t]*include[\s\t]*\$\(top_srcdir\)[\.\/]*automake\/(.*)\.am$/o ) { # remove the line } - elsif ( /^[ ]*SUBDIRS.*$/o ) + elsif ( /^[\s\t]*SUBDIRS.*$/o ) { $subdirs_seen = "yes" ; print "$_" ; @@ -98,8 +105,8 @@ while( <> ) if ( "$subdirs_seen" ) { - print "include \$(top_srcdir)/${rtems_top}/automake/subdirs.am\n" ; + print "include \$(top_srcdir)/${rtems_top}automake/subdirs.am\n" ; } -print "include \$(top_srcdir)/${rtems_top}/automake/local.am\n" ; +print "include \$(top_srcdir)/${rtems_top}automake/local.am\n" ; ;1 diff --git a/tools/update/configure b/tools/update/configure index a90a59a561..b2cb7845f5 100644 --- a/tools/update/configure +++ b/tools/update/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 @@ -554,12 +557,8 @@ fi RTEMS_TOPdir="../.."; -PROJECT_ROOT=`pwd`/$RTEMS_TOPdir; -test "$TARGET_SUBDIR" = "." || PROJECT_ROOT="$PROJECT_ROOT/.." - - echo $ac_n "checking for RTEMS Version""... $ac_c" 1>&6 -echo "configure:563: checking for RTEMS Version" >&5 +echo "configure:562: 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'` @@ -571,9 +570,6 @@ if test -z "$RTEMS_VERSION"; then fi echo "$ac_t""$RTEMS_VERSION" 1>&6 -RTEMS_ROOT='$(top_srcdir)'/$RTEMS_TOPdir; - - # Make sure we can run config.sub. @@ -582,7 +578,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:586: checking host system type" >&5 +echo "configure:582: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -615,7 +611,7 @@ echo "$ac_t""$host" 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:619: checking for a BSD compatible install" >&5 +echo "configure:615: 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 @@ -668,7 +664,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:672: checking whether build environment is sane" >&5 +echo "configure:668: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -725,7 +721,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:729: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:725: 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 @@ -764,7 +760,7 @@ fi missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:768: checking for working aclocal" >&5 +echo "configure:764: 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. @@ -777,7 +773,7 @@ else fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:781: checking for working autoconf" >&5 +echo "configure:777: 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. @@ -790,7 +786,7 @@ else fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:794: checking for working automake" >&5 +echo "configure:790: 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. @@ -803,7 +799,7 @@ else fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:807: checking for working autoheader" >&5 +echo "configure:803: 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. @@ -816,7 +812,7 @@ else fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:820: checking for working makeinfo" >&5 +echo "configure:816: 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. @@ -829,6 +825,29 @@ else fi +echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6 +echo "configure:830: 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 @@ -836,7 +855,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:840: checking for $ac_word" >&5 +echo "configure:859: 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 @@ -881,7 +900,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:885: checking for $ac_word" >&5 +echo "configure:904: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -931,8 +950,27 @@ else 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)' @@ -945,6 +983,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 # This file is a shell script that caches the results of configure @@ -1092,8 +1135,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 @@ -1110,14 +1151,23 @@ 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%@PERL@%$PERL%g s%@PERL_TRUE@%$PERL_TRUE%g s%@PERL_FALSE@%$PERL_FALSE%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/update/configure.in b/tools/update/configure.in index b270d7fef2..23a86f8b7e 100644 --- a/tools/update/configure.in +++ b/tools/update/configure.in @@ -10,6 +10,7 @@ RTEMS_TOP(../..) AC_CANONICAL_HOST AM_INIT_AUTOMAKE(rtems-update-tools,$RTEMS_VERSION,no) +AM_MAINTAINER_MODE RTEMS_PATH_KSH RTEMS_PATH_PERL diff --git a/tools/update/rtems-polish.sh b/tools/update/rtems-polish.sh index 7a693928d9..46c63b5aab 100755 --- a/tools/update/rtems-polish.sh +++ b/tools/update/rtems-polish.sh @@ -12,7 +12,7 @@ progname=`basename $0` -perltools=c/update-tools +perltools=tools/update ac_do="" am_do="" ci_do="" |