2 releases

0.1.1 Oct 7, 2019
0.1.0 Sep 26, 2019

#577 in Build Utils

MIT license

8KB
83 lines

makectl Build Status Docs badge Crate version

Generate and Manage targets in your makefiles.

Makectl is a command line tool to generate and manage general use targets in your makefiles.

Features

  • Generates Makefiles and manages existing ones
  • Provides a repository with templates for general use targets
  • Does not break your custom targets

Example

In a folder, lets say you have a Makefile

.PHONY run

run:
    my_awesome_script --options

...

Now you may want to add some general use targets to reuse in your project, for example, everyone needs a target to clean up .pyc files in a Python project.

$ makectl add --template=python-clean
... Reading templates database from github.io/makectl...
... Building templates 
... Aplying new target `clean-pyc` to `./Makefile` 

The end result will be:

.PHONY run clean-pyc

run:
    my_awesome_script --options

# MAKECTL MANAGED BLOCK INIT

clean-pyc:
	@find ./ -name '*.pyc' -exec rm -f {} \;
	@find ./ -name 'Thumbs.db' -exec rm -f {} \;
	@find ./ -name '*~' -exec rm -f {} \;
	rm -rf .cache
	rm -rf build
	rm -rf dist
	rm -rf *.egg-info
	rm -rf htmlcov
	rm -rf .tox/
	rm -rf docs/_build

# MAKECTL MANAGED BLOCK END

The templates database is a folder under this repo with .template files in it.

Dependencies

~2.6–4MB
~66K SLoC

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy