I prefer a help rule in the Makefile, like so: help: @grep -P &#...
source link: https://news.ycombinator.com/item?id=11939200
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
I prefer a help rule in the Makefile, like so: help: @grep -P '^[a-zA-Z_-]+:.*?#...
help:
@grep -P '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
Assuming that the trimmed Makefile read: build: ## Build the binary
clean: ## Clean the binary and intermediate files
distclean: clean ## Clean dependencies, intermediate files and binary
deps: ## Install dependencies
all: deps build ## Get dependencies and build binary
release: distclean all ## distclean + all
Now issuing make help would display: all Get dependencies and build binary
build Build the binary
clean Clean the binary and intermediate files
deps Install dependencies
distclean Clean dependencies, intermediate files and binary
release distclean + all
Recommend
-
3
Grep with LuceneTL;DRWhat if grep supported the functionality of a proper search engine like Elasticsearch without a need to install any servers...
-
2
Git Grep Like a Pro: The Complete Guide ...
-
9
Do climat...
-
5
The medical test paradox: Can redesigning Bayes rule help?330,221 views•Dec 22, 202023K145ShareSave
-
1
Can you help me make a mail rule to trash spam?
-
90
Feature comparison of ack, ag, git-grep, GNU grep and ripgrep There are many greplike tools available to choose from. ripgrep is currently the fastest, which folks seem to focus on, but they have different features. Here's...
-
87
Run grep asynchronously, show search results in real-time based on user input, support searching the entire project, searching loaded files or only searching current file
-
106
FlyGrep.vim - Fly grep in vim
-
71
helm-git-grep - helm for git grep
-
11
A Hardware Accelerated Regular Expression Matcher Manish Burman Brandon Kase SUMMARY We successfully created a parallel regular expression matcher using CUDA for GPUs. Our implemen...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK