automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

98-factored-install-info.patch


From: Akim Demaille
Subject: 98-factored-install-info.patch
Date: Fri, 02 Mar 2001 00:27:10 +0100

It was bizarre to support install-info, but not uninstall-info.  In
addition, install-info, being non regular, was taking risks, such as
not working properly in the case of recursives directories (not that
it actually really matters), and was indeed broken in this respect.

I still have the RECURSIVE_TARGETS in mind, which requires bringing
all the standard targets to uniform handling, especially the
-am/-recursive mechanism.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        Make the installation/uninstallation of Info pages follow the
        regular am/recursive scheme.

        * automake.in (%required_targets, %dependencies): Add
        install-info.
        (%dependencies): Add install-info, install-info-am, and
        unstall-info.
        (&handle_subdirs): Don't transform INSTALLINFO, which mapping was
        reversed BTW.  Does anybody use the option `no-installinfo'?
        (&handle_merge_targets): Let the handling of info related targets
        to...
        (&handle_factored_dependencies): this.
        * subdirs.am: Use ?INSTALL-INFO?.
        * texinfos.am: Define the install-info, uninstall-info and
        uninstall-info-am targets.

Index: Makefile.in
--- Makefile.in Thu, 01 Mar 2001 23:51:50 +0100 akim (am/h/16_Makefile.i 1.32 
644)
+++ Makefile.in Fri, 02 Mar 2001 00:19:19 +0100 akim (am/h/16_Makefile.i 1.32 
644)
@@ -223,29 +223,8 @@
 DVIPS = dvips
 .dvi.ps:
        $(DVIPS) $< -o $@
-install-info-am: $(INFO_DEPS)
-       @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(infodir)
-       @list='$(INFO_DEPS)'; \
-       for file in $$list; do \
-         d=$(srcdir); \
-         for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] 
$$file-[0-9][0-9]`; do \
-           if test -f $$d/$$ifile; then \
-             echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; 
\
-             $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
-           else : ; fi; \
-         done; \
-       done
-       @$(POST_INSTALL)
-       @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i 
debian' >/dev/null 2>&1; then \
-         list='$(INFO_DEPS)'; \
-         for file in $$list; do \
-           echo " install-info --info-dir=$(DESTDIR)$(infodir) 
$(DESTDIR)$(infodir)/$$file";\
-           install-info --info-dir=$(DESTDIR)$(infodir) 
$(DESTDIR)$(infodir)/$$file || :;\
-         done; \
-       else : ; fi

-uninstall-info:
+uninstall-info-am:
        $(PRE_UNINSTALL)
        @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i 
debian' >/dev/null 2>&1; then \
          list='$(INFO_DEPS)'; \
@@ -329,7 +308,8 @@
 #     (which will cause the Makefiles to be regenerated when you run `make');
 # (2) otherwise, pass the desired values on the `make' command line.
 all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive  \
+installdirs-recursive install-recursive uninstall-recursive \
+install-info-recursive uninstall-info-recursive \
 check-recursive installcheck-recursive info-recursive dvi-recursive:
        @set fnord $(MAKEFLAGS); amf=$$2; \
        dot_seen=no; \
@@ -555,6 +535,29 @@

 install-exec-am: install-binSCRIPTS

+install-info: install-info-recursive
+
+install-info-am: $(INFO_DEPS)
+       @$(NORMAL_INSTALL)
+       $(mkinstalldirs) $(DESTDIR)$(infodir)
+       @list='$(INFO_DEPS)'; \
+       for file in $$list; do \
+         d=$(srcdir); \
+         for ifile in `CDPATH=: && cd $$d && echo $$file $$file-[0-9] 
$$file-[0-9][0-9]`; do \
+           if test -f $$d/$$ifile; then \
+             echo " $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile"; 
\
+             $(INSTALL_DATA) $$d/$$ifile $(DESTDIR)$(infodir)/$$ifile; \
+           else : ; fi; \
+         done; \
+       done
+       @$(POST_INSTALL)
+       @if $(SHELL) -c 'install-info --version | sed 1q | fgrep -s -v -i 
debian' >/dev/null 2>&1; then \
+         list='$(INFO_DEPS)'; \
+         for file in $$list; do \
+           echo " install-info --info-dir=$(DESTDIR)$(infodir) 
$(DESTDIR)$(infodir)/$$file";\
+           install-info --info-dir=$(DESTDIR)$(infodir) 
$(DESTDIR)$(infodir)/$$file || :;\
+         done; \
+       else : ; fi
 install-man:

 installcheck-am: installcheck-local
