From ee08f1a3bce0cc5db2a893ea912b11fd6aa89de4 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sat, 3 Oct 1998 11:19:08 +0000 Subject: [PATCH] * automake.in (handle_configure): Handle case where there is no Makefile in the config header directory. Fixes test config.test. --- ChangeLog | 5 +++++ Makefile.am | 22 ++++++++++++++-------- Makefile.in | 35 ++++++++++++++++++++++------------- TODO | 2 +- automake.in | 38 +++++++++++++++++++++++++++++++++++--- lib/am/Makefile.am | 22 ++++++++++++++-------- 6 files changed, 91 insertions(+), 33 deletions(-) diff --git a/ChangeLog b/ChangeLog index 51c994e4..55593bcc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Sat Oct 3 12:07:21 1998 Tom Tromey + + * automake.in (handle_configure): Handle case where there is no + Makefile in the config header directory. Fixes test config.test. + Thu Oct 1 00:51:51 1998 Tom Tromey * depend2.am (%.o): Append sed results to .P file in this case diff --git a/Makefile.am b/Makefile.am index 300d61c6..b44d5e91 100644 --- a/Makefile.am +++ b/Makefile.am @@ -10,14 +10,15 @@ SUBDIRS = . m4 tests bin_SCRIPTS = automake aclocal info_TEXINFOS = automake.texi -pkgdata_DATA = clean-kr.am clean.am clean-hdr.am comp-vars.am \ -compile.am data.am dejagnu.am depend.am depend2.am dist-vars.am \ -footer.am header.am header-vars.am kr-extra.am libs.am library.am \ -libtool.am ltlib.am ltlibrary.am mans-vars.am program.am progs.am \ -remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \ -texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \ -data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \ -lisp.am lisp-clean.am mans.am java.am java-clean.am +amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \ +data-clean.am data.am dejagnu.am depend.am depend2.am dist-vars.am \ +footer.am header-vars.am header.am java-clean.am java.am kr-extra.am \ +library.am libs-clean.am libs.am libtool.am lisp-clean.am lisp.am \ +ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am program.am \ +progs-clean.am progs.am remake-hdr.am remake.am scripts.am subdirs.am \ +tags-clean.am tags.am texi-vers.am texinfos.am + +pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 $(amfiles) ## These must all be executable when installed. pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \ @@ -118,3 +119,8 @@ path-check: distdir status=$$?; \ rm -rf $(distdir); \ exit $$status + +## Just get the .am files into TAGS. We don't really care too much if +## any interesting tags show up. +ETAGS_ARGS = $(amfiles) +TAGS_DEPENDENCIES = $(ETAGS_ARGS) diff --git a/Makefile.in b/Makefile.in index dc00bac0..05031dec 100644 --- a/Makefile.in +++ b/Makefile.in @@ -71,14 +71,15 @@ SUBDIRS = . m4 tests bin_SCRIPTS = automake aclocal info_TEXINFOS = automake.texi -pkgdata_DATA = clean-kr.am clean.am clean-hdr.am comp-vars.am \ -compile.am data.am dejagnu.am depend.am depend2.am dist-vars.am \ -footer.am header.am header-vars.am kr-extra.am libs.am library.am \ -libtool.am ltlib.am ltlibrary.am mans-vars.am program.am progs.am \ -remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \ -texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \ -data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \ -lisp.am lisp-clean.am mans.am java.am java-clean.am +amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \ +data-clean.am data.am dejagnu.am depend.am depend2.am dist-vars.am \ +footer.am header-vars.am header.am java-clean.am java.am kr-extra.am \ +library.am libs-clean.am libs.am libtool.am lisp-clean.am lisp.am \ +ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am program.am \ +progs-clean.am progs.am remake-hdr.am remake.am scripts.am subdirs.am \ +tags-clean.am tags.am texi-vers.am texinfos.am + +pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 $(amfiles) pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \ mkinstalldirs elisp-comp ylwrap acinstall @@ -89,6 +90,9 @@ EXTRA_DIST = acinstall $(pkgdata_DATA) ETAGS_ARGS = automake.in aclocal.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi TAGS_DEPENDENCIES = automake.in aclocal.in automake.texi + +ETAGS_ARGS = $(amfiles) +TAGS_DEPENDENCIES = $(ETAGS_ARGS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_CLEAN_FILES = automake aclocal @@ -247,7 +251,8 @@ DVIPS = dvips install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(infodir) - @for file in $(INFO_DEPS); do \ + @list='$(INFO_DEPS)'; \ + for file in $$list; do \ d=$(srcdir); \ for ifile in `cd $$d && echo $$file $$file-[0-9] $$file-[0-9][0-9]`; do \ if test -f $$d/$$ifile; then \ @@ -258,7 +263,8 @@ install-info-am: $(INFO_DEPS) done @$(POST_INSTALL) @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ - for file in $(INFO_DEPS); do \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ echo " install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file";\ install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/$$file || :;\ done; \ @@ -269,17 +275,20 @@ uninstall-info: @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ ii=yes; \ else ii=; fi; \ - for file in $(INFO_DEPS); do \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ test -z "$ii" \ || install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \ done @$(NORMAL_UNINSTALL) - for file in $(INFO_DEPS); do \ + list='$(INFO_DEPS)'; \ + for file in $$list; do \ (cd $(DESTDIR)$(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \ done dist-info: $(INFO_DEPS) - for base in $(INFO_DEPS); do \ + list='$(INFO_DEPS)'; \ + for base in $$list; do \ d=$(srcdir); \ for file in `cd $$d && eval echo $$base*`; do \ test -f $(distdir)/$$file \ diff --git a/TODO b/TODO index 37e6fe57..3a7d4330 100644 --- a/TODO +++ b/TODO @@ -240,7 +240,7 @@ characters long. * Make sure that all the files in the distribution are world-readable. ** also, check --help output and --version output. Idea from François * standards no longer prohibit ANSI C. What does this imply - for the de-ansi-fication feature? + for the de-ansi-fication feature? [ must keep it -- some users rely on it ] should be able to determine what is built by looking at rules (and configure.in). Then built man pages (eg) could automatically be diff --git a/automake.in b/automake.in index e10e0d46..70b408f0 100755 --- a/automake.in +++ b/automake.in @@ -2920,6 +2920,22 @@ sub handle_configure $top_reldir = ''; } + # Make it easy to see if there is a Makefile.am in a given + # directory. + local (%make_dirs, $iter); + foreach $iter (@input_files) + { + $make_dirs{&dirname ($iter)} = 1; + } + # We also want to notice Makefile.in's. + foreach $iter (@other_input_files) + { + if ($iter =~ /Makefile\.in$/) + { + $make_dirs{&dirname ($iterm)} = 1; + } + } + # If we have a configure header, require it. local ($one_hdr); local (@local_fullnames) = @config_fullnames; @@ -2931,10 +2947,26 @@ sub handle_configure local ($one_fullname) = shift (@local_fullnames); local ($one_name) = shift (@local_names); $hdr_index += 1; - if ($relative_dir eq &dirname ($one_hdr)) + local ($header_dir) = &dirname ($one_hdr); + + # If the header is in the current directory we want to build + # the header here. Otherwise, if we're at the topmost + # directory and the header's directory doesn't have a + # Makefile, then we also want to build the header. + if ($relative_dir eq $header_dir + || ($relative_dir eq '.' && ! defined $make_dirs{$header_dir})) { - local ($ch_sans_dir) = &basename ($one_hdr); - local ($cn_sans_dir) = &basename ($one_name); + local ($ch_sans_dir, $cn_sans_dir); + if ($relative_dir eq $header_dir) + { + $ch_sans_dir = &basename ($one_hdr); + $cn_sans_dir = &basename ($one_name); + } + else + { + $ch_sans_dir = $one_hdr; + $cn_sans_dir = $one_name; + } &require_file_with_conf_line ($config_header_line, $FOREIGN, $ch_sans_dir); diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 300d61c6..b44d5e91 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -10,14 +10,15 @@ SUBDIRS = . m4 tests bin_SCRIPTS = automake aclocal info_TEXINFOS = automake.texi -pkgdata_DATA = clean-kr.am clean.am clean-hdr.am comp-vars.am \ -compile.am data.am dejagnu.am depend.am depend2.am dist-vars.am \ -footer.am header.am header-vars.am kr-extra.am libs.am library.am \ -libtool.am ltlib.am ltlibrary.am mans-vars.am program.am progs.am \ -remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \ -texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \ -data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 \ -lisp.am lisp-clean.am mans.am java.am java-clean.am +amfiles = clean-hdr.am clean-kr.am clean.am comp-vars.am compile.am \ +data-clean.am data.am dejagnu.am depend.am depend2.am dist-vars.am \ +footer.am header-vars.am header.am java-clean.am java.am kr-extra.am \ +library.am libs-clean.am libs.am libtool.am lisp-clean.am lisp.am \ +ltlib-clean.am ltlib.am ltlibrary.am mans-vars.am mans.am program.am \ +progs-clean.am progs.am remake-hdr.am remake.am scripts.am subdirs.am \ +tags-clean.am tags.am texi-vers.am texinfos.am + +pkgdata_DATA = COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1 $(amfiles) ## These must all be executable when installed. pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \ @@ -118,3 +119,8 @@ path-check: distdir status=$$?; \ rm -rf $(distdir); \ exit $$status + +## Just get the .am files into TAGS. We don't really care too much if +## any interesting tags show up. +ETAGS_ARGS = $(amfiles) +TAGS_DEPENDENCIES = $(ETAGS_ARGS) -- 2.43.5