tests/README: fix example about `make -e' usage
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 22 May 2011 17:02:27 +0000 (19:02 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 22 May 2011 17:04:12 +0000 (19:04 +0200)
* tests/README (Section "Writing test cases" subsection "Do"): When
some variable is never initialized in the Makefile, `-e' is not
necessary in order to override it.  DESTDIR is such a variable: we
ensure that we do not ever initialize it.  And as such, it is quite
portable to use:
  $ make DESTDIR=/foo/bar install
and in fact, quite widely used.
So our example about when `make -e' is required, which references
the `DESTDIR' variable, is poorly chosen, if not downright wrong.
Rewrite it to use `prefix' as the overridden variable instead.

ChangeLog
tests/README

index 3631129..583d3d4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2011-05-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+           Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       tests/README: fix example about `make -e' usage
+       * tests/README (Section "Writing test cases" subsection "Do"): When
+       some variable is never initialized in the Makefile, `-e' is not
+       necessary in order to override it.  DESTDIR is such a variable: we
+       ensure that we do not ever initialize it.  And as such, it is quite
+       portable to use:
+         $ make DESTDIR=/foo/bar install
+       and in fact, quite widely used.
+       So our example about when `make -e' is required, which references
+       the `DESTDIR' variable, is poorly chosen, if not downright wrong.
+       Rewrite it to use `prefix' as the overridden variable instead.
+
 2011-05-20  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        testsuite: avoid re-running few tests with 'parallel-tests' option
index 9680a54..2b5b5af 100644 (file)
@@ -181,11 +181,11 @@ Do not
   here.)
 
   Do not override Makefile variables using make arguments, as in e.g.:
-    $MAKE DESTDIR=/foo/bar install
+    $MAKE prefix=/opt install
   This is not portable for recursive targets (targets that call a
-  sub-make may not pass `DESTDIR=/foo/bar' along).  Use the following
+  sub-make may not pass `prefix=/opt' along).  Use the following
   instead:
-    DESTDIR=/foo/bar $MAKE -e install
+    prefix=/opt $MAKE -e install
 
   Do not send a test case without signing a copyright disclaimer.
   See http://sources.redhat.com/automake/contribute.html or