@@ -570,7 +573,9 @@
 mostlyclean-am: mostlyclean-aminfo mostlyclean-generic mostlyclean-vti

 uninstall-am: uninstall-binSCRIPTS uninstall-dist_pkgdataDATA \
-       uninstall-dist_scriptDATA uninstall-info
+       uninstall-dist_scriptDATA uninstall-info-am
+
+uninstall-info: uninstall-info-recursive

 .PHONY: all all-am all-recursive check check-am check-recursive clean \
        clean-generic clean-recursive dist dist-all dist-info distcheck \
@@ -579,16 +584,17 @@
        install install-am install-binSCRIPTS install-data \
        install-data-am install-data-recursive install-dist_pkgdataDATA \
        install-dist_scriptDATA install-exec install-exec-am \
-       install-exec-recursive install-info-am install-man \
-       install-recursive install-strip installcheck installcheck-am \
-       installcheck-local installcheck-recursive installdirs \
-       installdirs-am installdirs-recursive maintainer-clean \
-       maintainer-clean-aminfo maintainer-clean-generic \
-       maintainer-clean-recursive maintainer-clean-vti mostlyclean \
-       mostlyclean-aminfo mostlyclean-generic mostlyclean-recursive \
-       mostlyclean-vti tags tags-recursive uninstall uninstall-am \
-       uninstall-binSCRIPTS uninstall-dist_pkgdataDATA \
-       uninstall-dist_scriptDATA uninstall-info uninstall-recursive
+       install-exec-recursive install-info install-info-recursive \
+       install-man install-recursive install-strip installcheck \
+       installcheck-am installcheck-local installcheck-recursive \
+       installdirs installdirs-am installdirs-recursive \
+       maintainer-clean maintainer-clean-aminfo \
+       maintainer-clean-generic maintainer-clean-recursive \
+       maintainer-clean-vti mostlyclean mostlyclean-aminfo \
+       mostlyclean-generic mostlyclean-recursive mostlyclean-vti tags \
+       tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
+       uninstall-dist_pkgdataDATA uninstall-dist_scriptDATA \
+       uninstall-info-recursive uninstall-recursive


 install-data-hook:
Index: automake.in
--- automake.in Thu, 01 Mar 2001 23:51:50 +0100 akim (am/f/39_automake.i 1.105 
755)
+++ automake.in Fri, 02 Mar 2001 00:07:28 +0100 akim (am/f/39_automake.i 1.105 
755)
@@ -396,6 +396,7 @@
    'all'          => 1,
    'dvi'         => 1,
    'info'        => 1,
+   'install-info' => 1,
    'install'      => 1,
    'install-data' => 1,
    'install-exec' => 1,
@@ -707,9 +708,15 @@ sub initialize_per_input ()
        # Installing/uninstalling.
        'install-data-am'      => [],
        'install-exec-am'      => [],
+       'uninstall-am'         => [],
+
        'install-man'         => [],
        'uninstall-man'       => [],
-       'uninstall-am'         => [],
+
+       'install-info'         => [],
+       'install-info-am'      => [],
+       'uninstall-info'       => [],
+
        'installcheck-am'      => [],

        # Cleaning.
@@ -3355,12 +3362,7 @@ sub handle_subdirs
            if $dir =~ /\//;
     }

-    $output_rules .=
-      &file_contents ('subdirs',
-                     &transform
-                     ('INSTALLINFO' => (defined $options{'no-installinfo'}
-                                        ? 'install-info-recursive'
-                                        : '')));
+    $output_rules .= &file_contents ('subdirs');
 }

 # Handle aclocal.m4.
@@ -3928,16 +3930,6 @@ sub handle_merge_targets

     &do_check_merge_target;

