* Makefile.ad files:: Makefile.ad for creating Makefile.am
* Other .ad files:: Other files with .ad suffix
* Distdefines:: Using distdefs in files
+* Dependencies:: Autodist dependency support
Invoking Autodist
* Makefile.ad files:: Makefile.ad for creating Makefile.am
* Other .ad files:: Other files with .ad suffix
* Distdefines:: Using distdefs in files
+* Dependencies:: Autodist dependency support
@end menu
'pre-hook' hook will be run immediately after invoking Autodist to start
preparing the source tree for configuration and compilation (@pxref{Preparing source tree, , , , }).
-The scripts will get three (3) command line arguments when Autodist
-executes the script: distribution name, distribution version and package
-name of distribution. The script may use these arguments if it needs them.
+The scripts will get at least three (3) command line arguments when
+Autodist executes the script: distribution name, distribution version and
+package name of distribution. The script may use these arguments if it
+needs them. If user passed any extra parameters to autodist in the
+command line they will also be passed to the script as last arguments.
@section Directive: post-hook <filename> [...]
preparing the source three for configuration and compilation (@pxref{Preparing source tree, , , , }). The Autodist will exit after it has run the
'post-hook' scripts.
-The scripts will get three (3) command line arguments when Autodist
-executes the script: distribution name, distribution version and package
-name of distribution. The script may use these arguments if it needs them.
+The scripts will get at least three (3) command line arguments when
+Autodist executes the script: distribution name, distribution version and
+package name of distribution. The script may use these arguments if it
+needs them. If user passed any extra parameters to autodist in the
+command line they will also be passed to the script as last arguments.
@section Directive: pre-process-dist-hook <filename> [...]
will be run immediately after the Autodist has created the distribution
directory but has not yet started any distribution processing.
-The scripts will get four (4) command line arguments when Autodist
-executes the script: distribution name, distribution version, package
-name of distribution and destination distribution directory name. The
-script may use these arguments if it needs them.
+The scripts will get at least four (4) command line arguments when
+Autodist executes the script: distribution name, distribution version,
+package name of distribution and destination distribution directory name.
+The script may use these arguments if it needs them. If user passed any
+extra parameters to autodist in the command line they will also be passed
+to the script as last arguments.
@section Directive: post-process-dist-hook <filename> [...]
has finished processing the destination distribution directory but has not
yet created the distribution package.
-The scripts will get four (4) command line arguments when Autodist
-executes the script: distribution name, distribution version, package
-name of distribution and destination distribution directory name. The
-script may use these arguments if it needs them.
+The scripts will get at least four (4) command line arguments when
+Autodist executes the script: distribution name, distribution version,
+package name of distribution and destination distribution directory name.
+The script may use these arguments if it needs them. If user passed any
+extra parameters to autodist in the command line they will also be passed
+to the script as last arguments.
@section Directive: pre-dist-hook <filename> [...]
the Autodist has started distribution creation, but has not yet created
the distribution directory. This hook is run before 'pre-process-dist-hook'.
-The scripts will get four (4) command line arguments when Autodist
-executes the script: distribution name, distribution version, package
-name of distribution and destination distribution directory name. The
-script may use these arguments if it needs them.
+The scripts will get at least four (4) command line arguments when
+Autodist executes the script: distribution name, distribution version,
+package name of distribution and destination distribution directory name.
+The script may use these arguments if it needs them. If user passed any
+extra parameters to autodist in the command line they will also be passed
+to the script as last arguments.
@section Directive: post-dist-hook <filename> [...]
immediately after the Autodist has finished creating the distribution
package. This is the last hook Autodist runs.
-The scripts will get four (4) command line arguments when Autodist
-executes the script: distribution name, distribution version, package
-name of distribution and destination distribution directory name. The
-script may use these arguments if it needs them.
+The scripts will get at least four (4) command line arguments when
+Autodist executes the script: distribution name, distribution version,
+package name of distribution and destination distribution directory name.
+The script may use these arguments if it needs them. If user passed any
+extra parameters to autodist in the command line they will also be passed
+to the script as last arguments.
@section Running hooks
@end defmac
-@defmac AD_ENABLE_DEPENDENCIES
+@defmac AD_DISABLE_DEPENDENCIES
-This macro is used to enable Autodist dependencies in 'Makefile.ad' files.
-If this macro is used, then after editing 'Makefile.ad' file running
-Autodist manually is not required, but it is run automatically when the
-source is compiled with 'make'. This macro has no arguments.
+This macro is used to disable Autodist dependencies. If this macro is
+used, then after editing 'Makefile.ad' and 'configure.ad' files the
+Autodist must be run manually. When dependencies are enabled Autodist is
+run automatically when source is compiled with 'make'. Dependencies make
+the development easier. This macro has no arguments.
Note that, the dependencies are enabled only in the prepared source tree.
Depedencies are not delivered to distribution, as they would require the
-presence of 'Makefile.ad' files, which are not delivered to distribution.
-
-Current Autodist version does not support dependencies in 'configure.ad'
-files, only in 'Makefile.ad' files.
+presence of 'Makefile.ad' and 'configure.ad' files, which are not
+delivered to distribution.
@end defmac
@menu
In this example, in both of the files the source code format is used.
+@node Dependencies
+@section Autodist dependency support
+
+Autodist support dependencies for 'Makefile.ad' and 'configure.ad' files.
+When these files are edited, they are processed by Autodist automatically
+when the source tree is compiled with 'make'. This makes development in
+the source tree easier, when Autodist does not have to be run manually.
+The dependencies can be disabled by using 'AD_DISABLE_DEPENDENCIES' macro
+in the 'configure.ad' file.
+
+When editing 'configure.ad' fragments the modifcation is detected when the
+source tree is compiled with 'make' from the top source directory.
+Giving 'make' in a subdirectory will not detect a change in 'configure.ad'
+fragment.
+
+Dependencies are present only in the prepared source tree. They are not
+delivered to created distribution, as they depend on 'Makefile.ad' and
+'configure.ad' files which are not present in the created distribution.
+Autodist automatically removes the dependencies when the distribution is
+created.
+
+
@node Invoking Autodist
@chapter Invoking Autodist
default distribution 'default', then exits.
@item -p
-@itemx --process <src> <dst>
-process file <src> into <dst> for distribution, only non-source files can
-be processed with -p.
+@itemx --process <type> <src> <dst>
+Process file <src> into <dst> for distribution, <type> is 'makefile',
+'configure', 'non-source' or 'source' and defines the type of <src>,
+then exits.
@item -m
@itemx --makedist
define _DIST_NOMAD
define _DIST_NOMAD_LIB
undef _DIST_CRYPTO
+pre-dist-hook nomad-pre-dist-hook
@end example
@example
autodist libfoozbar 1.0.5
makedist
-autodist nomad 2.0
+Nomad has also an RPM .spec file that you have written and a pre-dist-hook
+that will replace the RPM release version with sed tool with the one you
+give as extra parameter to autodist:
+
+autodist nomad 2.0 0.fc7
makedist
@end example
-The end results are: 'libfoozbar-1.0.5.tar.gz' and 'nomad-2.0.tar.gz'.
+The end results are: 'libfoozbar-1.0.5.tar.gz' and 'nomad-2.0.tar.gz', and
+the RPM will have a release version '0.fc7' when you compile the RPM. Any
+extra parameter that you pass to autodist will be delivered to your hook
+scripts.
@page
@contents