proper go:generate
This commit is contained in:
parent
dc056e7e9c
commit
504bc4f424
@ -10,20 +10,20 @@ all: build
|
|||||||
$(OUT_DIR):
|
$(OUT_DIR):
|
||||||
mkdir $@
|
mkdir $@
|
||||||
|
|
||||||
test: $(STATIC_VFS) $(OUT_DIR)
|
test: $(OUT_DIR)
|
||||||
|
go generate
|
||||||
|
go build
|
||||||
$(ENV) go test ./...
|
$(ENV) go test ./...
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(STATIC_VFS)
|
rm -rf $(STATIC_VFS)
|
||||||
rm -rf $(OUT_DIR)
|
rm -rf $(OUT_DIR)
|
||||||
|
|
||||||
$(STATIC_VFS):
|
|
||||||
go run github.com/mjibson/esc -o vfs/static.go -prefix="static/" -pkg vfs static
|
|
||||||
|
|
||||||
build-docker:
|
build-docker:
|
||||||
sudo docker run --rm -it -v $(shell pwd)/:/app -v mapserver-volume:/root/go -w /app mapserver-builder make
|
sudo docker run --rm -it -v $(shell pwd)/:/app -v mapserver-volume:/root/go -w /app mapserver-builder make
|
||||||
|
|
||||||
build: $(STATIC_VFS) $(OUT_DIR)
|
build: $(OUT_DIR)
|
||||||
|
go generate
|
||||||
# native
|
# native
|
||||||
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-gnu-gcc go build $(GO_LDFLAGS) -o $(OUT_DIR)/mapserver-linux-x86_64
|
CGO_ENABLED=1 GOOS=linux GOARCH=amd64 CC=x86_64-linux-gnu-gcc go build $(GO_LDFLAGS) -o $(OUT_DIR)/mapserver-linux-x86_64
|
||||||
# apt install gcc-8-i686-linux-gnu
|
# apt install gcc-8-i686-linux-gnu
|
||||||
|
@ -12,6 +12,8 @@ import (
|
|||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
//go:generate sh -c "go run github.com/mjibson/esc -o vfs/static.go -prefix='static/' -pkg vfs static"
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
//Parse command line
|
//Parse command line
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user