One of the Most important file in Python project — Makefile
A good programmer is a lazy programmer! As a developer, we always want to automize something, reduce the time of typing the long bash command, avoid spelling error…etc. Especially in some repeated tasks while developing, such as
- Install the package and setting the environment
- Check the code rule and style
- Run tests with coverage (Continuous Integration)
- Continuous deployment with Docker
In this case Makefile
(or makefile
) is your good friend!
Dockerfile is also important for the package development, see my another post.
What is a Makefile?
Makefile
is a standard file format to automate software building procedures and other complex tasks in an easy way. Actually, it just contains a list of shell commands.
It was originally created by Stuart Feldman in April 1976. But it is still very useful nowadays in software development.
Makefile structure
A makefile is usually just named exactly that, makefile
or Makefile
, and generally has the following structure:
[make code]recipe_name:
[shell code]