From: Tom Tromey Date: Sat, 16 Mar 1996 15:57:59 +0000 (+0000) Subject: Added test for empty var bug X-Git-Tag: Release-0-32~29 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=4151d23c9721f5576d7b30c01b3b4487b93947bc;p=automake.git Added test for empty var bug --- diff --git a/ChangeLog b/ChangeLog index c1133628..ada0acdd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,19 +8,16 @@ Thu Mar 14 09:28:21 1996 Tom Tromey * Makefile.am (cvs-diff): New target. + Fix for bug when install var substitutes empty. Test empty.test. * header.am (install-@DIR@HEADERS): Allow empty list of headers. (uninstall-@DIR@HEADERS): Ditto. - * scripts.am (install-@DIR@SCRIPTS): Allow empty list of scripts. (uninstall-@DIR@SCRIPTS): Ditto. - * libraries.am (install-@DIR@LIBRARIES): Allow empty list of libraries. (uninstall-@DIR@LIBRARIES): Ditto. - * data.am (install-@DIR@DATA): Allow empty list of data. (uninstall-@DIR@DATA): Ditto. - * programs.am (install-@DIR@PROGRAMS): Added missing semicolon. From François Pinard. (install-@DIR@PROGRAMS): Fixed bug when list of programs empty. diff --git a/TODO b/TODO index 0d1075b7..9a37e9ec 100644 --- a/TODO +++ b/TODO @@ -1,8 +1,5 @@ Priorities for release: * For 0.32: remove last mention of DIST_OTHER, DIST_SUBDIRS -* "libexec_PROGRAMS =" yields invalid syntax for install - -> write test!!! -* Make a patch in cvs-dist. Use bc Other priorities: diff --git a/tests/ChangeLog b/tests/ChangeLog index 1d1b0edc..be5cae08 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Sat Mar 16 08:37:36 1996 Tom Tromey + + * empty.test: New file. + Fri Mar 15 17:55:13 1996 Tom Tromey * installsh.test: New file. diff --git a/tests/Makefile.am b/tests/Makefile.am index 4a4be778..238c4ec3 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -5,7 +5,7 @@ AUTOMAKE_OPTIONS = gnits TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \ -canon.test installsh.test +canon.test installsh.test empty.test ## Maybe automake should distribute TESTS? You tell me. EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 4783e38b..8c843790 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 0.31 from Makefile.am +# Makefile.in generated automatically by automake 0.32 from Makefile.am # Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -43,7 +43,7 @@ AUTOMAKE_OPTIONS = gnits TESTS = mdate.test vtexi.test acoutput.test instexec.test checkall.test \ acoutnoq.test acouttbs.test libobj.test proginst.test acoutqnl.test \ confincl.test spelling.test prefix.test badprog.test depend.test exdir.test \ -canon.test installsh.test +canon.test installsh.test empty.test EXTRA_DIST = defs $(TESTS) DIST_COMMON = ChangeLog Makefile.am Makefile.in diff --git a/tests/empty.test b/tests/empty.test new file mode 100755 index 00000000..e6cbea41 --- /dev/null +++ b/tests/empty.test @@ -0,0 +1,29 @@ +#! /bin/sh + +# Test for bug where if the list of installables is empty, invalid sh +# code is generated. + +. $srcdir/defs || exit 1 + +cat > Makefile.am << 'END' +data_DATA = +END + +$AUTOMAKE || exit 1 + +# Create configure so Makefile doesn't look out-of-date. +echo frob > configure +echo frob > config.status + +# Need a mkinstalldirs we can actually execute. make on my Linux box +# won't execute this file if is empty, or has just a colon in it (but +# it will run from the shell). +cat > mkinstalldirs << 'END' +#!/bin/sh +END +chmod +x mkinstalldirs + +# Substitute variables we need. +sed -e 's/@top_srcdir@/./g' -e 's/@datadir@/./g' < Makefile.in > Makefile + +make install