bug-standards
[Top][All Lists]
Advanced

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

Re: standards for info install


From: Ralf Wildenhues
Subject: Re: standards for info install
Date: Thu, 11 Feb 2010 07:29:15 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hello,

* Karl Berry wrote on Thu, Feb 11, 2010 at 01:21:06AM CET:
> Cc-ing the mailing list for the coding standards, and including your
> msg below, so others can comment.  Especially Ralf.  Are you there, Ralf?

Every now and then I am.  :-)

>     The "$(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@;" should not be in the
>     $(POST_INSTALL) section; only the "install-info" part should be.
> 
> That sounds right to me also.

I agree.

>     Also, the target is "$(DESTDIR)$(infodir)/foo.info", but the line
>     "INSTALL_DATA" line calls out "$(DESTDIR)$@".  How does `make' remove
>     the "DESTDIR" prefix but not the "infodir" prefix?
> 
> I believe the $(DESTDIR) in the INSTALL_DATA line:
>                   $(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@; \
> is a mistake and should be removed.

I agree.  I find listing an absolute installed file as target name a bit
weird (in fact, very weird) though, moreso since the install rule will
have to depend on it, it prevents installation into an absolute
directory name containing spaces (common on w32), it causes the file to
not be updated unconditionally (which may be regarded as feature), and
it has nontrivial side-effects (namely updating the `dir' file as well).

So, yes, I arrive at this minimal change.  BTW, there is a comment atop
of the example stating that changes are to be communicated to bug-make.

Cheers,
Ralf

2010-02-11  Aubrey Jaffer  <address@hidden>

        * doc/make-stds.texi (Standard Targets): Fix sample installation
        for info files.

diff --git a/doc/make-stds.texi b/doc/make-stds.texi
index b0a7d8a..7da8ed2 100644
--- a/doc/make-stds.texi
+++ b/doc/make-stds.texi
@@ -749,16 +749,17 @@ Standard Targets
 @comment Please do not reformat it without talking to address@hidden
 @smallexample
 $(DESTDIR)$(infodir)/foo.info: foo.info
-        $(POST_INSTALL)
+        $(NORMAL_INSTALL)
 # There may be a newer info file in . than in srcdir.
         -if test -f foo.info; then d=.; \
          else d=$(srcdir); fi; \
-        $(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@@; \
+        $(INSTALL_DATA) $$d/foo.info $@@
 # Run install-info only if it exists.
 # Use `if' instead of just prepending `-' to the
 # line so we notice real errors from install-info.
 # We use `$(SHELL) -c' because some shells do not
 # fail gracefully when there is an unknown command.
+        $(POST_INSTALL)
         if $(SHELL) -c 'install-info --version' \
            >/dev/null 2>&1; then \
           install-info --dir-file=$(DESTDIR)$(infodir)/dir \




reply via email to

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