bug-standards
[Top][All Lists]
Advanced

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

standards for info install


From: Karl Berry
Subject: standards for info install
Date: Thu, 11 Feb 2010 00:21:06 GMT

Hi Aubrey,

Cc-ing the mailing list for the coding standards, and including your
msg below, so others can comment.  Especially Ralf.  Are you there, Ralf?

    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.

    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.

    How should `$@' be prefixed in Makefiles?

As far as I know, it shouldn't be (as a matter of course).  It just
expands to the target, whatever the target is.

Thanks,
Karl


Date: Mon, 08 Feb 2010 22:51:19 -0500 (EST)
From: Aubrey Jaffer <address@hidden>
To: address@hidden (Karl Berry)
Subject: standards.info

"standards.info" "7.2.6 Standard Targets for Users" clearly contains
errors:

     Here is a sample rule to install an Info file:

          $(DESTDIR)$(infodir)/foo.info: foo.info
                  $(POST_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)$@; \
          # 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.
                  if $(SHELL) -c 'install-info --version' \
                     >/dev/null 2>&1; then \
                    install-info --dir-file=$(DESTDIR)$(infodir)/dir \
                                 $(DESTDIR)$(infodir)/foo.info; \
                  else true; fi

The "$(INSTALL_DATA) $$d/foo.info $(DESTDIR)$@;" should not be in the
$(POST_INSTALL) section; only the "install-info" part should be.

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?

How should `$@' be prefixed in Makefiles?




reply via email to

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