diff mbox series

[v2,2/3] golang/xenlight: init xenlight go module

Message ID d3744468e8f6ce22756355a2e36b182cea7d5068.1589330383.git.rosbrookn@ainfosec.com (mailing list archive)
State Superseded
Headers show
Series initialize xenlight go module | expand

Commit Message

Nick Rosbrook May 13, 2020, 12:58 a.m. UTC
Initialize the xenlight Go module using the xenbits git-http URL,
xenbits.xenproject.org/git-http/xen.git/tools/golang/xenlight.

Also simplify the build Make target by using `go build` instead of `go
install`, and do not set GOPATH here because it is now unnecessary.

Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>
---
Changes in v2:
 - Use xenproject.org instead of xen.org in module path.
 - Undo change to XEN_GOCODE_URL; just use `go build`.
---
 tools/golang/xenlight/Makefile | 2 +-
 tools/golang/xenlight/go.mod   | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100644 tools/golang/xenlight/go.mod

Comments

George Dunlap May 13, 2020, 10:38 a.m. UTC | #1
> On May 13, 2020, at 1:58 AM, Nick Rosbrook <rosbrookn@gmail.com> wrote:
> 
> Initialize the xenlight Go module using the xenbits git-http URL,
> xenbits.xenproject.org/git-http/xen.git/tools/golang/xenlight.
> 
> Also simplify the build Make target by using `go build` instead of `go
> install`, and do not set GOPATH here because it is now unnecessary.

Glad you caught the GOPATH thing. :-)

> 
> Signed-off-by: Nick Rosbrook <rosbrookn@ainfosec.com>

Revewied-by: George Dunlap <george.dunlap@citrix.com>
diff mbox series

Patch

diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile
index 753132306a..37ed1358c4 100644
--- a/tools/golang/xenlight/Makefile
+++ b/tools/golang/xenlight/Makefile
@@ -33,7 +33,7 @@  $(XEN_GOPATH)/src/$(XEN_GOCODE_URL)/xenlight/: xenlight.go types.gen.go helpers.
 # so that it can find the actual library.
 .PHONY: build
 build: package
-	CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_XENLIGHT) -L$(XEN_LIBXENTOOLLOG)" GOPATH=$(XEN_GOPATH) $(GO) install -x $(XEN_GOCODE_URL)/xenlight
+	CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_XENLIGHT) -L$(XEN_LIBXENTOOLLOG)" $(GO) build -x
 
 .PHONY: install
 install: build
diff --git a/tools/golang/xenlight/go.mod b/tools/golang/xenlight/go.mod
new file mode 100644
index 0000000000..926474d929
--- /dev/null
+++ b/tools/golang/xenlight/go.mod
@@ -0,0 +1 @@ 
+module xenbits.xenproject.org/git-http/xen.git/tools/golang/xenlight