From ebb0998c75213d2001a1c9f45adf952c5853678a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 9 Sep 1996 00:29:48 +0000 Subject: [PATCH] Bug fixes --- ChangeLog | 8 ++++++++ Makefile.in | 9 +++------ automake.in | 27 ++++++++++++++++++--------- 3 files changed, 29 insertions(+), 15 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a10b01f..0eed79a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ Sun Sep 8 09:00:37 1996 Tom Tromey + * automake.in (check_gnits_standards): Only check version number + syntax at top level. + ($package_version_line): New variable. + (scan_configure): Set it. + (check_gnits_standards): Use am_conf_line_error. + (scan_configure): Remove extraneous whitespace from version + number. + * m4/AM_PROG_CC_STDC.m4: Applied patch from Jim Meyering. * automake.in (scan_configure): Handle AM_WITH_REGEX. diff --git a/Makefile.in b/Makefile.in index 62a9a3c2..f8c25571 100644 --- a/Makefile.in +++ b/Makefile.in @@ -158,11 +158,8 @@ stamp-vti: automake.texi $(top_srcdir)/configure.in && $(SHELL) ./mdate-sh automake.texi`" > vti.tmp echo "@set EDITION $(VERSION)" >> vti.tmp echo "@set VERSION $(VERSION)" >> vti.tmp - if cmp -s vti.tmp $(srcdir)/version.texi; then \ - rm vti.tmp; \ - else \ - mv vti.tmp $(srcdir)/version.texi; \ - fi + cmp -s vti.tmp $(srcdir)/version.texi || cp vti.tmp $(srcdir)/version.texi + rm vti.tmp echo timestamp > $(srcdir)/stamp-vti mostlyclean-vti: @@ -281,9 +278,9 @@ mostlyclean-tags: clean-tags: distclean-tags: + rm -f TAGS ID maintainer-clean-tags: - rm -f TAGS ID distdir = $(PACKAGE)-$(VERSION) # This target untars the dist file and tries a VPATH configuration. Then diff --git a/automake.in b/automake.in index a594d7f5..35f361fa 100755 --- a/automake.in +++ b/automake.in @@ -182,6 +182,9 @@ $seen_version = 0; # Actual version we've seen. $package_version = ''; +# Line number where we saw version definition. +$package_version_line = 0; + # TRUE if we've seen AM_PATH_LISPDIR. $seen_lispdir = 0; @@ -2757,7 +2760,8 @@ sub scan_configure $seen_version = 1; $seen_arg_prog = 1; $seen_prog_install = 2; - $package_version = $1; + ($package_version = $1) =~ s/\s//; + $package_version_line = $.; } # Some things required by Automake. @@ -2775,6 +2779,7 @@ sub scan_configure { $seen_version = 1; $package_version = $1; + $package_version_line = $.; } elsif (/VERSION=/) { @@ -2853,15 +2858,19 @@ sub check_gnits_standards &am_error ("\`${relative_dir}/COPYING.LIB' disallowed by Gnits standards"); } - if ($package_version !~ /^$GNITS_VERSION_PATTERN$/) - { - &am_error ("version \`$package_version' doesn't follow Gnits standards"); - } - elsif (defined $1 && -f 'README-alpha' && $relative_dir eq '.') + if ($relative_dir eq '.') { - # This means we have an alpha release. See - # GNITS_VERSION_PATTERN for details. - &require_file ($GNITS, 'README-alpha'); + if ($package_version !~ /^$GNITS_VERSION_PATTERN$/) + { + &am_conf_line_error ($package_version_line, + "version \`$package_version' doesn't follow Gnits standards"); + } + elsif (defined $1 && -f 'README-alpha') + { + # This means we have an alpha release. See + # GNITS_VERSION_PATTERN for details. + &require_file ($GNITS, 'README-alpha'); + } } } -- 2.43.5