README 2.7 KB

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