Make-lib
Introduction
The make-lib would probably only be useful to you if you want to work with the source code of any of the projects coming from reahl.org.
It is a selection of chunks of make files used in-house to compose the makefile for a particular project.
Using make-lib
If you need to work with the source of any project which has a makefile that makes use of make-lib, you will need to create a working directory of sorts for projects. (Say, ~/work, for example.)
Then, unzip/untar/check out or do whatever necessary to get the contents of make-lib into a subdirectory of your working directory. The subdirectory should be called 'make-lib'.
You can now put the make-lib dependent projects in sibling directories of make-lib. Their makefiles look for make-lib in '../make-lib'.
How it works
Make-lib is a selection of makefile chunks, each with particular functionality which may be combined with other chunks. For example, there's 'setuptools.mk' which contains targets written for projects that make use of Python's setuptools. There's also a 'unittest.mk' for projects using Python's standard unittest testing framework.
A project using make-lib would get a makefile which is composed of all the necessary makefile chunks in make-lib. The makefile for a typical pure Python project would look like this:
include ../make-lib/header.mk include ../make-lib/setuptools.mk include ../make-lib/setuptools.tofu.mk include ../make-lib/tla.mk include ../make-lib/release.mk
Provided targets and chunks
header.mk
This makefile should always be included, and always be the first to be included. It basically is a safe-guard against running make without arguments.
setuptools.mk
This makefile provides targets for projects that have a setup.py which uses setuptools. It provides targets:
- clean
- build
- install
- debianize (should be used once only)
- tar
- egg
- develop (does setup.py develop with the 'right dirs')
unittest.mk
The unittest.mk file provides the following targets for projects using unittest-based tests:
- test (runs all tests)
- %Tests (runs tests in specified file)
- %TestsDebug (runs tests in specified file under pdb)
setuptools.tofu.mk
Targets for projects using both Tofu and setuptools.
- tofu (runs all tests)
- debug (runs all tests under pdb)
- cover (runs all tests under trace, generating coverage stats)
tla.mk
Targets for dealing with GNU arch.
- loc (computes lines of code)
- diff (like tla changes --diffs)
- %.index (prints a summary of specified file)
- tla (inserts standard stuff into {arch}/=tagging-method)
