Don't disable Go modules when generating varlink

From a fresh install of Fedora 33 Beta and a fresh clone of the repo, `make` fails with the following error when Go modules are disabled:

    # Only generate the varlink code on Linux (see issue #4814).
    GO111MODULE=off go generate ./pkg/varlink/...
    ../../vendor/github.com/varlink/go/cmd/varlink-go-interface-generator/main.go:12:2: cannot find package "github.com/varlink/go/varlink/idl" in any of:
    	/usr/lib/golang/src/github.com/varlink/go/varlink/idl (from $GOROOT)
    	/home/test/src/podman/_output/src/github.com/varlink/go/varlink/idl (from $GOPATH)
    pkg/varlink/generate.go:3: running "go": exit status 1
    make: *** [Makefile:646: pkg/varlink/iopodman.go] Error 1

Signed-off-by: Jordan Christiansen <xordspar0@gmail.com>
This commit is contained in:
Jordan Christiansen
2020-09-29 14:55:26 -05:00
parent 453333a35c
commit 6dccaa4f26

View File

@ -643,7 +643,7 @@ install.libseccomp.sudo:
pkg/varlink/iopodman.go: .gopathok pkg/varlink/io.podman.varlink
ifneq (,$(findstring Linux,$(shell uname -s)))
# Only generate the varlink code on Linux (see issue #4814).
GO111MODULE=off $(GO) generate ./pkg/varlink/...
$(GO) generate ./pkg/varlink/...
endif
API.md: pkg/varlink/io.podman.varlink