<commit_before>define VERSION_CMD =
eval ' \
	define=""; \
	version=`git describe --abbrev=0 --tags | tr -d "[a-z]"` ; \
	commit=`git rev-parse --verify HEAD`; \
	tagname=`git show-ref --tags | grep $$commit`; \
	if [ -n "$$tagname" ]; then \
		define=`echo $$tagname | awk -F "/" "{print \\$$NF}" | tr -d "[a-z]"`; \
	else \
		define=`printf "$$version-%.12s" $$commit`; \
	fi; \
	tainted=`git ls-files -m | wc -l` ; \
	if [ "$$tainted" -gt 0 ]; then \
		define="$${define}-tainted"; \
	fi; \
	echo "$$define" \
'
endef

define VENDOR_RUN
mv ${BUILD_TOOLS} bin || true; \
ln -s vendor src || mv vendor src; \
cd src/$1; \
(unset GOARCH; unset CC; GOPATH=$$GOPATH/src/${SKYDIVE_GITHUB} go install $1); \
cd -; \
mv bin ${BUILD_TOOLS}; \
unlink src || mv src vendor;
endef

define PROTOC_GEN
$(call VENDOR_RUN,${PROTOC_GEN_GOFAST_GITHUB})
$(call VENDOR_RUN,${PROTOC_GEN_GO_GITHUB}) protoc -Ivendor -I. --plugin=${BUILD_TOOLS}/protoc-gen-gogofaster --gogofaster_out $$GOPATH/src $1
endef

VERSION?=$(shell $(VERSION_CMD))
GO_GET:=CC= GOARCH= go get
GOVENDOR:=${GOPATH}/bin/govendor
BUILD_CMD?=${GOVENDOR}
BUILD_ID:=$(shell echo 0x$$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n'))
SKYDIVE_GITHUB:=github.com/skydive-project/skydive
SKYDIVE_PKG:=skydive-${VERSION}
SKYDIVE_PATH:=$(SKYDIVE_PKG)/src/$(SKYDIVE_GITHUB)/
SKYDIVE_GITHUB_VERSION:=$(SKYDIVE_GITHUB)/version.Version=${VERSION}
BUILD_TOOLS:=${GOPATH}/.skydive-build-tool
GO_BINDATA_GITHUB:=github.com/jteeuwen/go-bindata/go-bindata
PROTOC_GEN_GO_GITHUB:=github.com/golang/protobuf/protoc-gen-go
PROTOC_GEN_GOFAST_GITHUB:=github.com/gogo/protobuf/protoc-gen-gogofaster
PROTEUS_GITHUB:=gopkg.in/src-d/proteus.v1/cli/proteus
EASYJSON_GITHUB:=github.com/mailru/easyjson/easyjson
EASYJSON_FILES_ALL=flow/flow.pb.go
EASYJSON_FILES_TAG=\
	flow/storage/elasticsearch/elasticsearch.go \
	flow/storage/orientdb/orientdb.go \
	graffiti/graph/elasticsearch.go \
	sflow/sflow.go \
	topology/metrics.go \
	topology/probes/netlink/route.go \
	topology/probes/netlink/neighbor.go \
	topology/probes/nsm/nsm.go
	topology/probes/ovsdb/ovsdb.go
EASYJSON_FILES_TAG_LINUX=\
	topology/probes/netlink/netlink.go \
	topology/probes/socketinfo/connection.go
EASYJSON_FILES_TAG_OPENCONTRAIL=\
	topology/probes/opencontrail/routing_table.go
VPPBINAPI_GITHUB:=git.fd.io/govpp.git/cmd/binapi-generator
VERBOSE_FLAGS?=-v<commit_msg>fix error during rebase<commit_after>define VERSION_CMD =
eval ' \
	define=""; \
	version=`git describe --abbrev=0 --tags | tr -d "[a-z]"` ; \
	commit=`git rev-parse --verify HEAD`; \
	tagname=`git show-ref --tags | grep $$commit`; \
	if [ -n "$$tagname" ]; then \
		define=`echo $$tagname | awk -F "/" "{print \\$$NF}" | tr -d "[a-z]"`; \
	else \
		define=`printf "$$version-%.12s" $$commit`; \
	fi; \
	tainted=`git ls-files -m | wc -l` ; \
	if [ "$$tainted" -gt 0 ]; then \
		define="$${define}-tainted"; \
	fi; \
	echo "$$define" \
'
endef

define VENDOR_RUN
mv ${BUILD_TOOLS} bin || true; \
ln -s vendor src || mv vendor src; \
cd src/$1; \
(unset GOARCH; unset CC; GOPATH=$$GOPATH/src/${SKYDIVE_GITHUB} go install $1); \
cd -; \
mv bin ${BUILD_TOOLS}; \
unlink src || mv src vendor;
endef

define PROTOC_GEN
$(call VENDOR_RUN,${PROTOC_GEN_GOFAST_GITHUB})
$(call VENDOR_RUN,${PROTOC_GEN_GO_GITHUB}) protoc -Ivendor -I. --plugin=${BUILD_TOOLS}/protoc-gen-gogofaster --gogofaster_out $$GOPATH/src $1
endef

VERSION?=$(shell $(VERSION_CMD))
GO_GET:=CC= GOARCH= go get
GOVENDOR:=${GOPATH}/bin/govendor
BUILD_CMD?=${GOVENDOR}
BUILD_ID:=$(shell echo 0x$$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n'))
SKYDIVE_GITHUB:=github.com/skydive-project/skydive
SKYDIVE_PKG:=skydive-${VERSION}
SKYDIVE_PATH:=$(SKYDIVE_PKG)/src/$(SKYDIVE_GITHUB)/
SKYDIVE_GITHUB_VERSION:=$(SKYDIVE_GITHUB)/version.Version=${VERSION}
BUILD_TOOLS:=${GOPATH}/.skydive-build-tool
GO_BINDATA_GITHUB:=github.com/jteeuwen/go-bindata/go-bindata
PROTOC_GEN_GO_GITHUB:=github.com/golang/protobuf/protoc-gen-go
PROTOC_GEN_GOFAST_GITHUB:=github.com/gogo/protobuf/protoc-gen-gogofaster
PROTEUS_GITHUB:=gopkg.in/src-d/proteus.v1/cli/proteus
EASYJSON_GITHUB:=github.com/mailru/easyjson/easyjson
EASYJSON_FILES_ALL=flow/flow.pb.go
EASYJSON_FILES_TAG=\
	flow/storage/elasticsearch/elasticsearch.go \
	flow/storage/orientdb/orientdb.go \
	graffiti/graph/elasticsearch.go \
	sflow/sflow.go \
	topology/metrics.go \
	topology/probes/netlink/route.go \
	topology/probes/netlink/neighbor.go \
	topology/probes/nsm/nsm.go \
	topology/probes/ovsdb/ovsdb.go
EASYJSON_FILES_TAG_LINUX=\
	topology/probes/netlink/netlink.go \
	topology/probes/socketinfo/connection.go
EASYJSON_FILES_TAG_OPENCONTRAIL=\
	topology/probes/opencontrail/routing_table.go
VPPBINAPI_GITHUB:=git.fd.io/govpp.git/cmd/binapi-generator
VERBOSE_FLAGS?=-v
{'fraction_non_alphanumeric': 0.1732233502538071, 'fraction_numerical': 0.005076142131979695, 'mean_word_length': 4.795343137254902, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1280375', 'n_tokens_mistral': 2094, 'n_tokens_neox': 2047, 'n_words': 292}