1
0
forked from MTSR/mapserver

proper go:generate

This commit is contained in:
NatureFreshMilk 2019-02-13 14:42:53 +01:00
parent dc056e7e9c
commit 504bc4f424
2 changed files with 7 additions and 5 deletions

View File

@ -10,20 +10,20 @@ all: build
$(OUT_DIR):
mkdir $@
test: $(STATIC_VFS) $(OUT_DIR)
test: $(OUT_DIR)
go generate
go build
$(ENV) go test ./...
clean:
rm -rf $(STATIC_VFS)
rm -rf $(OUT_DIR)
$(STATIC_VFS):
go run github.com/mjibson/esc -o vfs/static.go -prefix="static/" -pkg vfs static
build-docker:
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
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

View File

@ -12,6 +12,8 @@ import (
"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() {
//Parse command line