DevOps Articles

Curated articles, resources, tips and trends from the DevOps World.

How to Create a Self-Documenting Makefile

4 years ago medium.com
How to Create a Self-Documenting Makefile

Summary: This is a summary of an article originally published by the source. Read the full original article here →

My new favorite way to completely underuse a Makefile? Creating personalized, per-project repository workflow command aliases that you can check in.

To do all this with a Makefile (GNU make), we use Makefile rules and recipes.

Here are some examples of things we can make easier (sorry): Now we have some command-line aliases that you can check-in!

Naturally, you need a help command: With a little command-line magic, this egrep command takes the output of MAKEFILE_LIST, sorts it, and uses awk to find strings that follow the ## pattern.

Made with pure grit © 2024 Jetpack Labs Inc. All rights reserved. www.jetpacklabs.com