]> sourceware.org Git - automake.git/commitdiff
reimplemented man pages
authorTom Tromey <tromey@redhat.com>
Tue, 24 Feb 1998 19:37:14 +0000 (19:37 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 24 Feb 1998 19:37:14 +0000 (19:37 +0000)
29 files changed:
ChangeLog
Makefile.am
Makefile.in
automake.in
data.am
header.am
lib/am/Makefile.am
lib/am/data.am
lib/am/header.am
lib/am/libs.am
lib/am/lisp.am
lib/am/ltlib.am
lib/am/mans.am [new file with mode: 0644]
lib/am/progs.am
lib/am/scripts.am
lib/am/texinfos.am
libs.am
lisp.am
ltlib.am
mans.am [new file with mode: 0644]
progs.am
scripts.am
tests/ChangeLog
tests/Makefile.am
tests/Makefile.in
tests/condman.test
tests/condman2.test [new file with mode: 0755]
tests/man.test [deleted file]
texinfos.am

index cb698488c4d142dbd387d43e6417780131a608f8..f0aef290611296dda567232e8ce269a30556335c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+Tue Feb 24 12:10:44 1998  Tom Tromey  <tromey@cygnus.com>
+
+       * Makefile.am (pkgdata_DATA): Added mans.am.
+       * automake.in (handle_man_pages): Rewrote for new man page
+       handling.
+       (initialize_global_constants): Removed install_man_format,
+       uninstall_man_format.
+       * mans.am: New file.
+
+       * data.am, header.am, libs.am, lisp.am, ltlib.am, progs.am,
+       scripts.am, texinfos.am: Put `@' before NORMAL_UNINSTALL
+       invocation.
+
 Mon Feb 23 13:38:56 1998  Tom Tromey  <tromey@cygnus.com>
 
        * automake.in (get_object_extension): Remove .c.lo rule from
index b0203864f09281864521673bca3b38bf9bd55ad6..b54f88f9c7d6fc7e9a9eabbfaebedd45c0321c1a 100644 (file)
@@ -15,7 +15,7 @@ libtool.am ltlib.am ltlibrary.am mans-vars.am program.am progs.am \
 remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \
 texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
 data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1        \
-lisp.am lisp-clean.am
+lisp.am lisp-clean.am mans.am
 
 ## These must all be executable when installed.
 pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \
index f3a76159a27008fbdaa50ad3a56f01435b635751..a206dd1ab7b14caaf13abd0317c2d7fc4ef0bbea 100644 (file)
@@ -76,7 +76,7 @@ libtool.am ltlib.am ltlibrary.am mans-vars.am program.am progs.am \
 remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \
 texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
 data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1        \
-lisp.am lisp-clean.am
+lisp.am lisp-clean.am mans.am
 
 pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \
 mkinstalldirs elisp-comp ylwrap acinstall
@@ -112,7 +112,7 @@ GZIP = --best
 default: all
 
 .SUFFIXES:
-.SUFFIXES: .dvi .info .ps .texi .texinfo
+.SUFFIXES: .dvi .info .ps .texi .texinfo .txi
 $(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
        cd $(top_srcdir) && $(AUTOMAKE) --gnits Makefile
 
@@ -226,6 +226,20 @@ DVIPS = dvips
 .texinfo.dvi:
        TEXINPUTS=$(srcdir):$$TEXINPUTS \
          MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi.info:
+       @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+       cd $(srcdir) \
+         && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
+
+.txi.dvi:
+       TEXINPUTS=$(srcdir):$$TEXINPUTS \
+         MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
+
+.txi:
+       @cd $(srcdir) && rm -f $@ $@-[0-9] $@-[0-9][0-9]
+       cd $(srcdir) \
+         && $(MAKEINFO) `echo $< | sed 's,.*/,,'`
 .dvi.ps:
        $(DVIPS) $< -o $@
 
@@ -362,7 +376,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
        done; \
        list='$(SOURCES) $(HEADERS)'; \
        unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
+         $(AWK) '    { files[$$0] = 1; } \
               END { for (i in files) print i; }'`; \
        test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
          || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
index 0a557d79a4ed65cf99ef8c21bee146d5a1b3bc6a..49ad8726b7adcb2033ede4d1330234038231b484 100755 (executable)
@@ -2195,64 +2195,62 @@ sub handle_man_pages
        if &variable_defined ('MANS');
     return if ! &variable_defined ('man_MANS');
 
-    # We generate the manpage install code by hand to avoid the use of
-    # basename in the generated Makefile.
-    local (@mans) = &variable_value_as_list ('man_MANS', 'all');
-    local (%sections, %inames, %mbases, %secmap, %fullsecmap);
-    local ($i) = 1;
-    foreach (@mans)
-    {
-       # FIXME: statement without effect:
-       /^(.*)\.([0-9])([a-z]*)$/;
-       $sections{$2} = 1;
-       $inames{$i} = $_;
-       $mbases{$i} = $1;
-       $secmap{$i} = $2;
-       $fullsecmap{$i} = $2 . $3;
-       $i++;
-    }
-
-    # We don't really need this, but we use it in case we ever want to
-    # support noinst_MANS.
-    &define_variable ("MANS", &variable_value ('man_MANS'));
-
-    # Generate list of install dirs.
-    $output_rules .= "install-man: \$(MANS)\n";
-    $output_rules .= "\t\$(NORMAL_INSTALL)\n";
-    # Sort keys so that output is deterministic.
-    foreach (sort keys %sections)
+    # Find all the sections in use.  We do this by first looking for
+    # "standard" sections, and then looking for any additional
+    # sections used in man_MANS.
+    local ($sect, %sections, %vlist);
+    # Add more sections as needed.
+    foreach $sect ('0'..'9', 'n', 'l')
     {
-       push (@installdirs, '$(mandir)/man' . $_)
-           unless defined $options{'no-installman'};
-       $output_rules .= ("\t" . '$(mkinstalldirs) $(mandir)/man'
-                         . $_ . "\n");
+       if (&variable_defined ('man' . $sect . '_MANS'))
+       {
+           $sections{$sect} = 1;
+           $vlist{'$(man' . $sect . '_MANS)'} = 1;
+       }
     }
-    push (@phony, 'install-man');
 
-    # Generate install target.
-    local ($key);
-    foreach $key (sort keys %inames)
+    if (&variable_defined ('man_MANS'))
     {
-       $_ = $install_man_format;
-       s/\@SECTION\@/$secmap{$key}/g;
-       s/\@MAN\@/$inames{$key}/g;
-       s/\@FULLSECT\@/$fullsecmap{$key}/g;
-       s/\@MANBASE\@/$mbases{$key}/g;
-       $output_rules .= $_;
+       $vlist{'$(man_MANS)'} = 1;
+       foreach (&variable_value_as_list ('man_MANS', 'all'))
+       {
+           # A page like `foo.1c' goes into man1dir.
+           if (/\.([0-9a-z])([a-z]*)$/)
+           {
+               $sections{$1} = 1;
+           }
+       }
     }
-    $output_rules .= "\n";
 
-    $output_rules .= "uninstall-man:\n\t\$(NORMAL_UNINSTALL)\n";
-    foreach $key (sort keys %inames)
+
+    # Now for each section, generate an install and unintall rule.
+    # Sort sections so output is deterministic.
+    local (@namelist);
+    foreach $sect (sort keys %sections)
     {
-       $_ = $uninstall_man_format;
-       s/\@SECTION\@/$secmap{$key}/g;
-       s/\@MAN\@/$inames{$key}/g;
-       s/\@FULLSECT\@/$fullsecmap{$key}/g;
-       s/\@MANBASE\@/$mbases{$key}/g;
-       $output_rules .= $_;
+       &define_variable ('man' . $sect . 'dir', '$(mandir)/man' . $sect);
+       push (@installdirs, '$(mandir)/man' . $sect)
+           unless defined $options{'no-installman'};
+       $output_rules .= &file_contents_with_transform ('s/\@SECTION\@/'
+                                                       . $sect . '/g;',
+                                                       'mans');
+       push (@phony, 'install-man' . $sect, 'uninstall-man' . $sect);
+       push (@namelist, 'install-man' . $sect);
     }
-    $output_rules .= "\n";
+
+    # We don't really need this, but we use it in case we ever want to
+    # support noinst_MANS.
+    &define_variable ("MANS", join (' ', sort keys %vlist));
+
+    # Generate list of install dirs.
+    $output_rules .= ("install-man: \$(MANS)\n"
+                     . "\t\@\$(NORMAL_INSTALL)\n");
+    &pretty_print_rule ("\t\$(MAKE)", "\t ", @namelist);
+    push (@phony, 'install-man');
+
+    $output_rules .= "uninstall-man:\n\t\@\$(NORMAL_UNINSTALL)\n";
+    grep ($_ = 'un' . $_, @namelist);
+    &pretty_print_rule ("\t\$(MAKE)", "\t ", @namelist);
     push (@phony, 'uninstall-man');
 
     $output_vars .= &file_contents ('mans-vars');
@@ -5346,21 +5344,6 @@ sub initialize_global_constants
         'pkginclude', 0
         );
 
