From b53d6803de7294d88d36758808d6f9d2138aba0d Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 6 Feb 1996 01:06:03 +0000 Subject: [PATCH] Bug fixes --- ChangeLog | 15 ++++++++++++++- Makefile.am | 4 ++-- Makefile.in | 4 ++-- TODO | 2 +- automake.in | 42 ++++++++++++++++++++++++------------------ lib/am/Makefile.am | 4 ++-- lib/am/texinfos.am | 7 +++---- texinfos.am | 7 +++---- 8 files changed, 51 insertions(+), 34 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa001489..1db3fca1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,9 +1,22 @@ +Mon Feb 5 14:58:58 1996 Tom Tromey + + * Makefile.am (maintainer-check): Expect only one ${...}. + * texinfos.am (install-info): Remove unneeded ${...}. From Jim + Meyering. + + * automake.in (handle_configure): Only define CONFIG_HEADER if + $config_name. + ($seen_gettext): New variable. + (handle_subdirs): Do all gettext-related checking here. + (scan_configure): Just set $seen_gettext. + (handle_man_pages): Properly quote $(MANS). + Wed Jan 31 09:51:30 1996 Tom Tromey (tromey@gerbil.cygnus.com) * depend.am: Don't use srcdir anywhere. * automake.in (handle_libraries): Don't make .deps relative to srcdir. - (handle_options): Reocgnize no-dependencies. + (handle_options): Recognize no-dependencies. * depend.am (MKDEP): From Jim Meyering: Do nothing if srcdir is ".". Properly quote regexp. diff --git a/Makefile.am b/Makefile.am index 87256c75..77088aa0 100644 --- a/Makefile.am +++ b/Makefile.am @@ -32,7 +32,7 @@ ETAGS_ARGS = automake.in --lang=none \ # Some simple checks: # * syntax check with perl4 and perl5. # * make sure the scripts don't use 'true' -# * expect exactly two instance of '${...}' +# * expect no instances of '${...}' # These are only really guaranteed to work on my machine. maintainer-check: automake @PERL@ -c -w automake @@ -40,7 +40,7 @@ maintainer-check: automake echo "can't use 'true' in GNU Makefile" 1>&2; \ exit 1; \ else :; fi - @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 2; then \ + @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 0; then \ echo "found too many uses of '\$${'" 1>&2; \ exit 1; \ fi diff --git a/Makefile.in b/Makefile.in index af582b6a..f3ed8f6e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -306,7 +306,7 @@ maintainer-clean-generic clean mostlyclean distclean maintainer-clean # Some simple checks: # * syntax check with perl4 and perl5. # * make sure the scripts don't use 'true' -# * expect exactly two instance of '${...}' +# * expect no instances of '${...}' # These are only really guaranteed to work on my machine. maintainer-check: automake @PERL@ -c -w automake @@ -314,7 +314,7 @@ maintainer-check: automake echo "can't use 'true' in GNU Makefile" 1>&2; \ exit 1; \ else :; fi - @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 2; then \ + @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 0; then \ echo "found too many uses of '\$${'" 1>&2; \ exit 1; \ fi diff --git a/TODO b/TODO index c846e743..d506d283 100644 --- a/TODO +++ b/TODO @@ -54,7 +54,7 @@ Change glob pattern to look for to '*/Makefile*.am', so that gettext's po directory can use a Makefile.in.am (and generate Makefile.in.in) Should 'distclean' remove $(SCRIPTS)? -Should 'maintainer-clean' do "rm -rf .deps"? +'maintainer-clean' should "rm -rf .deps". Ditto distclean Should look for clean-local targets in Makefile.am. If 'foo' is in SCRIPTS, and 'foo.in' exists, generate code to rebuild diff --git a/automake.in b/automake.in index 097f53bd..2fcc78cc 100755 --- a/automake.in +++ b/automake.in @@ -94,6 +94,9 @@ $top_builddir = ''; # Whether AC_PROG_MAKE_SET has been seen in configure.in. $seen_make_set = 0; +# Whether ud_GNU_GETTEXT has been seen in configure.in. +$seen_gettext = 0; + &initialize_global_constants; @@ -728,7 +731,7 @@ sub handle_man_pages $output_vars .= "MANS = " . $contents{'man_MANS'} . "\n"; # Generate list of install dirs. - $output_rules .= "install-man: $(MANS)\n"; + $output_rules .= "install-man: \$(MANS)\n"; foreach (keys %sections) { push (@installdirs, '$(mandir)/man' . $_); @@ -1005,6 +1008,23 @@ sub handle_dependencies # Handle subdirectories. sub handle_subdirs { + if (! defined $contents{'SUBDIRS'}) + { + &am_conf_error + ("ud_GNU_GETTEXT in configure.in but SUBDIRS not defined") + if $seen_gettext && $relative_dir eq '.'; + return; + } + + &am_conf_error + ("ud_GNU_GETTEXT in configure.in but \`po' not in SUBDIRS") + if $contents{'SUBDIRS'} !~ /\bpo\b/; + &am_conf_error + ("ud_GNU_GETTEXT in configure.in but \`intl' not in SUBDIRS") + if $contents{'SUBDIRS'} !~ /\bintl\b/; + + &require_file ($NORMAL, 'ABOUT-NLS'); + return if ! defined $contents{'SUBDIRS'}; $output_rules .= &file_contents ('subdirs'); @@ -1103,7 +1123,8 @@ sub handle_configure # Generate CONFIG_HEADER define, and define interally. $output_vars .= "CONFIG_HEADER = ${top_builddir}/${config_name}\n" if $config_name; - $contents{'CONFIG_HEADER'} = "${top_builddir}/${config_name}"; + $contents{'CONFIG_HEADER'} = "${top_builddir}/${config_name}" + if $config_name; } # Handle C headers. @@ -1452,22 +1473,7 @@ sub scan_configure # Check for NLS support. if (/ud_GNU_GETTEXT/) { - if (! defined $contents{'SUBDIRS'}) - { - &am_conf_error - ("ud_GNU_GETTEXT in configure.in but SUBDIRS not defined"); - } - else - { - &am_conf_error - ("ud_GNU_GETTEXT in configure.in but \`po' not in SUBDIRS") - if $contents{'SUBDIRS'} !~ /\bpo\b/; - &am_conf_error - ("ud_GNU_GETTEXT in configure.in but \`intl' not in SUBDIRS") - if $contents{'SUBDIRS'} !~ /\bintl\b/; - } - - &require_file ($NORMAL, 'ABOUT-NLS'); + $seen_gettext = 1; } # Handle configuration headers. diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index 87256c75..77088aa0 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -32,7 +32,7 @@ ETAGS_ARGS = automake.in --lang=none \ # Some simple checks: # * syntax check with perl4 and perl5. # * make sure the scripts don't use 'true' -# * expect exactly two instance of '${...}' +# * expect no instances of '${...}' # These are only really guaranteed to work on my machine. maintainer-check: automake @PERL@ -c -w automake @@ -40,7 +40,7 @@ maintainer-check: automake echo "can't use 'true' in GNU Makefile" 1>&2; \ exit 1; \ else :; fi - @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 2; then \ + @if test `fgrep '$${' $(srcdir)/[a-z]*.am | wc -l` -ne 0; then \ echo "found too many uses of '\$${'" 1>&2; \ exit 1; \ fi diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index d67aef7b..cafd9dfb 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -27,10 +27,9 @@ install-info: $(INFO_DEPS) $(top_srcdir)/mkinstalldirs $(infodir) for file in $(INFO_DEPS); do \ -## This ${...} is in the shell, not in make. We use these strange -## circumlocutions because we want the "ifile" to be relative, for the -## install. - for ifile in `cd $(srcdir) && echo $${file}*`; do \ +## We use these strange circumlocutions because we want the "ifile" to +## be relative, for the install. + for ifile in `cd $(srcdir) && echo $$file*`; do \ $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \ done; \ ## We need the 'else' because in some broken versions of sh 'if' will diff --git a/texinfos.am b/texinfos.am index d67aef7b..cafd9dfb 100644 --- a/texinfos.am +++ b/texinfos.am @@ -27,10 +27,9 @@ install-info: $(INFO_DEPS) $(top_srcdir)/mkinstalldirs $(infodir) for file in $(INFO_DEPS); do \ -## This ${...} is in the shell, not in make. We use these strange -## circumlocutions because we want the "ifile" to be relative, for the -## install. - for ifile in `cd $(srcdir) && echo $${file}*`; do \ +## We use these strange circumlocutions because we want the "ifile" to +## be relative, for the install. + for ifile in `cd $(srcdir) && echo $$file*`; do \ $(INSTALL_DATA) $(srcdir)/$$ifile $(infodir)/$$ifile; \ done; \ ## We need the 'else' because in some broken versions of sh 'if' will -- 2.43.5