All Projects → tj → Mmake

tj / Mmake

Mmake is a small program which wraps make to provide additional functionality, such as user-friendly help output, remote includes, and eventually more. It otherwise acts as a pass-through to standard make.

Programming Languages

go
31211 projects - #10 most used programming language
ruby
36898 projects - #4 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Mmake

makesure
Simple task/command runner with declarative goals and dependencies
Stars: ✭ 230 (-85.56%)
Mutual labels:  task-runner, build-tool, make, build-system
Reggae
Build system in D, Python, Ruby, Javascript or Lua
Stars: ✭ 141 (-91.15%)
Mutual labels:  makefile, build-tool, build-system, make
Mask
🎭 A CLI task runner defined by a simple markdown file
Stars: ✭ 495 (-68.93%)
Mutual labels:  makefile, build-tool, make, task-runner
Task
A task runner / simpler Make alternative written in Go
Stars: ✭ 4,282 (+168.8%)
Mutual labels:  makefile, build-tool, make, task-runner
Zeus
An Electrifying Build System
Stars: ✭ 176 (-88.95%)
Mutual labels:  makefile, build-tool, make
Ygor
Task toolkit. For when `npm run` isn't enough and everything else is too much.
Stars: ✭ 69 (-95.67%)
Mutual labels:  build-tool, make, task-runner
Build Harness
🤖Collection of Makefiles to facilitate building Golang projects, Dockerfiles, Helm charts, and more
Stars: ✭ 236 (-85.19%)
Mutual labels:  makefile, build-tool, build-system
rote
Automate everything.
Stars: ✭ 66 (-95.86%)
Mutual labels:  task-runner, build-tool, build-system
alfred
(v0.2) Even Batman needs a little help. Task runner. Automator. Build system.
Stars: ✭ 62 (-96.11%)
Mutual labels:  task-runner, build-tool, build-system
Realize
Realize is the #1 Golang Task Runner which enhance your workflow by automating the most common tasks and using the best performing Golang live reloading.
Stars: ✭ 4,162 (+161.27%)
Mutual labels:  build-tool, build-system, task-runner
Erlang.mk
A build tool for Erlang that just works.
Stars: ✭ 538 (-66.23%)
Mutual labels:  makefile, build-tool, build-system
Foy
A simple, light-weight and modern task runner for general purpose.
Stars: ✭ 157 (-90.14%)
Mutual labels:  build-tool, make, task-runner
Arduino Cmake Ng
CMake-Based framework for Arduino platforms
Stars: ✭ 123 (-92.28%)
Mutual labels:  build-tool, build-system, make
make
The Ultimate Makefile to compile all your C, C++, Assembly and Fortran projects
Stars: ✭ 41 (-97.43%)
Mutual labels:  build-tool, make, build-system
Pi Builder
Extensible tool to build Arch Linux ARM for Raspberry Pi on x86_64 host using Docker
Stars: ✭ 31 (-98.05%)
Mutual labels:  makefile, build-tool, build-system
Cargo Make
Rust task runner and build tool.
Stars: ✭ 895 (-43.82%)
Mutual labels:  build-tool, make, task-runner
Walk
A fast, general purpose, graph based build and task execution utility.
Stars: ✭ 108 (-93.22%)
Mutual labels:  build-tool, build-system, make
Sake Core
Sake's core interface.
Stars: ✭ 78 (-95.1%)
Mutual labels:  build-tool, make
Projectbuilder
A tool for easy automating and customizing build process for Unity.
Stars: ✭ 80 (-94.98%)
Mutual labels:  build-tool, build-system
Make Docker Command
Seamlessly execute commands (composer, bower, compass) in isolation using docker and make.
Stars: ✭ 82 (-94.85%)
Mutual labels:  makefile, make

Modern Make

About

Mmake is a small program which wraps make to provide additional functionality, such as user-friendly help output, remote includes, and eventually more. It otherwise acts as a pass-through to standard make.

Installation

Via gobinaries.com:

$ curl -sf https://gobinaries.com/tj/mmake/cmd/mmake | sudo sh

Build from source:

$ go get github.com/tj/mmake/cmd/mmake

Homebrew:

$ brew tap tj/mmake https://github.com/tj/mmake.git
$ brew install tj/mmake/mmake

Next add the following alias to your profile:

alias make=mmake

Features

Help output

Make's primary function is not to serve as a "task runner", however it's often used for that scenario due to its ubiquitous nature, and if you're already using it, why not! Make is however lacking a built-in mechanism for displaying help information.

Here's an example Makefile:

# Start the dev server.
#
# Note that the API server must
# also be running.
start:
	@gopherjs -m -v serve --http :3000 github.com/tj/docs/client
.PHONY: start

# Start the API server.
api:
	@go run server/cmd/api/api.go
.PHONY: api

# Display dependency graph.
deps:
	@godepgraph github.com/tj/docs/client | dot -Tsvg | browser
.PHONY: deps

# Display size of dependencies.
#- Any comment preceded by a dash is omitted.
size:
	@gopherjs build client/*.go -m -o /tmp/out.js
	@du -h /tmp/out.js
	@gopher-count /tmp/out.js | sort -nr
.PHONY: size

Mmake provides a help command to display all target comments in short form:

$ alias make=mmake
$ make help

  start      Start the dev server.
  api        Start the API server.
  deps       Display dependency graph.
  size       Display size of dependencies.

You can optionally filter which commands to view the help dialogue for (this supports standard Unix glob patterns):

$ make help start

  start   Start the dev server.

$ make help s*

  size    Display size of dependencies.
  start   Start the dev server.

The help command also supports displaying longer output with the verbose flag (-v / --verbose):

$ make help -v start

  Start the dev server.

  Note that the API server must
  also be running.

$ make help -v

  start:
    Start the dev server.

    Note that the API server must
    also be running.

  api:    
    Start the API server.

  deps:       
    Display dependency graph.

  size:
    Display size of dependencies.
    

The default behaviour of Make is of course preserved:

$ make
serving at http://localhost:3000 and on port 3000 of any available addresses

$ make size
...

Remote includes

Includes may specify a URL (http, https, or github shortcut) for inclusion, which are automatically downloaded to /usr/local/include and become available to Make. Note that make resolves includes to this directory by default, so the Makefile will still work for regular users.

Includes are resolved recursively. For example you may have a standard set of includes for your team to run tests, lint, and deploy:

include github.com/apex/make/deploy
include github.com/apex/make/lint
include github.com/apex/make/test
include https://github.com/apex/make/test/Makefile
include https://github.com/apex/make/test/make.mk

This can be a lot to remember, so you could also provide a file which includes the others:

include github.com/apex/make/all

If the given repository contains an index.mk file, you can just declare:

include github.com/apex/make

Or perhaps one per dev environment such as Node or Golang:

include github.com/apex/make/node
include github.com/apex/make/golang

If you're worried about arbitrary code execution, then simply fork a project and maintain control over it.

Update

Once the remote includes are downloaded to /usr/local/include, mmake will not try to fetch them again. In order to get an updated copy of the remote includes, mmake provides an update target that will download them again:

$ make update

Registry

If you're looking to find or share makefiles check out the Wiki, and feel free to add a category if it is missing.

Links

Badges

GoDoc


tjholowaychuk.com  ·  GitHub @tj  ·  Twitter @tjholowaychuk

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].