Skip to content

Show Makefile target definitions in the terminal before running them.

License

Notifications You must be signed in to change notification settings

johandicap/makeshow

Repository files navigation

makeshow

Show definitions of Makefile targets in the terminal before running them.

Usage

./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.

Examples

Example 1: Show definitions of two targets

./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)

Example 2: Response for an invalid target

./makeshow.py unknown_target

Output:


Target 'unknown_target' not found in Makefile.

About

Show Makefile target definitions in the terminal before running them.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published