From 9b8baa128b4e7d0696f9ad995927cf2e5162649f Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Tue, 23 Mar 1999 18:02:17 +0000 Subject: Automake II patch from Ralf Corsepius . Email description follows: Description: * automake for *all* tool subdirectories (Makefile.am, configure.in etc.) * autogen now also considers CONFIG_HEADER (generates stamp-h.ins and config.h.ins) * c/src/tests/tools/generic/difftest and c/src/tests/tools/generic/sorttimes generated by configure scripts * c/update-tools/ampolish, beautifier for Makefile.ams, similar to acpolish * rtems-polish.sh added to c/update-tools/ + ampolish support * New subdirectory ./automake, contains automake -Makefile fragments to support RTEMS make "debug, debug_install, profile, profile_install" for native Makefile.ams (== ignore these make targets). * aclocal/rtems-top.m4's RTEMS_TOP now reads the automake makefile variable VERSION from RTEMS ./VERSION file. * ./configure.in uses the macros from aclocal + support for the tools' configure scripts Remarks: * To run rtems-polish.sh, "cd ; ./c/update-tools/rtems-polish.sh" * AFAIS, now all native subdirectories are converted to automake (Please drop me a note, if I forgot something). * Unless you notice something fatal, IMO the time has come for a public try (== snapshot). I do not intend to send more automake related patches within, say 2 weeks, to give these patches time to settle and to give me some time to think on how to continue. * The patch assumes installation to the new main installation directory [$(prefix)]. --- c/build-tools/Makefile.in | 123 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 110 insertions(+), 13 deletions(-) (limited to 'c/build-tools/Makefile.in') diff --git a/c/build-tools/Makefile.in b/c/build-tools/Makefile.in index 4cc7d1fd87..d8325d1fee 100644 --- a/c/build-tools/Makefile.in +++ b/c/build-tools/Makefile.in @@ -15,6 +15,25 @@ # +# $Id$ + +# Borrowed from automake-1.4, adapted to support RTEMS's +# "make debug", "make debug_install", "make profile", "make profile_install" + +# NOTE: This is a temporary work-around to keep +# "make debug" and "make debug_install" working. +# Once automake is fully integrated these make targets +# and this file will probably be removed + + +# $Id$ + +# NOTE: This is a temporary work-around to keep +# "make debug" and "make debug_install" working. +# Once automake is fully integrated these make targets +# and this file will probably be removed + + SHELL = @SHELL@ srcdir = @srcdir@ @@ -67,7 +86,6 @@ KSH = @KSH@ MAKEINFO = @MAKEINFO@ PACKAGE = @PACKAGE@ PROJECT_ROOT = @PROJECT_ROOT@ -RTEMS_ROOT = @RTEMS_ROOT@ RTEMS_TOPdir = @RTEMS_TOPdir@ VERSION = @VERSION@ @@ -79,7 +97,8 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/../../mkinstalldirs CONFIG_HEADER = ./src/config.h CONFIG_CLEAN_FILES = -DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in +DIST_COMMON = Makefile.am Makefile.in aclocal.m4 configure configure.in \ +src/config.h.in src/stamp-h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) @@ -88,7 +107,7 @@ TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: -$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +$(srcdir)/Makefile.in: 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 $(BUILT_SOURCES) @@ -103,6 +122,34 @@ config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) +src/config.h: src/stamp-h + @if test ! -f $@; then \ + rm -f src/stamp-h; \ + $(MAKE) src/stamp-h; \ + else :; fi +src/stamp-h: $(srcdir)/src/config.h.in $(top_builddir)/config.status + cd $(top_builddir) \ + && CONFIG_FILES= CONFIG_HEADERS=src/config.h \ + $(SHELL) ./config.status + @echo timestamp > src/stamp-h 2> /dev/null +$(srcdir)/src/config.h.in: $(srcdir)/src/stamp-h.in + @if test ! -f $@; then \ + rm -f $(srcdir)/src/stamp-h.in; \ + $(MAKE) $(srcdir)/src/stamp-h.in; \ + else :; fi +$(srcdir)/src/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) + cd $(top_srcdir) && $(AUTOHEADER) + @echo timestamp > $(srcdir)/src/stamp-h.in 2> /dev/null + +mostlyclean-hdr: + +clean-hdr: + +distclean-hdr: + -rm -f src/config.h + +maintainer-clean-hdr: + # 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, @@ -291,32 +338,32 @@ distclean-generic: -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: -mostlyclean-am: mostlyclean-tags mostlyclean-generic +mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive -clean-am: clean-tags clean-generic mostlyclean-am +clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive -distclean-am: distclean-tags distclean-generic clean-am +distclean-am: distclean-hdr distclean-tags distclean-generic clean-am distclean: distclean-recursive -rm -f config.status -maintainer-clean-am: maintainer-clean-tags maintainer-clean-generic \ - distclean-am +maintainer-clean-am: maintainer-clean-hdr 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 \ +.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ +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 \ @@ -326,6 +373,56 @@ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean +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 + +debug_install: debug_install-recursive + +profile: profile-recursive + +profile_install: profile_install-recursive + +.PHONY: \ +debug debug-recursive debug_install \ +profile profile-recursive profile_install + +debug-am: + +debug: debug-am + +debug_install-am: + +debug_install: debug_install-am + +profile-am: + +profile: profile-am + +profile_install-am: + +profile_install: profile_install-am + +.PHONY: debug debug_install profile profile_install + # 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: -- cgit v1.2.3