-    # Helper text for dealing with man pages.
-    $install_man_format =
-    '  @sect=@SECTION@;                                \\
-       inst=`echo "@MANBASE@" | sed \'$(transform)\'`.@FULLSECT@; \\
-       if test -f $(srcdir)/@MAN@; then file=$(srcdir)/@MAN@; \\
-       else file=@MAN@; fi; \\
-       echo " $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst"; \\
-       $(INSTALL_DATA) $$file $(mandir)/man$$sect/$$inst
-';
-
-    $uninstall_man_format =
-    '  -inst=`echo "@MANBASE@" | sed \'$(transform)\'`.@FULLSECT@; \\
-       rm -f $(mandir)/man@SECTION@/$$inst
-';
-
     # Commonly found files we look for and automatically include in
     # DISTFILES.
     @common_files =
diff --git a/data.am b/data.am
index 942b15479e75e4b1c272c52461c3f61d736e52bd..6a88c846a22916a3eb704d30f4099f48f9c27524 100644 (file)
--- a/data.am
+++ b/data.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, 1998 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
@@ -31,7 +31,7 @@ install-@DIR@DATA: $(@DIR@_DATA)
        done
 
 uninstall-@DIR@DATA:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_DATA)'; for p in $$list; do \
          rm -f $(@DIR@dir)/$$p; \
        done