-    if (defined $options{'no-installinfo'})
-    {
-       &do_one_merge_target ('install-info', '');
-    }
-    elsif (&target_defined ('install-info-local'))
-    {
-       &am_line_error ('install-info-local',
-                       "\`install-info-local' target defined but 
\`no-installinfo' option not in use");
-    }
-
     if (@all || &variable_defined ('BUILT_SOURCES'))
     {
        my $local_headers = '';
@@ -4159,7 +4151,16 @@ sub handle_factored_dependencies
     if (&target_defined ('install-local'))
     {
        &am_line_error ('install-local',
-                       "use \`install-data-local' or \`install-exec-local', 
not \`install-local'");
+                       "use \`install-data-local' or \`install-exec-local', "
+                       . "not \`install-local'");
+    }
+
+    if (!defined $options{'no-installinfo'}
+       && &target_defined ('install-info-local'))
+    {
+       &am_line_error ('install-info-local',
+                       "\`install-info-local' target defined but "
+                       . "\`no-installinfo' option not in use");
     }

     # Install the -local hooks.
Index: subdirs.am
--- subdirs.am Mon, 26 Feb 2001 23:44:40 +0100 akim (am/g/14_subdirs.am 1.7 644)
+++ subdirs.am Fri, 02 Mar 2001 00:19:12 +0100 akim (am/g/14_subdirs.am 1.7 644)
@@ -25,12 +25,16 @@
 # (2) otherwise, pass the desired values on the `make' command line.


-.PHONY: all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive %INSTALLINFO% \
+.PHONY: \
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive \
+?INSTALL-INFO?install-info-recursive uninstall-info-recursive \
 check-recursive installcheck-recursive info-recursive dvi-recursive

+
 all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive %INSTALLINFO% \
+installdirs-recursive install-recursive uninstall-recursive \
+?INSTALL-INFO?install-info-recursive uninstall-info-recursive \
 check-recursive installcheck-recursive info-recursive dvi-recursive:
        @set fnord $(MAKEFLAGS); amf=$$2; \
        dot_seen=no; \
Index: texinfos.am
--- texinfos.am Thu, 01 Mar 2001 23:51:50 +0100 akim (am/g/10_texinfos.a 1.12 
644)
+++ texinfos.am Fri, 02 Mar 2001 00:12:32 +0100 akim (am/g/10_texinfos.a 1.12 
644)
@@ -40,7 +40,8 @@
 ## TEXINFOS primary are always installed in infodir, hence install-data
 ## is hard coded.
 ?INSTALL-INFO?_am_installdirs += $(DESTDIR)$(infodir)
-.PHONY: install-info-am
+?SUBDIRS?.PHONY install-info: install-info-recursive
+?!SUBDIRS?.PHONY install-info: install-info-am
 ?INSTALL-INFO?install-data-am: install-info-am
 install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
@@ -77,9 +78,15 @@
          done; \
        else : ; fi

-.PHONY: uninstall-info
-?INSTALL-INFO?uninstall-am: uninstall-info
-uninstall-info:
+
+## ------------------------- ##
+## Uninstalling info pages.  ##
+## ------------------------- ##
+
+?SUBDIRS?.PHONY uninstall-info: uninstall-info-recursive
+?!SUBDIRS?.PHONY uninstall-info: uninstall-info-am
+?INSTALL-INFO?uninstall-am: uninstall-info-am
+uninstall-info-am:
        $(PRE_UNINSTALL)
 ## Run two loops here so that we can handle PRE_UNINSTALL and
 ## NORMAL_UNINSTALL correctly.
Index: m4/Makefile.in
--- m4/Makefile.in Thu, 01 Mar 2001 23:51:50 +0100 akim (am/h/15_Makefile.i 
1.24 644)
+++ m4/Makefile.in Fri, 02 Mar 2001 00:19:19 +0100 akim (am/h/15_Makefile.i 
1.24 644)
@@ -198,6 +198,8 @@

 install-exec-am:

+install-info:
+
 install-man:

 installcheck-am:
@@ -215,10 +217,10 @@
 .PHONY: all all-am check check-am clean clean-generic distclean \
        distclean-generic distdir dvi dvi-am info info-am install \
        install-am install-data install-data-am install-exec \
-       install-exec-am install-m4dataDATA install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       uninstall uninstall-am uninstall-m4dataDATA
+       install-exec-am install-info install-m4dataDATA install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic uninstall uninstall-am uninstall-m4dataDATA


 # Tell versions [3.59,3.63) of GNU make to not export all variables.
Index: tests/Makefile.in
--- tests/Makefile.in Thu, 01 Mar 2001 23:51:50 +0100 akim (am/h/14_Makefile.i 
1.27 644)
+++ tests/Makefile.in Fri, 02 Mar 2001 00:19:19 +0100 akim (am/h/14_Makefile.i 
1.27 644)
@@ -503,6 +503,8 @@

 install-exec-am:

+install-info:
+
 install-man:

 installcheck-am:
@@ -518,10 +520,10 @@
 .PHONY: all all-am check check-TESTS check-am clean clean-generic \
        distclean distclean-generic distclean-local distdir dvi dvi-am \
        info info-am install install-am install-data install-data-am \
-       install-exec install-exec-am install-man install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic \
-       uninstall uninstall-am
+       install-exec install-exec-am install-info install-man \
+       install-strip installcheck installcheck-am installdirs \
+       maintainer-clean maintainer-clean-generic mostlyclean \
+       mostlyclean-generic uninstall uninstall-am


 distclean-local:



reply via email to

[Prev in Thread] Current Thread [Next in Thread]