forked from cory/tildefriends
		
	build: Fix on OpenBSD. TIL awk.
This commit is contained in:
		
							
								
								
									
										11
									
								
								GNUmakefile
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								GNUmakefile
									
									
									
									
									
								
							| @@ -3,7 +3,7 @@ | |||||||
| MAKEFLAGS += --warn-undefined-variables | MAKEFLAGS += --warn-undefined-variables | ||||||
| MAKEFLAGS += --no-builtin-rules | MAKEFLAGS += --no-builtin-rules | ||||||
|  |  | ||||||
| ## [36;1m== Tilde Friends makefile build. ==[m | ## [36;1m== Tilde Friends build. ==[m | ||||||
| ## | ## | ||||||
| ## This is a list of all supported build targets. | ## This is a list of all supported build targets. | ||||||
| ## | ## | ||||||
| @@ -1245,9 +1245,12 @@ clean: ## Clean all generated files from the out/ directory. | |||||||
| ## Documentation: | ## Documentation: | ||||||
| ## | ## | ||||||
| help: ## Display this help message. | help: ## Display this help message. | ||||||
| 	@awk -F: ' \ | 	@awk \ | ||||||
| 	/^##/ { sub(/^##\s?/, ""); print $$0 } \ | 	-F: \ | ||||||
| 	/^\w+: .*##/ { sub(/^/, "[36;1m"); sub(/:.*##\s?/, "[m:"); printf "%-32s %s\n", $$1, $$2 } \ | 	-vG=$$(tput setaf 2) \ | ||||||
|  | 	-vR=$$(tput sgr0) ' \ | ||||||
|  | 	/^##/ { sub(/^##\s?/, ""); printf "%s%s%s\n", G, $$0, R } \ | ||||||
|  | 	/^[[:alnum:]-]+:.*##/ { sub(/:.*##\s?/, ":"); printf "%s%-20s%s %s\n", G, $$1, R, $$2 } \ | ||||||
| 	' < $(filter-out %.d,$(MAKEFILE_LIST)) | 	' < $(filter-out %.d,$(MAKEFILE_LIST)) | ||||||
| 	@echo "" # Blank line. | 	@echo "" # Blank line. | ||||||
| .PHONY: help | .PHONY: help | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user