Skip to content

Commit ad6f149

Browse files
committed
chore: clean up Makefile
1 parent 9909f65 commit ad6f149

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@ README.md: lexers/*/*.go
1212
tokentype_string.go: types.go
1313
go generate
1414

15-
chromad:
15+
.PHONY: chromad
16+
chromad: build/chromad
17+
18+
build/chromad: $(find . -name '*.go' -o -name '*.html' -o '*.css' -o '*.js')
1619
rm -rf build
1720
esbuild --bundle cmd/chromad/static/index.js --minify --outfile=cmd/chromad/static/index.min.js
1821
esbuild --bundle cmd/chromad/static/index.css --minify --outfile=cmd/chromad/static/index.min.css
19-
(export CGOENABLED=0 ; cd ./cmd/chromad && go build -ldflags="-X 'main.version=$(VERSION)'" -o ../../build/chromad .)
22+
(export CGOENABLED=0 ; go build -C cmd/chromad -ldflags="-X 'main.version=$(VERSION)'" -o ../../build/chromad .)
2023

2124
upload: build/chromad
2225
scp build/chromad root@swapoff.org: && \

0 commit comments

Comments
 (0)