GithubHelp home page GithubHelp logo

connorbach / makectl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rochacbruno/makectl

0.0 1.0 0.0 32 KB

WIP - Generate and Manage targets in your makefiles.

Home Page: https://crates.io/crates/makectl

License: MIT License

Rust 100.00%

makectl's Introduction

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.