[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
gnustandards make-stds.texi
From: |
Karl Berry |
Subject: |
gnustandards make-stds.texi |
Date: |
Tue, 23 Feb 2010 14:13:13 +0000 |
CVSROOT: /sources/gnustandards
Module name: gnustandards
Changes by: Karl Berry <karl> 10/02/23 14:13:13
Modified files:
. : make-stds.texi
Log message:
improve install-info too
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnustandards/make-stds.texi?cvsroot=gnustandards&r1=1.56&r2=1.57
Patches:
Index: make-stds.texi
===================================================================
RCS file: /sources/gnustandards/gnustandards/make-stds.texi,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -b -r1.56 -r1.57
--- make-stds.texi 25 Jan 2010 01:42:02 -0000 1.56
+++ make-stds.texi 23 Feb 2010 14:13:13 -0000 1.57
@@ -3,7 +3,6 @@
@node Makefile Conventions
@chapter Makefile Conventions
address@hidden standards.texi does not print an index, but make.texinfo does.
@cindex makefile, conventions for
@cindex conventions for makefiles
@cindex standards for makefiles
@@ -294,7 +293,7 @@
@node DESTDIR
address@hidden @code{DESTDIR}: support for staged installs
address@hidden @code{DESTDIR}: Support for Staged Installs
@vindex DESTDIR
@cindex staged installs
@@ -368,6 +367,11 @@
default settings specified here so that all GNU packages behave
identically, allowing the installer to achieve any desired layout.
address@hidden directories, creating installation
address@hidden installation directories, creating
+All installation directories, and their parent directories, should be
+created (if necessary) before they are installed into.
+
These first two variables set the root for the installation. All the
other installation directories should be subdirectories of one of
these two, and nothing should be directly installed into these two
@@ -743,26 +747,31 @@
the @code{install-info} program if it is present. @code{install-info}
is a program that edits the Info @file{dir} file to add or update the
menu entry for the given Info file; it is part of the Texinfo package.
-Here is a sample rule to install an Info file:
+
+Here is a sample rule to install an Info file that also tries to
+handle some additional situations, such as @code{install-info} not
+being present.
@comment This example has been carefully formatted for the Make manual.
@comment Please do not reformat it without talking to address@hidden
@smallexample
-$(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)$@@; \
+do-install-info: foo.info installdirs
+ $(NORMAL_INSTALL)
+# Prefer an info file in . to one in srcdir.
+ if test -f foo.info; then d=.; \
+ else d="$(srcdir)"; fi; \
+ $(INSTALL_DATA) $$d/foo.info \
+ "$(DESTDIR)$(infodir)/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
+# 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 \
- $(DESTDIR)$(infodir)/foo.info; \
+ install-info --dir-file="$(DESTDIR)$(infodir)/dir" \
+ "$(DESTDIR)$(infodir)/foo.info"; \
else true; fi
@end smallexample
@@ -1000,8 +1009,7 @@
It's useful to add a target named @samp{installdirs} to create the
directories where files are installed, and their parent directories.
There is a script called @file{mkinstalldirs} which is convenient for
-this; you can find it in the Texinfo package.
address@hidden It's in /gd/gnu/lib/mkinstalldirs.
+this; you can find it in the Gnulib package.
You can use a rule like this:
@comment This has been carefully formatted to look decent in the Make manual.
@@ -1016,7 +1024,7 @@
@end smallexample
@noindent
-or, if you wish to support @env{DESTDIR},
+or, if you wish to support @env{DESTDIR} (strongly encouraged),
@smallexample
# Make sure all installation directories (e.g. $(bindir))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- gnustandards make-stds.texi,
Karl Berry <=