Changes between Version 11 and Version 12 of pm-autotools


Ignore:
Timestamp:
May 31, 2006 11:44:19 PM (14 years ago)
Author:
andreasw
Comment:

minor corrections

Legend:

Unmodified
Added
Removed
Modified
  • pm-autotools

    v11 v12  
    2929== The Makefile.am Files ==
    3030
    31 The Makefiles are generated by {{{automake}}} based on {{{Makefile.am}}} input files.  Those usually contain information on what is to be compiled (e.g., program, library) and what source files are required for each, where things should be installed. etc.  One can also add regular Makefile rules that will copied verbatim into the final Makefile.
     31The Makefiles are generated by {{{automake}}} based on {{{Makefile.am}}} input files.  Those usually contain information on what is to be compiled (e.g., program, library) and what source files are required for each, where things should be installed. etc.  One can also add regular Makefile rules that will copied verbatum into the final Makefile.
    3232
    3333In a typical COIN project we have a number of different types of {{{Makefile.am}}}, depending on what the purpose of the corresponding directory is:
    3434
    35  * '''Base directory Makefile.am''':   Even though this generates the only Makefile a user will usually work with, it is very simple.  It mainly defines, which subdirectories {{{make}}} should recurse into, and it typically define additional targets, such as {{{tests}}} which runs {{{make test}}} in all subdirectories that have tests.  [wiki:pm-base-make The Makefile.am for the package base directory is discussed here].
     35 * '''Base directory Makefile.am''':   Even though this generates the only Makefile a user will usually work with, it is very simple.  It mainly defines, into which subdirectories {{{make}}} should recurse, and it typically defines additional targets, such as {{{tests}}} which runs {{{make test}}} in all subdirectories that have tests.  [wiki:pm-base-make The Makefile.am for the package base directory is discussed here].
    3636
    37  * '''Project main directory Makefile.am''':  In each projects main directory (the subdirectories under the base directory, such as {{{Cpl}}} and {{{CoinUtils}}} in the [wiki:user-directories directory structure example] is the Makefile that takes care of project specific main things, such defining how {{{make test}}} is run, what extra files are to be included in a tarball created by {{{make dist}}}.  It also knows, into which source code directories {{{make}}} should recurse in order to build everything that project has to provide.  [wiki:pm-project-make The main Makefile.am for a project is discussed here].
     37 * '''Project main directory Makefile.am''':  In each projects main directory (the subdirectories under the base directory, such as {{{Cpl}}} and {{{CoinUtils}}} in the [wiki:user-directories directory structure example], is the Makefile that takes care of project specific things, such defining how {{{make test}}} is run.  It also knows, into which source code directories {{{make}}} should recurse in order to build everything that the project has to provide.  [wiki:pm-project-make The main Makefile.am for a project is discussed here].
    3838
    3939 * '''Source code directory Makefile.am files''': This is where the real stuff happens.  Here one specifies what is to be built, what source files are required for this, where (and whether) the compiled files are to be installed.  [wiki:pm-source-make The Makefile.am files for the source code directories are discussed here].
     
    4545== Running the Autotools ==
    4646
    47 You can run the Autotools in your project by going into the package's base directory ({{{Coin-Clp}}} in the directory structure example), and run the '''BuildTools/run_autotools''' script.  This script will copy the required auxilliary files into the base directory, and run the tools for every {{{configure.ac}}} file that is found in the base directory and its subdirectories.
     47You can run the Autotools in your project by going into the package's base directory ({{{Coin-Clp}}} in the [wiki:user-directories directory structure example]), and run the '''BuildTools/run_autotools''' script.  This script will copy the required auxilliary files into the base directory, and run the tools for every {{{configure.ac}}} file that is found in the base directory and its subdirectories.
    4848
    49 Once you have a working version of your package and you can run {{{make}}}, you should (re)run the {{{configure}}} script with the '''--enable-maintainer-mode''' flag.  This will activate a number of Makefile rules that make the maintainance of the configuration and Makefiles easy.  When you now edit one of the {{{configure.ac}}} or {{{Makefile.am}}} files, the corresponding autotool program is run, if requires, the {{{configure}}} script will be rerun, so that everything is always up-to-date.  Also, for COIN, when the {{{Externals}}} file, which contains the definitions of the subversion externals, has changed, the Makefile will automatically update the subversion {{{svn:externals}}} property of the base directory.
     49Once you have a working version of your package and you can run {{{make}}}, you should (re)run the {{{configure}}} script with the '''--enable-maintainer-mode''' flag.  This will activate a number of Makefile rules that make the maintainance of the configuration and Makefiles easy.  When you now edit one of the {{{configure.ac}}} or {{{Makefile.am}}} files, the corresponding autotool program is run. If necessary, the {{{configure}}} script will be rerun, so that everything is always kept up-to-date.  Also, for COIN, when the {{{Externals}}} file, which contains the definitions of the subversion externals, has changed, the Makefile will automatically update the subversion {{{svn:externals}}} property of the base directory.
    5050
    5151A few notes of caution:
    5252
    53  * If you made a mistake in the {{{configure.ac}}} or {{{Makefile.am}} input file, the {{{make}}} for updating everything might fail.  In some cases it is then require to rerun the autotools by hand, using the {{{BuildTools/run_autotools}}} script.
     53 * If you made a mistake in the {{{configure.ac}}} or {{{Makefile.am}}} input file, the {{{make}}} for updating everything might fail.  In some cases it is then require to rerun the autotools by hand, using the {{{BuildTools/run_autotools}}} script.
    5454
    55  * When you made a change in a {{{configure.ac}}} file, the {{{configure}}} script is rerun, but not recursively.  If the change you made would now require the recursion into a new directory, you will have to rerun the {{{configure}}} script by hand.  To find out, with which options the {{{configure}}} script was run the last time, you can look at the beginning of the {{{config.log}}} output file.  Make sure that you don't use the {{{--no-create}}} and {{{--no-recursion}}} option.
     55 * When you made a change in a {{{configure.ac}}} file, a {{{make}}} will rerun the {{{configure}}} script (if you configured in the maintainer-mode), but not recursively.  If the change you made now requires the recursion into a new directory, you will have to rerun the {{{configure}}} script by hand.  To find out, with which options the {{{configure}}} script was run the last time, you can look at the beginning of the {{{config.log}}} output file.  Make sure that you don't use the {{{--no-create}}} and {{{--no-recursion}}} option when you rerun the script.
    5656
    5757 * The Makefiles will update the {{{svn:externals}}} when the {{{Externals}}} file has changed, but it will not automatically run a {{{svn update}}} to get any new external (to avoid unwanted conflicts).  If you want to get the code for a new external, you need to run {{{svn update}}} by hand.
     58
     59== Which Files Should be in the Subversion Repository ==
     60
     61The following files should be included in the subversion repository:
     62
     63 * Every '''configure.ac''', '''configure''', '''Makefile.am''' and '''Makefile.in''' file, but no {{{Makefile}}} file.  Make sure, that the {{{svn:keywords}}} property for the {{{configure.ac}}} and {{{Makefile.am}}} files are set to "{{{Author Date Id Revision}}}".
     64
     65 * In the base directory of the package, you also need to include: {{{config.guess}}}, {{{config.sub}}}, {{{depcomp}}}, {{{install-sh}}}, {{{ltmain.sh}}}, and {{{missing}}}.  Those files will be copied into this directory automatically when you run {{{BuildTools/run_autotools}}} there.
     66
     67 * You should also make sure that you have a subversion external dependency define to {{{BuildTools/trunk}}} into a subdirectory {{{BuildTools}}} of the package's base directory, since otherwise the Autotools will not work.