index f5e971c6bfcf88ecf6a6f72e0caaded935764b00..80a50f0ca7c51796c75a728aef75fd760a461284 100644 (file)
--- a/header.am
+++ b/header.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, 1998 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
@@ -26,7 +26,7 @@ install-@DIR@HEADERS: $(@DIR@_HEADERS)
        done
 
 uninstall-@DIR@HEADERS:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_HEADERS)'; for p in $$list; do \
          rm -f $(@DIR@dir)/$$p; \
        done
index b0203864f09281864521673bca3b38bf9bd55ad6..b54f88f9c7d6fc7e9a9eabbfaebedd45c0321c1a 100644 (file)
@@ -15,7 +15,7 @@ libtool.am ltlib.am ltlibrary.am mans-vars.am program.am progs.am \
 remake-hdr.am remake.am scripts.am subdirs.am tags.am tags-clean.am \
 texi-vers.am texinfos.am libs-clean.am ltlib-clean.am progs-clean.am \
 data-clean.am COPYING INSTALL texinfo.tex ansi2knr.c ansi2knr.1        \
-lisp.am lisp-clean.am
+lisp.am lisp-clean.am mans.am
 
 ## These must all be executable when installed.
 pkgdata_SCRIPTS = config.guess config.sub install-sh mdate-sh missing \
index 942b15479e75e4b1c272c52461c3f61d736e52bd..6a88c846a22916a3eb704d30f4099f48f9c27524 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, 1998 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
@@ -31,7 +31,7 @@ install-@DIR@DATA: $(@DIR@_DATA)
        done
 
 uninstall-@DIR@DATA:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_DATA)'; for p in $$list; do \
          rm -f $(@DIR@dir)/$$p; \
        done
