]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* doc/automake.texi (Python): More examples.
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 16 Feb 2006 21:03:05 +0000 (21:03 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 16 Feb 2006 21:03:05 +0000 (21:03 +0000)
ChangeLog
doc/automake.texi
doc/stamp-vti
doc/version.texi

index 1e8b6a65313cb18b101f97b0440a2b7b43d1bcbf..4fd7f7c9b3640ce4fef3333493ebf06d4a699bf2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2006-02-16  Alexandre Duret-Lutz  <adl@gnu.org>
+
+       * doc/automake.texi (Python): More examples.
+
 2006-02-05  Alexandre Duret-Lutz  <adl@gnu.org>
 
        * doc/automake.texi (distcleancheck): Fix bad wording.  Report
index 309d4c9d8df5909f93019842a6c6e9776cff82ff..ffc1a5f71451912f909548257cc7fc55e2af2f65 100644 (file)
@@ -5831,24 +5831,32 @@ This variable is an @code{sh} expression that is used to set the
 @cindex Primary variable, @code{PYTHON}
 @vindex _PYTHON
 
-Automake provides support for Python compilation with the @code{PYTHON}
-primary.
+Automake provides support for Python compilation with the
+@code{PYTHON} primary.  A typical setup is to call
+@code{AM_PATH_PYTHON} in @file{configure.ac} and use a line like the
+following in @file{Makefile.am}:
+
+@example
+python_PYTHON = tree.py leave.py
+@end example
 
 Any files listed in a @code{_PYTHON} variable will be byte-compiled
 with @command{py-compile} at install time.  @command{py-compile}
-actually creates both standard (@file{.pyc}) and byte-compiled
-(@file{.pyo}) versions of the source files.  Note that because
-byte-compilation occurs at install time, any files listed in
+actually creates both standard (@file{.pyc}) and optimized
+(@file{.pyo}) byte-compiled versions of the source files.  Note that
+because byte-compilation occurs at install time, any files listed in
 @code{noinst_PYTHON} will not be compiled.  Python source files are
-included in the distribution by default.
-
-Automake ships with an Autoconf macro called @code{AM_PATH_PYTHON} that
-will determine some Python-related directory variables (see below).  If
-you have called @code{AM_PATH_PYTHON} from @file{configure.ac}, then you
-may use the following variables to list you Python source files in your
-variables: @code{python_PYTHON}, @code{pkgpython_PYTHON},
-@code{pyexecdir_PYTHON}, @code{pkgpyexecdir_PYTHON}, depending where you
-want your files installed.
+included in the distribution by default, prepend @code{nodist_} (as in
+@code{nodist_python_PYTHON}) to omit them.
+
+Automake ships with an Autoconf macro called @code{AM_PATH_PYTHON}
+that will determine some Python-related directory variables (see
+below).  If you have called @code{AM_PATH_PYTHON} from
+@file{configure.ac}, then you may use the variables
+@code{python_PYTHON} or @code{pkgpython_PYTHON} to list Python source
+files in your @file{Makefile.am}, depending where you want your files
+installed (see the definitions of @code{pythondir} and
+@code{pkgpythondir} below).
 
 @defmac AM_PATH_PYTHON ([@var{VERSION}], [@var{ACTION-IF-FOUND}], [@var{ACTION-IF-NOT-FOUND}])
 
@@ -5860,10 +5868,17 @@ If an interpreter is found and satisfies @var{VERSION}, then
 @var{ACTION-IF-FOUND} is run.  Otherwise, @var{ACTION-IF-NOT-FOUND} is
 run.
 
-If @var{ACTION-IF-NOT-FOUND} is not specified, the default is to abort
-configure.  This is fine when Python is an absolute requirement for the
-package.  Therefore if Python >= 2.2 is only @emph{optional} to the
-package, @code{AM_PATH_PYTHON} could be called as follows.
+If @var{ACTION-IF-NOT-FOUND} is not specified, as in the following
+example, the default is to abort @command{configure}.
+
+@example
+AM_PATH_PYTHON(2.2)
+@end example
+
+@noindent
+This is fine when Python is an absolute requirement for the package.
+If Python >= 2.2 was only @emph{optional} to the package,
+@code{AM_PATH_PYTHON} could be called as follows.
 
 @example
 AM_PATH_PYTHON(2.2,, :)
@@ -5919,7 +5934,14 @@ as a convenience.
 
 @item pyexecdir
 This is the directory where Python extension modules (shared libraries)
-should be installed.
+should be installed.  An extension module written in C could be declared
+as follows to Automake:
+
+@example
+pyexec_LTLIBRARIES = quaternion.la
+quaternion_SOURCES = quaternion.c support.c support.h
+quaternion_la_LDFLAGS = -avoid-version -module
+@end example
 
 @item pkgpyexecdir
 This is a convenience variable that is defined as
index 6608007e16e4f3f0a50614229ed7fd168328feaa..58b10b588cea1532897875a7fefb54436feac020 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 5 February 2006
+@set UPDATED 16 February 2006
 @set UPDATED-MONTH February 2006
 @set EDITION 1.9a
 @set VERSION 1.9a
index 6608007e16e4f3f0a50614229ed7fd168328feaa..58b10b588cea1532897875a7fefb54436feac020 100644 (file)
@@ -1,4 +1,4 @@
-@set UPDATED 5 February 2006
+@set UPDATED 16 February 2006
 @set UPDATED-MONTH February 2006
 @set EDITION 1.9a
 @set VERSION 1.9a