Changes between Version 6 and Version 7 of pm-config-header


Ignore:
Timestamp:
May 31, 2011 11:20:59 AM (9 years ago)
Author:
stefan
Comment:

small changes in config header mess

Legend:

Unmodified
Added
Removed
Modified
  • pm-config-header

    v6 v7  
    1818
    1919The logic which of the four header files to include in which situation is implemented in a fifth header file ''Prjct''{{{Config.h}}}. None of the {{{config*.h}}} files should ever be included (directly) in any source code (internal or external to the project), but the file ''Prjct''{{{Config.h}}} should be include instead.
    20 In an autotools build of the project itself, the file {{{config.h}}} will be included (through inclusion in ''Prjct''{{{Config.h}}}). When someone builds against the library exported by a project after it has been installed, then ''Prjct''{{{Config.h}}} will be a copy of the public header {{{config_}}}''prjct''{{{.h}}} and will be included instead. Further, in a non-autotools based setup, ''Prjct''{{{Config.h}}} will include either {{{config_default.h}}} or {{{config_}}}''prjct''{{{_default.h}}} (as appropriate for internal building versus external linking).
    21 The distinction is made by two defines that may be specified as arguments to the compiler command line to distinguish between building and linking.
     20In an autotools build of the project itself, the file {{{config.h}}} will be included (through inclusion in ''Prjct''{{{Config.h}}}). When someone builds against the library exported by a project after it has been installed, then ''Prjct''{{{Config.h}}} will be a copy of the public header {{{config_}}}''prjct''{{{.h}}} and will be included instead. Further, in a non-autotools based setup, ''Prjct''{{{Config.h}}} will include either {{{config_default.h}}} or {{{config_}}}''prjct''{{{_default.h}}} (as appropriate for internal versus external building).
     21The distinction is made by two defines that may be specified as arguments to the compiler command line to distinguish between building the project itself or building another code against this project.
    2222In an autotools setup with configuration header files, the symbol {{{HAVE_CONFIG_H}}} is always defined. Further, the symbol ''Prjct''{{{_BUILD}}} is defined whenever a file belonging to project ''Prjct'' is built.
    2323
     
    115115#endif
    116116}}}
    117 and the private header file is {{{config_default.h}}} is
     117and the private header file {{{config_default.h}}} is
    118118{{{
    119119/* include the COIN-OR-wide system specific configure header */
     
    148148#endif
    149149}}}
    150 Since both files need to be setup by the user, here the private header includes the public header to avoid redundancy. Further, a header {{{configall_system.h}}} is included that tries to provide commonly used defines. Note that file '''config_coinutils.h''' is installed as '''!CoinUtilsConfig.h''' for use by external users linking to the !CoinUtils library after the fact. This occurs by addition of the following lines to {{{src/Makefile.am}}}:
     150Since both files need to be setup by the user, here the private header includes the public header to avoid redundancy. Further, a header {{{configall_system.h}}} is included that tries to provide commonly used defines.
    151151
     152Note that the file '''config_coinutils.h''' is installed as '''!CoinUtilsConfig.h''' for use by users building against the !CoinUtils library. This functionality is implemented by the following lines in {{{src/Makefile.am}}}:
    152153{{{
    153154ConfigHeader = CoinUtilsConfig.h