index f5e971c6bfcf88ecf6a6f72e0caaded935764b00..80a50f0ca7c51796c75a728aef75fd760a461284 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, 1998 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
@@ -26,7 +26,7 @@ install-@DIR@HEADERS: $(@DIR@_HEADERS)
        done
 
 uninstall-@DIR@HEADERS:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_HEADERS)'; for p in $$list; do \
          rm -f $(@DIR@dir)/$$p; \
        done
index 4f1de6589d4840969a0115d452a80184f51d45f2..cfb8e55332b80cac2ce62c580fe8f43f10f34bc2 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, 1998 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
@@ -41,7 +41,7 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBRARIES)
        done
 
 uninstall-@DIR@LIBRARIES:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_LIBRARIES)'; for p in $$list; do \
          rm -f $(@DIR@dir)/$$p; \
        done
index a431a0323ca3b8b3b05269edce2b3dafd27a8e3f..44e0b854324d50a66141b1ead39a673637e83d99 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1996 Free Software Foundation, Inc.
+## Copyright (C) 1996, 1998 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
@@ -31,7 +31,7 @@ install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES)
        done
 
 uninstall-@DIR@LISP:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_LISP)'; for p in $$list; do \
          rm -f $(@DIR@dir)/$$p $(@DIR@dir)/$${p}c; \
        done
index fd3f7991affa54a91f6b9f6426599f2b4eb0ae2b..23ae30e4e5e0796313d72c95e997a5ad3f108875 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -30,7 +30,7 @@ install-@DIR@LTLIBRARIES: $(@DIR@_LTLIBRARIES)
        done
 
 uninstall-@DIR@LTLIBRARIES:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_LTLIBRARIES)'; for p in $$list; do \
          @LIBTOOL --mode=uninstall@ rm -f $(@DIR@dir)/$$p; \
        done
diff --git a/lib/am/mans.am b/lib/am/mans.am
new file mode 100644 (file)
index 0000000..7970ef0
--- /dev/null
@@ -0,0 +1,61 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1998 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
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+install-man@SECTION@:
+       $(mkinstalldirs) $(man@SECTION@dir)
+       @list='$(man@SECTION@_MANS)'; \
+## Extract all items from man_MANS that should go in this section.
+## This must be done dynamically to support conditionals.
+       l2='$(man_MANS)'; for i in $$l2; do \
+         case "$$i" in \
+## Have to accept files like `foo.1c'.
+           *.@SECTION@*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+## Find the file.
+         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+         else file=$$i; fi; \
+## Extract basename of man page and run it through the program rename
+## transform.
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$//'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " $(INSTALL_DATA) $$file $(man@SECTION@dir)/$$inst"; \
+         $(INSTALL_DATA) $$file $(man@SECTION@dir)/$$inst; \
+       done
+
+## This is just completely gross.
+uninstall-man@SECTION@:
+       @list='$(man@SECTION@_MANS)'; \
+## Extract all items from man_MANS that should go in this section.
+## This must be done dynamically to support conditionals.
+       l2='$(man_MANS)'; for i in $$l2; do \
+         case "$$i" in \
+## Have to accept files like `foo.1c'.
+           *.@SECTION@*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+## Extract basename of man page and run it through the program rename
+## transform.
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$//'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " rm -f $(man@SECTION@dir)/$$inst"; \
+         rm -f $(man@SECTION@dir)/$$inst; \
+       done
index 51ede2c399623b30e1d0e1c8650a20655cc2cb3c..418cee5f2b47fbd430db1eccc76763fa9cf55032 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -31,7 +31,7 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
        done
 
 uninstall-@DIR@PROGRAMS:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_PROGRAMS)'; for p in $$list; do \
          rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \
        done
index 083a944e5b4a627b96703235653df2177894ed48..dc41c3ba12810daa28e0af3370ea699189dc2be0 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, 1998 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
@@ -31,7 +31,7 @@ install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
        done
 
 uninstall-@DIR@SCRIPTS:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_SCRIPTS)'; for p in $$list; do \
          rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \
        done
