<commit_before>PACKAGE_NAME 	= luddite
EXAMPLE_DIR	= ./example
EXAMPLE_BIN	= $(EXAMPLE_DIR)/example

.PHONY: all setup restore build rebase clean

all: build

#
# Setup
#

ifdef JOB_URL

# SpirentOrion Jenkins build environment setup
export GOROOT	= /usr/src/go
export GOPATH	= /go
export PATH	:= /go/bin:/usr/src/go/bin:$(PATH)
ORG_PATH	= github.com/SpirentOrion
REPO_PATH	= $(ORG_PATH)/$(PACKAGE_NAME)
BUILD_PATH	= $(GOPATH)/src/$(REPO_PATH)

setup:
	@mkdir -p $(GOPATH)/src/$(ORG_PATH)
	@rm -f $(GOPATH)/src/$(REPO_PATH)
	@ln -s $(PWD) $(GOPATH)/src/$(REPO_PATH)
	@git config --global url."<EMAIL>:SpirentOrion".insteadOf https://github.com/SpirentOrion

else

# Local build setup
BUILD_PATH	= .

setup:

endif

restore: setup
	cd $(BUILD_PATH) && godep restore

build: setup
	cd $(BUILD_PATH) && \
	go build -a -v ./... && \
	go build -a -v -o $(EXAMPLE_BIN) ./example && \
	go test ./...

rebase:
	godep update `cat Godeps/Godeps.json | jq -r .Deps[].ImportPath`

clean:
	rm -f $(EXAMPLE_BIN)<commit_msg>Move Jenkins config out of Makefile.<commit_after>BUILD_PATH	?= .
EXAMPLE_DIR	= ./example
EXAMPLE_BIN	= $(EXAMPLE_DIR)/example

.PHONY: all restore build rebase clean

all: build

restore:
	cd $(BUILD_PATH) && godep restore

build:
	cd $(BUILD_PATH) && \
	go build -a -v ./... && \
	go build -a -v -o $(EXAMPLE_BIN) ./example && \
	go test ./...

rebase:
	godep update `cat Godeps/Godeps.json | jq -r .Deps[].ImportPath`

clean:
	rm -f $(EXAMPLE_BIN)
{'fraction_non_alphanumeric': 0.16381082933516106, 'fraction_numerical': 0.0, 'mean_word_length': 3.5625, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 1, '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': '149731', 'n_tokens_mistral': 626, 'n_tokens_neox': 597, 'n_words': 146}