From 8f8f32359518878e4c7236ea862726d3cbd0f972 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 19 Feb 1996 17:42:26 +0000 Subject: [PATCH] Bug fixes --- ChangeLog | 10 ++++++++++ Makefile.am | 10 +++++++++- Makefile.in | 29 +++++++++++++++++++---------- automake.in | 7 +++++++ lib/am/Makefile.am | 10 +++++++++- tests/ChangeLog | 4 ++++ tests/Makefile.am | 2 +- tests/Makefile.in | 2 +- tests/proginst.test | 12 ++++++++++++ 9 files changed, 72 insertions(+), 14 deletions(-) create mode 100755 tests/proginst.test diff --git a/ChangeLog b/ChangeLog index 8773f3c0..2b2b6f30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +Mon Feb 19 09:53:09 1996 Tom Tromey + + * automake.in (handle_scripts): Ensure $scripts_installed set to + boolean value. Test proginst.test. + + * Makefile.am (installcheck-local): New target. + + * automake.in (require_file): No error if missing file is + installed. + Sun Feb 18 17:10:00 1996 Tom Tromey * automake.in (handle_scripts): SCRIPTS no longer automatically diff --git a/Makefile.am b/Makefile.am index df98f015..cbb99f99 100644 --- a/Makefile.am +++ b/Makefile.am @@ -34,12 +34,20 @@ DIST_SUBDIRS = samples/cpio/*Makefile.am ETAGS_ARGS = automake.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi +# Check to make sure some installed files are executable. +installcheck-local: + test -x $(pkgdatadir)/config.guess + test -x $(pkgdatadir)/config.sub + test -x $(pkgdatadir)/install-sh + test -x $(pkgdatadir)/mdate-sh + test -x $(pkgdatadir)/mkinstalldirs + # Some simple checks: # * syntax check with perl4 and perl5. # * make sure the scripts don't use 'true' # * expect no instances of '${...}' # These are only really guaranteed to work on my machine. -maintainer-check: automake +maintainer-check: automake check @PERL@ -c -w automake @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \ echo "can't use 'true' in GNU Makefile" 1>&2; \ diff --git a/Makefile.in b/Makefile.in index 1f4a5b2d..e08313c0 100644 --- a/Makefile.in +++ b/Makefile.in @@ -58,9 +58,9 @@ remake-subd.am remake.am scripts.am subdirs.am tags.am tags-subd.am \ tags-clean.am \ texi-version.am texinfos-vars.am texinfos.am \ libraries-clean.am programs-clean.am data-clean.am \ -COPYING INSTALL install-sh mdate-sh mkinstalldirs texinfo.tex +COPYING INSTALL texinfo.tex -pkgdata_SCRIPTS = config.guess config.sub +pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh mkinstalldirs CLEANFILES = automake @@ -289,7 +289,7 @@ dvi: $(DVIS) dvi-recursive check: check-recursive -installcheck: installcheck-recursive +installcheck: installcheck-recursive installcheck-local all-am: $(INFO_DEPS) $(SCRIPTS) $(DATA) Makefile @@ -363,19 +363,28 @@ maintainer-clean: maintainer-clean-am maintainer-clean-recursive check-recursive installcheck-recursive info-recursive dvi-recursive \ mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags mostlyclean-tags distclean-tags \ - clean-tags maintainer-clean-tags dist info dvi check installcheck \ - all-am install-exec-am install-data-am uninstall-am install-exec \ - install-data install uninstall all installdirs mostlyclean-generic \ - distclean-generic clean-generic maintainer-clean-generic clean \ - mostlyclean distclean maintainer-clean - + clean-tags maintainer-clean-tags dist info dvi check \ + installcheck-local installcheck all-am install-exec-am \ + install-data-am uninstall-am install-exec install-data install \ + uninstall all installdirs mostlyclean-generic distclean-generic \ + clean-generic maintainer-clean-generic clean mostlyclean distclean \ + maintainer-clean + + +# Check to make sure some installed files are executable. +installcheck-local: + test -x $(pkgdatadir)/config.guess + test -x $(pkgdatadir)/config.sub + test -x $(pkgdatadir)/install-sh + test -x $(pkgdatadir)/mdate-sh + test -x $(pkgdatadir)/mkinstalldirs # Some simple checks: # * syntax check with perl4 and perl5. # * make sure the scripts don't use 'true' # * expect no instances of '${...}' # These are only really guaranteed to work on my machine. -maintainer-check: automake +maintainer-check: automake check @PERL@ -c -w automake @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \ echo "can't use 'true' in GNU Makefile" 1>&2; \ diff --git a/automake.in b/automake.in index 9b027ea1..a8cd9fb7 100755 --- a/automake.in +++ b/automake.in @@ -643,6 +643,9 @@ sub handle_scripts $scripts_installed = &am_install_var ('scripts', 'SCRIPTS', 'bin', 'sbin', 'libexec', 'pkgdata', 'noinst'); + + # We really only want a boolean value. + $scripts_installed = 1 if $scripts_installed; } # Search a file for a "version.texi" Texinfo include. Return the name @@ -2387,8 +2390,12 @@ sub require_file { system ('cp', $am_dir . '/' . $file, $fullfile); } + + # FIXME this is a hack. Should have am_warn. + local ($save) = $exit_status; &am_error ("required file \"$fullfile\" not found; installing"); + $exit_status = $save; } else { diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am index df98f015..cbb99f99 100644 --- a/lib/am/Makefile.am +++ b/lib/am/Makefile.am @@ -34,12 +34,20 @@ DIST_SUBDIRS = samples/cpio/*Makefile.am ETAGS_ARGS = automake.in --lang=none \ --regex='/^@node[ \t]+\([^,]+\)/\1/' automake.texi +# Check to make sure some installed files are executable. +installcheck-local: + test -x $(pkgdatadir)/config.guess + test -x $(pkgdatadir)/config.sub + test -x $(pkgdatadir)/install-sh + test -x $(pkgdatadir)/mdate-sh + test -x $(pkgdatadir)/mkinstalldirs + # Some simple checks: # * syntax check with perl4 and perl5. # * make sure the scripts don't use 'true' # * expect no instances of '${...}' # These are only really guaranteed to work on my machine. -maintainer-check: automake +maintainer-check: automake check @PERL@ -c -w automake @if grep '^[^#].*true' $(srcdir)/[a-z]*.am; then \ echo "can't use 'true' in GNU Makefile" 1>&2; \ diff --git a/tests/ChangeLog b/tests/ChangeLog index 1b75194d..16890866 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Mon Feb 19 10:22:22 1996 Tom Tromey + + * proginst.test: New file. + Tue Feb 13 11:54:39 1996 Tom Tromey * libobj.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 099a5e36..8e164837 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = gnits ## FIXME Ulrich has suggested implementing this in Automake. ## Perhaps he is right. TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ -acoutnoq.test acouttbs.test libobj.test +acoutnoq.test acouttbs.test libobj.test proginst.test DIST_OTHER = $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index cb15800e..ba9a8699 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -41,7 +41,7 @@ transform = @program_transform_name@ AUTOMAKE_OPTIONS = gnits TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ -acoutnoq.test acouttbs.test libobj.test +acoutnoq.test acouttbs.test libobj.test proginst.test DIST_OTHER = $(TESTS) DIST_COMMON = ChangeLog Makefile.am Makefile.in diff --git a/tests/proginst.test b/tests/proginst.test new file mode 100755 index 00000000..7b148105 --- /dev/null +++ b/tests/proginst.test @@ -0,0 +1,12 @@ +#! /bin/sh + +# Test for bug where when multiple scripts are installed, +# the check for fp_PROG_INSTALL fails. + +. $srcdir/defs + +cat > Makefile.am << 'END' +bin_SCRIPTS = zardoz qbert brownie +END + +$AUTOMAKE -- 2.43.5