New makedist with new Makefile

Posted on 2007-04-16 23:47:47 EEST.

I just commited new Makefile for Midgard so releases, nightly builds or any other quick snapshots should be build much much easier now.

The main idea is to use custom make command and define ( and export variables ) using command line or simple helper script. In our case makedist is a helper.

makedist

It has two approaches:

  • define variables with default values

    MIDGARD_RELEASE_VERSION=$1 MIDGARD_MAKEDIST_ROOT=$PWD MIDGARD_CORE_PREFIX="/usr/local" MIDGARD_ALL_IN_ONE_PKG="Midgard_AllinOne-${MIDGARD_RELEASE_VERSION}" MIDGARD_ALL_IN_ONE_DIR="${PWD}/${MIDGARD_ALL_IN_ONE_PKG}"

  • define release version

It can be set as makedist argument, but if ommited, version is determined from midgard-core configure.in.

Examples:

./makedist 1.9.1

In such case we force version number.

./makedist

And here we set every package version to this one found in :

AC_INIT([midgard-core],[1.9.0alpha1])

make

Typical Makefile, but more flexible for daily builds.

Examples:

Build midgard-core:

make midgard-core

Build midgard-php and remove files

make midgard-php
make midgard-php-clean

Build midgard-apache and Midgard_AllinOne package, clean AllinOne dir

make all-in-one-dir
make midgard-apache
make all-in-one-dir-bzip
make all-in-one-dir-clean

Not a big deal , but there is no need to write additional build scripts for different purposes. Now it should be easy to write only very simple helper script and call make with needed arguments.

Back

Layout Copyright © 2006 Finnish Teleservice Center Ltd Oy - Site Powered by Midgard CMS