Show definitions of Makefile targets in the terminal before running them.
./makeshow.py
# Will show usage instructions and print a list of all targets found in the Makefile in the current folder.
./makeshow.py target1
# Will print the definition of Makefile target "target1".
./makeshow.py target1 target2 ... targetN
# Will print the definitions of Makefile targets 1 to N.
./makeshow.py --show_dependencies target1
# Will print the definition of Makefile target "target1" and its dependencies, e.g. targets 3, 5 and 17.
./makeshow.py isort_check isort_fix
Output:
isort_check:
$(call header,"[make isort_check]")
@isort --settings-path ./pyproject.toml --diff --color --check-only $(PYTHON_FILES_AND_FOLDERS)
isort_fix:
$(call header,"[make isort_fix]")
@isort --settings-path ./pyproject.toml $(PYTHON_FILES_AND_FOLDERS)
./makeshow.py unknown_target
Output:
Target 'unknown_target' not found in Makefile.