-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
50 lines (42 loc) · 1.25 KB
/
Makefile
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
.PHONY: help
## help: prints this help message
help:
@echo "Usage: \n"
@sed -n 's/^##//p' ${MAKEFILE_LIST} | column -t -s ':' | sed -e 's/^/ /'
.PHONY: clean
## clean: remove all generated files
clean:
@echo "Cleaning generated files..."
@rm -r -f output search_index search_index_temp
.PHONY: run-genblog
## run-genblog: run genblog, copy static files
run-genblog:
@genblog
.PHONY: build-generator
## build-generator: build the generator
build-generator:
@echo "Building generator..."
@cd generator && go build -o ../bin/generator
.PHONY: run-generator
## run-generator: run the generator
run-generator:
@echo "Running generator..."
@./bin/generator
.PHONY: build
## build: build & run generator
build: build-generator run-generator
.PHONY: watch
## watch: watch for changes and rebuild
watch:
@echo "Watching for file changes..."
@fswatch -or -e "output" -e ".git" . | xargs -n1 sh -c "genblog; cp -R _static/ output/"
.PHONY: photographer-build
## photographer-build: build the photographer
photographer-build:
@echo "Building photographer..."
@cd photographer && go build -o ../bin/photographer
.PHONY: photographer
## photographer: run the photographer
photographer: photographer-build
@echo "Running photographer..."
@./bin/photographer $(arguments)