|
1 INTRODUCTION |
|
2 |
|
3 make.py (and the pymake modules that support it) are an implementation of the make tool |
|
4 which are mostly compatible with makefiles written for GNU make. |
|
5 |
|
6 PURPOSE |
|
7 |
|
8 The Mozilla project inspired this tool with several goals: |
|
9 |
|
10 * Improve build speeds, especially on Windows. This can be done by reducing the total number |
|
11 of processes that are launched, especially MSYS shell processes which are expensive. |
|
12 |
|
13 * Allow writing some complicated build logic directly in Python instead of in shell. |
|
14 |
|
15 * Allow computing dependencies for special targets, such as members within ZIP files. |
|
16 |
|
17 * Enable experiments with build system. By writing a makefile parser, we can experiment |
|
18 with converting in-tree makefiles to another build system, such as SCons, waf, ant, ...insert |
|
19 your favorite build tool here. Or we could experiment along the lines of makepp, keeping |
|
20 our existing makefiles, but change the engine to build a global dependency graph. |
|
21 |
|
22 KNOWN INCOMPATIBILITIES |
|
23 |
|
24 * Order-only prerequisites are not yet supported |
|
25 |
|
26 * Secondary expansion is not yet supported. |
|
27 |
|
28 * Target-specific variables behave differently than in GNU make: in pymake, the target-specific |
|
29 variable only applies to the specific target that is mentioned, and does not apply recursively |
|
30 to all dependencies which are remade. This is an intentional change: the behavior of GNU make |
|
31 is neither deterministic nor intuitive. |
|
32 |
|
33 * $(eval) is only supported during the parse phase. Any attempt to recursively expand |
|
34 an $(eval) function during command execution will fail. This is an intentional incompatibility. |
|
35 |
|
36 * There is a subtle difference in execution order that can cause unexpected changes in the |
|
37 following circumstance: |
|
38 ** A file `foo.c` exists on the VPATH |
|
39 ** A rule for `foo.c` exists with a dependency on `tool` and no commands |
|
40 ** `tool` is remade for some other reason earlier in the file |
|
41 In this case, pymake resets the VPATH of `foo.c`, while GNU make does not. This shouldn't |
|
42 happen in the real world, since a target found on the VPATH without commands is silly. But |
|
43 mozilla/js/src happens to have a rule, which I'm patching. |
|
44 |
|
45 * pymake does not implement any of the builtin implicit rules or the related variables. Mozilla |
|
46 only cares because pymake doesn't implicitly define $(RM), which I'm also fixing in the Mozilla |
|
47 code. |
|
48 |
|
49 ISSUES |
|
50 |
|
51 * Speed is a problem. |
|
52 |
|
53 FUTURE WORK |
|
54 |
|
55 * implement a new type of command which is implemented in python. This would allow us |
|
56 to replace the current `nsinstall` binary (and execution costs for the shell and binary) with an |
|
57 in-process python solution. |
|
58 |
|
59 AUTHOR |
|
60 |
|
61 Initial code was written by Benjamin Smedberg <benjamin@smedbergs.us>. For future releases see |
|
62 http://benjamin.smedbergs.us/pymake/ |
|
63 |
|
64 See the LICENSE file for license information (MIT license) |