[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[automake-commit] branch master updated: doc: user conditional for depen
From: |
Karl Berry |
Subject: |
[automake-commit] branch master updated: doc: user conditional for dependency tracking. |
Date: |
Mon, 30 Oct 2023 13:15:14 -0400 |
This is an automated email from the git hooks/post-receive script.
karl pushed a commit to branch master
in repository automake.
View the commit online:
https://git.savannah.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=2d91e57be98691c058a1d9f705986b480896225b
The following commit(s) were added to refs/heads/master by this push:
new 2d91e57be doc: user conditional for dependency tracking.
2d91e57be is described below
commit 2d91e57be98691c058a1d9f705986b480896225b
Author: Karl Berry <karl@freefriends.org>
AuthorDate: Mon Oct 30 10:14:51 2023 -0700
doc: user conditional for dependency tracking.
* doc/automake.texi (Automatic dependency tracking): Describe
basing a conditional for dependency tracking on the shell variable
enable_dependency_tracking. Mentioned by Nick Bowler.
https://lists.gnu.org/archive/html/automake/2023-09/msg00004.html
* HACKING: Capitalization.
---
HACKING | 2 +-
doc/automake.texi | 30 ++++++++++++++++++++++++++----
2 files changed, 27 insertions(+), 5 deletions(-)
diff --git a/HACKING b/HACKING
index bb6b21c06..39e31204b 100644
--- a/HACKING
+++ b/HACKING
@@ -310,7 +310,7 @@
* t/foo.sh: New test.
* t/list-of-tests.mk (handwritten_TESTS): Add it.
* doc/automake.texi (Some Node): Document it.
- * NEWS: mention it.
+ * NEWS: Mention it.
* If your commit fixes an automake bug registered in the tracker (say
numbered 1234), you should put the following line after the summary
diff --git a/doc/automake.texi b/doc/automake.texi
index 09a5fcc11..60a516fea 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -230,7 +230,7 @@ Building Programs and Libraries
* Fortran 9x Support:: Compiling Fortran 9x sources
* Java Support with gcj:: Compiling Java sources using gcj
* Vala Support:: Compiling Vala sources
-* Support for Other Languages:: Compiling other languages
+* Support for Other Languages:: Compiling other languages
* Dependencies:: Automatic dependency tracking
* EXEEXT:: Support for executable extensions
@@ -7091,7 +7091,7 @@ of Automake}) taught us that it is not reliable to
generate dependencies
only on the maintainer's system, as configurations vary too much. So
instead Automake implements dependency tracking at build time.
-Automatic dependency tracking can be suppressed by putting
+This automatic dependency tracking can be suppressed by putting
@option{no-dependencies} in the variable @code{AUTOMAKE_OPTIONS}, or
passing @option{no-dependencies} as an argument to @code{AM_INIT_AUTOMAKE}
(this should be the preferred way). Or, you can invoke @command{automake}
@@ -7100,12 +7100,34 @@ with the @option{-i} option. Dependency tracking is
enabled by default.
@vindex AUTOMAKE_OPTIONS
@opindex no-dependencies
+@cindex Disabling dependency tracking
+@cindex Dependency tracking, disabling
The person building your package also can choose to disable dependency
tracking by configuring with @option{--disable-dependency-tracking}.
-@cindex Disabling dependency tracking
-@cindex Dependency tracking, disabling
+@cindex Conditional for dependency tracking
+If, as the package maintainer, you wish to conditionalize your
+@code{Makefile.am} according to whether dependency tracking is
+enabled, the best way is to define your own conditional in
+@code{configure.ac} according to the shell variable
+@code{$enable_dependency_tracking} (all
+@code{--enable}/@code{--disable} options are available as shell
+variables; @pxref{Package Options,,,autoconf,GNU Autoconf}):
+@example
+AM_CONDITIONAL([NO_DEP_TRACKING],
+ [test x"$enable_dependency_tracking" = x"no"])
+@end example
+
+And then in your @code{Makefile.am}:
+
+@example
+if NO_DEP_TRACKING
+# stuff to do when dependency tracking is disabled
+else
+# stuff to do when it's enabled
+endif
+@end example
@node EXEEXT
@section Support for executable extensions
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [automake-commit] branch master updated: doc: user conditional for dependency tracking.,
Karl Berry <=