#!wml -o Makefile
DESCRIPTIONThis include file provides an easy way to write a Makefile to distribute your own WML modules. It is inspired by the "ExtUtils::MakeMaker" Perl module.
- make all
- This is the default target. It will build all include files and their documentation.
- make install
- Install include files and documentation in the locations given by ``wml -V2''.
- make clean
- Remove files generated by make.
- make distclean
- Like make clean, plus remove the Makefile too.
- make dist
- Build a distribution. Should only be used by the module maintainer. If there is a MANIFEST file, then the list of files to include is taken from this file. Otherwise the tarball contains all source files, plus MakeMaker.wml, Makefile.wml, shtool and README if these files exist.
Overriding default targetsTo build the Makefile, all targets are put in separate buffers during pass 3, and those buffers are diverted by pass 5. You can override this defaukt target by redefining buffer contents. Buffer names are explicit:
MK_ALL MK_INSTALL MK_CLEAN MK_DISTCLEAN MK_CONFIG MK_RELEASE
Defining new targetsThe MK_USER is empty and devoted to this task.
ATTRIBUTESThe first three attributes are mandatory.
- The name of the package
- Its version number
List of modules to build and install. This is a space separated list of
filenames. Modules should reside in a sub-directory to be compliant with
actual file hierarchy. For instance, the declaration
tells that after compilation, there are two modules which are "math/log.tmpl" and "math/exp.tmpl". This modules will be installed to "LibDir/include/math/log.tmpl" and "LibDir/include/math/exp.tmpl".
These modules will then be called in a WML file by
#use tmpl::math::log #use tmpl::math::exp
Source files for these modules are obtained by replacing the suffix by .src.
- Defines an alternate suffix for the source files.
- Section number of the manual in which man files are put. Default is 3.
- Space separated list of files to include in a distribution. By default, all source files plus MakeMaker.wml, Makefile.wml, README and shtool are included in a distribution.
<write-makefile package="log" version="3.14" modules="math/log.tmpl" source-ext="exp" >
This will build the tmpl::math::log include module from the math/log.exp source file. This source file will also produce the tmpl::math::log(3) manpage.
NOTESPlease do _not_ use a ".wml" suffix for your modules, they should be reserved for official WML modules shipped with WML. You may instead put your initials or anything else.
Denis Barbier [email protected]
Internal: P1, P2, P3, P5 External: --