index f61b7dcb9bb36ef0eb54b37a3c65c831892c4f64..8979d9a153fe36b524ca438ec5379c2abb3e1a8e 100644 (file)
@@ -181,7 +181,7 @@ uninstall-info:
          test -z "$ii" \
            || install-info --info-dir=$(infodir) --remove $$file; \
        done
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        for file in $(INFO_DEPS); do \
          (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
        done
diff --git a/libs.am b/libs.am
index 4f1de6589d4840969a0115d452a80184f51d45f2..cfb8e55332b80cac2ce62c580fe8f43f10f34bc2 100644 (file)
--- a/libs.am
+++ b/libs.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, 1998 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
@@ -41,7 +41,7 @@ install-@DIR@LIBRARIES: $(@DIR@_LIBRARIES)
        done
 
 uninstall-@DIR@LIBRARIES:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_LIBRARIES)'; for p in $$list; do \
          rm -f $(@DIR@dir)/$$p; \
        done
diff --git a/lisp.am b/lisp.am
index a431a0323ca3b8b3b05269edce2b3dafd27a8e3f..44e0b854324d50a66141b1ead39a673637e83d99 100644 (file)
--- a/lisp.am
+++ b/lisp.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1996 Free Software Foundation, Inc.
+## Copyright (C) 1996, 1998 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
@@ -31,7 +31,7 @@ install-@DIR@LISP: $(@DIR@_LISP) $(ELCFILES)
        done
 
 uninstall-@DIR@LISP:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_LISP)'; for p in $$list; do \
          rm -f $(@DIR@dir)/$$p $(@DIR@dir)/$${p}c; \
        done
index fd3f7991affa54a91f6b9f6426599f2b4eb0ae2b..23ae30e4e5e0796313d72c95e997a5ad3f108875 100644 (file)
--- a/ltlib.am
+++ b/ltlib.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -30,7 +30,7 @@ install-@DIR@LTLIBRARIES: $(@DIR@_LTLIBRARIES)
        done
 
 uninstall-@DIR@LTLIBRARIES:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_LTLIBRARIES)'; for p in $$list; do \
          @LIBTOOL --mode=uninstall@ rm -f $(@DIR@dir)/$$p; \
        done
diff --git a/mans.am b/mans.am
new file mode 100644 (file)
index 0000000..7970ef0
--- /dev/null
+++ b/mans.am
@@ -0,0 +1,61 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 1998 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
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program; if not, write to the Free Software
+## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+install-man@SECTION@:
+       $(mkinstalldirs) $(man@SECTION@dir)
+       @list='$(man@SECTION@_MANS)'; \
+## Extract all items from man_MANS that should go in this section.
+## This must be done dynamically to support conditionals.
+       l2='$(man_MANS)'; for i in $$l2; do \
+         case "$$i" in \
+## Have to accept files like `foo.1c'.
+           *.@SECTION@*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+## Find the file.
+         if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+         else file=$$i; fi; \
+## Extract basename of man page and run it through the program rename
+## transform.
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$//'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " $(INSTALL_DATA) $$file $(man@SECTION@dir)/$$inst"; \
+         $(INSTALL_DATA) $$file $(man@SECTION@dir)/$$inst; \
+       done
+
+## This is just completely gross.
+uninstall-man@SECTION@:
+       @list='$(man@SECTION@_MANS)'; \
+## Extract all items from man_MANS that should go in this section.
+## This must be done dynamically to support conditionals.
+       l2='$(man_MANS)'; for i in $$l2; do \
+         case "$$i" in \
+## Have to accept files like `foo.1c'.
+           *.@SECTION@*) list="$$list $$i" ;; \
+         esac; \
+       done; \
+       for i in $$list; do \
+## Extract basename of man page and run it through the program rename
+## transform.
+         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$//'`; \
+         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+         echo " rm -f $(man@SECTION@dir)/$$inst"; \
+         rm -f $(man@SECTION@dir)/$$inst; \
+       done
index 51ede2c399623b30e1d0e1c8650a20655cc2cb3c..418cee5f2b47fbd430db1eccc76763fa9cf55032 100644 (file)
--- a/progs.am
+++ b/progs.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998 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
@@ -31,7 +31,7 @@ install-@DIR@PROGRAMS: $(@DIR@_PROGRAMS)
        done
 
 uninstall-@DIR@PROGRAMS:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_PROGRAMS)'; for p in $$list; do \
          rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \
        done
