]> sourceware.org Git - automake.git/commitdiff
avoid Debian install-info
authorTom Tromey <tromey@redhat.com>
Sun, 4 May 1997 21:50:04 +0000 (21:50 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 4 May 1997 21:50:04 +0000 (21:50 +0000)
handle sources in other directories

ChangeLog
TODO
automake.in
depend2.am
lib/am/depend2.am
lib/am/texinfos.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/xsource.test [new file with mode: 0755]
texinfos.am

index 920baceb383d3b8d57a6269e06a7e934e7ad1c17..e692d82f3725138da37b12b76cb2712db0e6362a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+Sun May  4 15:21:22 1997  Tom Tromey  <tromey@cygnus.com>
+
+       * 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  <tromey@cygnus.com>
+
+       * depend2.am (.deps/%.P): Don't put $(srcdir)/ into dependency.
+
 Wed Apr 30 19:15:47 1997  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (handle_dist_worker): Change how top_distdir is
diff --git a/TODO b/TODO
index 5da27ca58a95c36a008b967a2968f44b1b97d059..7065445dc2dbff56fb03344c9f402ba96a6f8a0d 100644 (file)
--- 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
 
index a02d4a4d7bdc69e84b20b0bbb79db0d83f1e3adb..fa6ee92e20a47b7a604e2a8fb5c17c95d07dc361 100755 (executable)
@@ -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/)
index 262784277e933ce6e5ab0b3661b96d5964020a03..2c399fb7d066697ca2ab5439c19006b0a30ed403 100644 (file)
@@ -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 $@:," > $@
index 262784277e933ce6e5ab0b3661b96d5964020a03..2c399fb7d066697ca2ab5439c19006b0a30ed403 100644 (file)
@@ -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 $@:," > $@
index 85e9d92cb25fadf08d57ff817872683a5a6c0953..8998cee09fec0cb5603d61711c0719ca3a17961d 100644 (file)
@@ -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 \
index 3fe8a2fe9adf9ad1a78840a33e1128dec5525db2..c9c4a4a0eaa8c2c5114df402447ccaf48ef78fad 100644 (file)
@@ -1,3 +1,7 @@
+Sun May  4 15:47:24 1997  Tom Tromey  <tromey@cygnus.com>
+
+       * xsource.test: New file.
+
 Tue Apr 29 19:08:47 1997  Tom Tromey  <tromey@cygnus.com>
 
        * cond.test, cond2.test: New files from Ian Taylor.
index ead2577f42a58262e8701b6068d919b06743c8a0..d2c6f080ee4e379e78d6a67c33a31ba75c0918a9 100644 (file)
@@ -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)
 
index 41104735f8c711bf7ce5a97de55fab8bdc744da1..1c2056000d9a0a9db454634e0008620623b159d7 100644 (file)
@@ -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 (executable)
index 0000000..62fadc4
--- /dev/null
@@ -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
index 85e9d92cb25fadf08d57ff817872683a5a6c0953..8998cee09fec0cb5603d61711c0719ca3a17961d 100644 (file)
@@ -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 \
This page took 0.058266 seconds and 5 git commands to generate.