+2001-11-05 Alexandre Duret-Lutz <duret_g@epita.fr>
+
+ * lib/am/python.am: Cleanup the cleaning section.
+ * automake.texi (Python): Remove documentation for PYCFILES
+ and PYOFILES. Update the first paragraphes.
+
2001-11-05 Alexandre Duret-Lutz <duret_g@epita.fr>
* automake.in (FOREIGN, GNU, GNITS, AC_CANONICAL_HOST,
@cindex Primary variable, PYTHON
-Automake provides support for Python modules. Automake will turn on
-Python support if the @code{AM_PATH_PYTHON} macro is used in
-@file{configure.in}. The @samp{PYTHON} primary is used to hold a list
-of @file{.py} files. Possible prefixes for this primary are
-@samp{python_} and @samp{noinst_}. Note that if @code{python_PYTHON} is
-defined, then @file{configure.in} must run @code{AM_PATH_PYTHON}.
+Automake provides support for Python compilation with the @samp{PYTHON}
+primary.
+
+Any files listed in a @samp{_PYTHON} variable will be byte-compiled with
+@code{py-compile} at install time. @code{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 @samp{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} which
+will determine some Python-related directory variables (see below). If
+have called @code{AM_PATH_PYTHON} from you @file{configure.in}, then you
+may use the following variables to list you Python source files in your
+variables: @samp{python_PYTHON}, @samp{pkgpython_PYTHON},
+@samp{pkgpython_PYTHON}, @samp{pyexecdir_PYTHON},
+@samp{pkgpyexecdir_PYTHON}, depending where you want your files
+installed.
+
@code{AM_PATH_PYTHON} takes a single optional argument. This argument,
if present, is the minimum version of Python which can be used for this
package. If the version of Python found on the system is older than the
@samp{$(pyexecdir)/$(PACKAGE)}.
@end vtable
-@vindex PYCFILES
-@vindex PYOFILES
-
-By default Automake will byte-compile all Python source files to both
-@file{.pyc} and @file{.pyo} forms. If you wish to avoid generating the
-optimized byte-code files, simply define the variable @code{PYOFILES} to
-be empty. Similarly, if you don't wish to generate the standard
-byte-compiled files, define the variable @code{PYCFILES} to be empty.
-
@node Documentation, Install, Other GNU Tools, Top
@chapter Building documentation
## Cleaning. ##
## ---------- ##
-## FIXME: There is nothing to clean here since files are
-## byte-compiled when (and where) they are installed.
-## Some points thought:
-## 1) clean-python ought to be named clean-%DIR%PYTHON, to allow
-## multiple _PYTHON targets.
-## 2) PYCFILES and PYOFILES are documented but not used anywhere
-## else.
-## 3) PYCFILES and PYOFILES shoud be target-dependent for the same
-## reason.
-##
-##.PHONY clean-am: clean-python
-##clean-python:
-## -test -z "$(PYCFILES)$(PYOFILES)" || rm -f $(PYCFILES) $(PYOFILES)
-
+## There is nothing to clean here since files are
+## byte-compiled when (and where) they are installed.
## -------------- ##
## Distributing. ##