summaryrefslogtreecommitdiff
path: root/HACKING/build-system.md
blob: 93770cc29efe569110ac1bf6cb4328db70b4f44c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
The build system is built around an automake-like system for GNU Make
that I wrote.  It is documented in `automake.txt`.  It provides all of
the standard targets and such; you tell it what to do by setting a
series of `am_whatever` variables.  I'm just going to call it
"automake" here.

I also hook into non-exposed parts of automake with a couple of
`_am_whatever` variables.  Hopefully I will come up with good ways to
expose the needed functionality in the future.

There are a couple of variables that get automatically set from git.
This happens by `include`ing a hidden makefile that sets them; if
`$(topsrcdir)/.git` exists, it knows to use git to generate it;
otherwise it expects the file to exist:

| variable           | file                                   |
|--------------------+----------------------------------------|
| srcfiles           | $(srcdir)/.srcfiles.mk                 |
| LIBRETOOLS_VERSION | $(topsrcdir)/.srcversion-libretools.mk |
| LIBRETOOLS_COMMIT  | $(topsrcdir)/.srcversion-libretools.mk |
| DEVTOOLS_VERSION   | $(topsrcdir)/.srcversion-devtools.mk   |
| DEVTOOLS_COMMIT    | $(topsrcdir)/.srcversion-devtools.mk   |

`srcfiles` basically becomes `am_src_files`.