From 7df49bc677586ec9a1fa5cbb69fe1177d2786db4 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Thu, 9 Aug 2018 10:36:51 -0400 Subject: Add FFJSON generation to makefile Signed-off-by: Matthew Heon Closes: #1240 Approved by: rhatdan --- Makefile | 19 +++++++++++++++++-- libpod/container_ffjson.go | 2 +- libpod/pod_ffjson.go | 2 +- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index fecf3831f..9612d5654 100644 --- a/Makefile +++ b/Makefile @@ -181,7 +181,7 @@ clientintegration: vagrant-check: BOX=$(BOX) sh ./vagrant.sh -binaries: varlink_generate podman python +binaries: varlink_generate ffjson_generate podman python test-binaries: test/bin2img/bin2img test/copyimg/copyimg test/checkseccomp/checkseccomp @@ -260,7 +260,7 @@ uninstall: .PHONY: install.tools -install.tools: .install.gitvalidation .install.gometalinter .install.md2man +install.tools: .install.gitvalidation .install.gometalinter .install.md2man .install.ffjson .install.gitvalidation: .gopathok if [ ! -x "$(GOBIN)/git-validation" ]; then \ @@ -281,6 +281,11 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man $(GO) get -u github.com/cpuguy83/go-md2man; \ fi +.install.ffjson: .gopathok + if [ ! -x "$(GOBIN)/ffjson" ]; then\ + $(GO) get -u github.com/pquerna/ffjson; \ + fi + .install.ostree: .gopathok if ! pkg-config ostree-1 2> /dev/null ; then \ git clone https://github.com/ostreedev/ostree $(FIRST_GOPATH)/src/github.com/ostreedev/ostree ; \ @@ -292,6 +297,16 @@ install.tools: .install.gitvalidation .install.gometalinter .install.md2man varlink_generate: .gopathok cmd/podman/varlink/iopodman.go varlink_api_generate: .gopathok API.md +ffjson_generate: libpod/container_ffjson.go libpod/pod_ffjson.go + +libpod/container_ffjson.go: .gopathok libpod/container.go + rm -f libpod/container_ffjson.go + ffjson $(GOPKGDIR)/libpod/container.go + +libpod/pod_ffjson.go: .gopathok libpod/pod.go + rm -f libpod/pod_ffjson.go + ffjson $(GOPKGDIR)/libpod/pod.go + .PHONY: install.libseccomp.sudo install.libseccomp.sudo: rm -rf ../../seccomp/libseccomp diff --git a/libpod/container_ffjson.go b/libpod/container_ffjson.go index d843beb48..2af9d63f5 100644 --- a/libpod/container_ffjson.go +++ b/libpod/container_ffjson.go @@ -1,5 +1,5 @@ // Code generated by ffjson . DO NOT EDIT. -// source: libpod/container.go +// source: /home/mcs/code/gopath//src/github.com/projectatomic/libpod/libpod/container.go package libpod diff --git a/libpod/pod_ffjson.go b/libpod/pod_ffjson.go index 4cdfb9318..b3012bf5f 100644 --- a/libpod/pod_ffjson.go +++ b/libpod/pod_ffjson.go @@ -1,5 +1,5 @@ // Code generated by ffjson . DO NOT EDIT. -// source: libpod/pod.go +// source: /home/mcs/code/gopath//src/github.com/projectatomic/libpod/libpod/pod.go package libpod -- cgit v1.2.3-54-g00ecf