From: Tom Tromey Date: Sun, 4 May 1997 21:50:04 +0000 (+0000) Subject: avoid Debian install-info X-Git-Tag: Release-1-1p~10 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=b36615376aae163ace963e4cb811b3b4bc8667df;p=automake.git avoid Debian install-info handle sources in other directories --- diff --git a/ChangeLog b/ChangeLog index 920baceb..e692d82f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +Sun May 4 15:21:22 1997 Tom Tromey + + * texinfos.am (install-info): Avoid the Debian install-info. + (uninstall-info): Likewise. + + * automake.in (handle_single_transform_list): Strip any directory + name before processing name. + +Thu May 1 19:24:08 1997 Tom Tromey + + * depend2.am (.deps/%.P): Don't put $(srcdir)/ into dependency. + Wed Apr 30 19:15:47 1997 Tom Tromey * automake.in (handle_dist_worker): Change how top_distdir is diff --git a/TODO b/TODO index 5da27ca5..7065445d 100644 --- a/TODO +++ b/TODO @@ -10,6 +10,7 @@ * make sure `missing' defines are generated * if no AM_INIT_AUTOMAKE, then don't handle `missing' stuff. Yuck! +* missing should handle install -d and rmdir -p (for uninstall) * allow 'cygnus' in AUTOMAKE_OPTIONS diff --git a/automake.in b/automake.in index a02d4a4d..fa6ee92e 100755 --- a/automake.in +++ b/automake.in @@ -1102,6 +1102,9 @@ sub handle_single_transform_list $lex_sources{$_} = 1; } + # Strip any directory prefix. + $_ = &basename ($_); + # Transform source files into .o files. List of C++ # extensions comes from Emacs 19.34 etags. if (s/\.(c\+\+|cc|cpp|cxx|C)$/$nonansi_obj/) diff --git a/depend2.am b/depend2.am index 26278427..2c399fb7 100644 --- a/depend2.am +++ b/depend2.am @@ -15,8 +15,8 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -.deps/%.P: $(srcdir)/%@EXT@ +.deps/%.P: %@EXT@ @echo "Computing dependencies for $<..." - @o='o'; \ -ONLYC test -n "$o" && o='$$o'; \ + @o='o'; \ +ONLYC test -n "$o" && o='$$o'; \ $(@MKDEP@) $< | sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," > $@ diff --git a/lib/am/depend2.am b/lib/am/depend2.am index 26278427..2c399fb7 100644 --- a/lib/am/depend2.am +++ b/lib/am/depend2.am @@ -15,8 +15,8 @@ ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA ## 02111-1307, USA. -.deps/%.P: $(srcdir)/%@EXT@ +.deps/%.P: %@EXT@ @echo "Computing dependencies for $<..." - @o='o'; \ -ONLYC test -n "$o" && o='$$o'; \ + @o='o'; \ +ONLYC test -n "$o" && o='$$o'; \ $(@MKDEP@) $< | sed "s,^\(.*\)\.o:,\1.$$o \1.l$$o $@:," > $@ diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am index 85e9d92c..8998cee0 100644 --- a/lib/am/texinfos.am +++ b/lib/am/texinfos.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -113,8 +113,10 @@ NOTCYGNUS d=$(srcdir); \ done; \ done @$(POST_INSTALL) -## Only run this code if install-info actually exists. - @if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ +## Only run this code if install-info actually exists, and it is not +## the Debian install-info. FIXME: once Debian install-info goes +## away, we can remove this hack. + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ for file in $(INFO_DEPS); do \ ## Run `:' after install-info in case install-info fails. We really ## don't care about failures here, because they can be spurious. For @@ -130,7 +132,7 @@ uninstall-info: $(PRE_UNINSTALL) ## Run two loops here so that we can handle PRE_UNINSTALL and ## NORMAL_UNINSTALL correctly. - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ + @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 \ diff --git a/tests/ChangeLog b/tests/ChangeLog index 3fe8a2fe..c9c4a4a0 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,7 @@ +Sun May 4 15:47:24 1997 Tom Tromey + + * xsource.test: New file. + Tue Apr 29 19:08:47 1997 Tom Tromey * cond.test, cond2.test: New files from Ian Taylor. diff --git a/tests/Makefile.am b/tests/Makefile.am index ead2577f..d2c6f080 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -25,7 +25,7 @@ colon2.test colon3.test remake.test output.test output2.test \ remake2.test output3.test output4.test colneq2.test subst.test \ defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \ cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test \ -ldadd.test version2.test conf2.test cond.test cond2.test +ldadd.test version2.test conf2.test cond.test cond2.test xsource.test EXTRA_DIST = defs $(TESTS) diff --git a/tests/Makefile.in b/tests/Makefile.in index 41104735..1c205600 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -84,7 +84,7 @@ colon2.test colon3.test remake.test output.test output2.test \ remake2.test output3.test output4.test colneq2.test subst.test \ defun2.test yaccpp.test texinfo3.test texinfo4.test tagsub.test \ cxxlibobj.test seenc.test cygwin32.test lisp.test stamph.test \ -ldadd.test version2.test conf2.test cond.test cond2.test +ldadd.test version2.test conf2.test cond.test cond2.test xsource.test EXTRA_DIST = defs $(TESTS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs diff --git a/tests/xsource.test b/tests/xsource.test new file mode 100755 index 00000000..62fadc48 --- /dev/null +++ b/tests/xsource.test @@ -0,0 +1,23 @@ +#! /bin/sh + +# Test to make sure source in another directory works. + +. $srcdir/defs || exit 1 + +cat > Makefile.am << 'END' +bin_PROGRAMS = zardoz +zardoz_SOURCES = z.c x/y.c +END + +cat >> configure.in << 'END' +AC_PROG_CC +END + +mkdir x + +: > z.c +: > x/y.c + +$AUTOMAKE || exit 1 + +test `fgrep y.c Makefile.in | wc -l` -eq 1 diff --git a/texinfos.am b/texinfos.am index 85e9d92c..8998cee0 100644 --- a/texinfos.am +++ b/texinfos.am @@ -1,5 +1,5 @@ ## automake - create Makefile.in from Makefile.am -## Copyright (C) 1994, 1995, 1996 Free Software Foundation, Inc. +## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc. ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by @@ -113,8 +113,10 @@ NOTCYGNUS d=$(srcdir); \ done; \ done @$(POST_INSTALL) -## Only run this code if install-info actually exists. - @if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ +## Only run this code if install-info actually exists, and it is not +## the Debian install-info. FIXME: once Debian install-info goes +## away, we can remove this hack. + @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i debian' >/dev/null 2>&1; then \ for file in $(INFO_DEPS); do \ ## Run `:' after install-info in case install-info fails. We really ## don't care about failures here, because they can be spurious. For @@ -130,7 +132,7 @@ uninstall-info: $(PRE_UNINSTALL) ## Run two loops here so that we can handle PRE_UNINSTALL and ## NORMAL_UNINSTALL correctly. - if $(SHELL) -c 'install-info --version' >/dev/null 2>&1; then \ + @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 \