-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (20 loc) · 781 Bytes
/
Makefile
File metadata and controls
27 lines (20 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
SHELL=/bin/bash
BUILD_DIR=build
PROJECT_NAME=make-doc ## @build Project name
DEFAULT_TARGET=$(BUILD_DIR)/$(PROJECT_NAME)
MAKEFILE_LIST = Makefile
.PHONY: clean build install help help-variables
clean: ## @build Clean stuff
rm -rf $(BUILD_DIR)
build $(DEFAULT_TARGET): ## @build Build the actual thing
mkdir -p $(BUILD_DIR)
# default build
go build -o $(DEFAULT_TARGET)
# build for specific operating systems
BUILD_DIR=$(BUILD_DIR) PROJECT_NAME=$(PROJECT_NAME) ./build.sh "linux/amd64" "darwin/amd64"
install: build ## @build Install make-doc to /usr/local/bin
sudo cp $(DEFAULT_TARGET) /usr/local/bin
help: ## @help show this help
@make-doc $(MAKEFILE_LIST)
help-variables: ## @help show makefile customizable variables
@make-doc $(MAKEFILE_LIST) --variables