index 083a944e5b4a627b96703235653df2177894ed48..dc41c3ba12810daa28e0af3370ea699189dc2be0 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, 1998 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
@@ -31,7 +31,7 @@ install-@DIR@SCRIPTS: $(@DIR@_SCRIPTS)
        done
 
 uninstall-@DIR@SCRIPTS:
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        list='$(@DIR@_SCRIPTS)'; for p in $$list; do \
          rm -f $(@DIR@dir)/`echo $$p|sed '$(transform)'`; \
        done
index ba0e47e0789784ceb90035c887be481f9dba3f10..c365294a0c1dc0ae7345fbfb6ed620e808bd7f8f 100644 (file)
@@ -1,3 +1,9 @@
+Tue Feb 24 12:29:05 1998  Tom Tromey  <tromey@cygnus.com>
+
+       * man.test: Removed.
+
+       * condman2.test: New file.
+
 Mon Feb 23 16:20:49 1998  Tom Tromey  <tromey@cygnus.com>
 
        * texinfo6.test: New file.
index 2d7e285b0d03182aefb56c4e6efc6f59eaa67610..97e18a6d74c982363b579c81af7503574912b9d7 100644 (file)
@@ -12,24 +12,23 @@ subdir.test backsl.test package.test number.test insh2.test \
 outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
 yacc.test mkinst2.test texinfo2.test ansi.test depacl.test \
 depacl2.test error.test colon.test vtexi2.test tags.test comment.test \
-ansi2.test man.test info.test obsolete.test lex.test scripts.test \
-subdir2.test exsource.test canon4.test dup.test defun.test \
-cxxlink.test cxxnoc.test order.test libobj2.test interp.test \
-block.test libobj3.test dup2.test gnits.test interp2.test colneq.test \
-implicit.test spell.test spell2.test confsub.test primary.test \
-primary2.test depend2.test spell3.test comment2.test vpath.test        \
-symlink.test discover.test acinclude.test req.test acsilent.test \
-distdir.test libobj4.test libobj5.test version.test ranlib.test        \
-confvar.test confvar2.test stdlib.test cxxo.test 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 xsource.test \
-libobj6.test depend3.test output5.test ammissing.test install.test \
-libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test \
-whoami.test unused.test condman.test texinfo5.test aclocali.test \
-texinfo6.test
+ansi2.test info.test obsolete.test lex.test scripts.test subdir2.test \
+exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
+order.test libobj2.test interp.test block.test libobj3.test dup2.test \
+gnits.test interp2.test colneq.test implicit.test spell.test \
+spell2.test confsub.test primary.test primary2.test depend2.test \
+spell3.test comment2.test vpath.test symlink.test discover.test        \
+acinclude.test req.test acsilent.test distdir.test libobj4.test        \
+libobj5.test version.test ranlib.test confvar.test confvar2.test \
+stdlib.test cxxo.test 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 \
+xsource.test libobj6.test depend3.test output5.test ammissing.test \
+install.test libobj7.test objc.test cond3.test cxxcpp.test \
+aclocal.test alpha.test whoami.test unused.test condman.test \
+texinfo5.test aclocali.test texinfo6.test condman2.test
 
 EXTRA_DIST = defs $(TESTS)
 
index befd52ff345f5e4846d031e78b2f48cf091e3c5d..8a81633f7614245331c733893978a51a7edd57e0 100644 (file)
@@ -73,24 +73,23 @@ subdir.test backsl.test package.test number.test insh2.test \
 outdir.test fpinstall.test fpinst2.test texinfo.test dejagnu.test \
 yacc.test mkinst2.test texinfo2.test ansi.test depacl.test \
 depacl2.test error.test colon.test vtexi2.test tags.test comment.test \
