Keywords: make+, make, automake, autoconf, rpm, deb, dpkg, package

Chapter 4. Converting a package to use make+
Prev |  |

## Chapter 4. Converting a package to use make+

Converting a package to use make+ is simple in principle. Step one is to create a file called `Makefile+` and place it in the top level directory of your package. Step two is to remove whatever existing build system you were using before - `Makefile`, `configure.in`, `config.*`, `Makefile.am` and so on. Of course step two is optional!

make+ comes with a handy shell script called make+-skeleton which can help you to create your `Makefile+` file. You should run this in the top-level directory of your package. A typical interaction will go like this:

    $ make+-skeleton

    What is the name of your package? foo

    Now I'm going to ask you for the initial version number for this
    package. Version numbers have two parts: the MAJOR part and the
    MINOR part.

    The MAJOR part is a single number (eg 3). It is used (for example)
    for versioning libraries.

    The MINOR part is two numbers separated by a single DOT (eg 1.0)
    This is the incremental release of the library.

    If you library is version 3.1.0 then the MAJOR part would be
      3
    and the MINOR part would be
      1.0

    What is the MAJOR part of the version? 0
    What is the MINOR part of the version? 0.1

    I've written a Makefile+ file for you. You'll need to edit this file.
    Start by searching for all the 'XXX's and replacing them as necessary.

This creates the initial `Makefile+` for a package called `foo` at version 0.0.1. The `Makefile+` file will start like this:

Example 4.1. `Makefile+` skeleton file

    # -*- Makefile -*-
    #
    # This is a make+ file. Make+ is a set of scripts which enhance GNU
    # make and let you build RPMs, and other package types with just one
    # control file.  To build this package you will need to download make+
    # from this site: http://www.annexia.org/freeware/makeplus/

    PACKAGE         := foo
    VERSION_MAJOR   := 0
    VERSION_MINOR   := 0.1
    VERSION         := $(VERSION_MAJOR).$(VERSION_MINOR)

    SUMMARY         := XXX A ONE LINE SUMMARY OF YOUR PACKAGE
    COPYRIGHT       := XXX ONE LINE COPYRIGHT OR LICENSE
    AUTHOR          := XXX YOUR NAME AND EMAIL ADDRESS

Your first step should be to edit this file, search through for `XXX` and replace these as desired. (The following sections will help you to write each part of the file).

You should familiarise yourself with the theory of operation of make+ too, particularly remembering that the `Makefile+` rules are run in the build subdirectory, not in the source directory.

## Configuration

Prev | Up |
Installing | Home |