• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

pymake/H01-Sep-2019-5,7694,360

tests/H01-Sep-2019-3,4792,424

LICENSEH A D01-Sep-20191.1 KiB2217

READMEH A D01-Sep-20192.7 KiB6543

make.pyH A D01-Sep-2019967 3624

mkformat.pyH A D01-Sep-2019237 148

mkparse.pyH A D01-Sep-2019222 139

README

1INTRODUCTION
2
3make.py (and the pymake modules that support it) are an implementation of the make tool
4which are mostly compatible with makefiles written for GNU make.
5
6PURPOSE
7
8The 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
22KNOWN 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
49ISSUES
50
51* Speed is a problem.
52
53FUTURE WORK
54
55* implement a new type of command which is implemented in python. This would allow us
56to replace the current `nsinstall` binary (and execution costs for the shell and binary) with an
57in-process python solution.
58
59AUTHOR
60
61Initial code was written by Benjamin Smedberg <benjamin@smedbergs.us>. For future releases see
62http://benjamin.smedbergs.us/pymake/
63
64See the LICENSE file for license information (MIT license)
65