-ansi2.test man.test info.test obsolete.test lex.test scripts.test \
-subdir2.test exsource.test canon4.test dup.test defun.test \
-cxxlink.test cxxnoc.test order.test libobj2.test interp.test \
-block.test libobj3.test dup2.test gnits.test interp2.test colneq.test \
-implicit.test spell.test spell2.test confsub.test primary.test \
-primary2.test depend2.test spell3.test comment2.test vpath.test        \
-symlink.test discover.test acinclude.test req.test acsilent.test \
-distdir.test libobj4.test libobj5.test version.test ranlib.test        \
-confvar.test confvar2.test stdlib.test cxxo.test 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 xsource.test \
-libobj6.test depend3.test output5.test ammissing.test install.test \
-libobj7.test objc.test cond3.test cxxcpp.test aclocal.test alpha.test \
-whoami.test unused.test condman.test texinfo5.test aclocali.test \
-texinfo6.test
+ansi2.test info.test obsolete.test lex.test scripts.test subdir2.test \
+exsource.test canon4.test dup.test defun.test cxxlink.test cxxnoc.test \
+order.test libobj2.test interp.test block.test libobj3.test dup2.test \
+gnits.test interp2.test colneq.test implicit.test spell.test \
+spell2.test confsub.test primary.test primary2.test depend2.test \
+spell3.test comment2.test vpath.test symlink.test discover.test        \
+acinclude.test req.test acsilent.test distdir.test libobj4.test        \
+libobj5.test version.test ranlib.test confvar.test confvar2.test \
+stdlib.test cxxo.test 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 \
+xsource.test libobj6.test depend3.test output5.test ammissing.test \
+install.test libobj7.test objc.test cond3.test cxxcpp.test \
+aclocal.test alpha.test whoami.test unused.test condman.test \
+texinfo5.test aclocali.test texinfo6.test condman2.test
 
 EXTRA_DIST = defs $(TESTS)
 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
index 446184a0e42d73a08e67cbfcf1cfa9704077e73e..4559c94d4dc725dff5b296fbeb7b820ea309237b 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
 
+# Make sure conditionals work with man pages.
 . $srcdir/defs || exit 1
 
 cat >> configure.in << 'END'
diff --git a/tests/condman2.test b/tests/condman2.test
new file mode 100755 (executable)
index 0000000..941b24e
--- /dev/null
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+# Make sure appropriate man install targets generated in all cases.
+. $srcdir/defs || exit 1
+
+cat > Makefile.am << 'END'
+man_MANS = foo.1 foo.2
+man5_MANS = foo.5
+END
+
+$AUTOMAKE || exit 1
+
+grep '^install-man1:' Makefile.in || exit 1
+grep '^install-man2:' Makefile.in || exit 1
+grep '^install-man5:' Makefile.in || exit 1
diff --git a/tests/man.test b/tests/man.test
deleted file mode 100755 (executable)
index 2dd4653..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#! /bin/sh
-
-# Test for bug reported by Janos Farkas.
-# Multiple man pages with the same basename don't all get installed.
-
-. $srcdir/defs || exit 1
-
-cat > Makefile.am << 'END'
-man_MANS = shadow.3 shadow.5 passwd.1 passwd.5
-END
-
-: > shadow.3
-: > shadow.5
-: > passwd.1
-: > passwd.5
-
-$AUTOMAKE || exit 1
-
-: > install
-chmod +x install
-
-mkdir man1 man3 man5
-
-$MAKE -f Makefile.in mkinstalldirs=: INSTALL_DATA=cp mandir=`pwd` \
-   srcdir=`pwd` transform='' install-man \
-   || exit 1
-
-test -f man3/shadow.3 || exit 1
-test -f man5/shadow.5 || exit 1
-test -f man1/passwd.1 || exit 1
-test -f man5/passwd.5 || exit 1
index f61b7dcb9bb36ef0eb54b37a3c65c831892c4f64..8979d9a153fe36b524ca438ec5379c2abb3e1a8e 100644 (file)
@@ -181,7 +181,7 @@ uninstall-info:
          test -z "$ii" \
            || install-info --info-dir=$(infodir) --remove $$file; \
        done
-       $(NORMAL_UNINSTALL)
+       @$(NORMAL_UNINSTALL)
        for file in $(INFO_DEPS); do \
          (cd $(infodir) && rm -f $$file $$file-[0-9] $$file-[0-9][0-9]); \
        done
This page took 0.072224 seconds and 5 git commands to generate.