Files
mgmt/Makefile
James Shubin 6b4fa21074 Mega patch
This is still a dirty prototype, so please excuse the mess. Please
excuse the fact that this is a mega patch. Once things settle down this
won't happen any more.

Some of the changes squashed into here include:
* Merge vertex loop with type loop
(The file watcher seems to cache events anyways)
* Improve pgraph library
* Add indegree, outdegree, and topological sort with tests
* Add reverse function for vertex list
* Tons of additional cleanup!

Amazingly, on my first successful compile, this seemed to run!

A special thanks to Ira Cooper who helped me talk through some of the
algorithmic decisions and for his help in finding better ones!
2015-12-21 03:27:25 -05:00

44 lines
1.2 KiB
Makefile

SHELL = /bin/bash
.PHONY: all version deps run race build clean test format docs
.SILENT: clean
VERSION := $(shell git describe --match '[0-9]*\.[0-9]*\.[0-9]*' --tags --dirty)
PROGRAM := $(notdir $(CURDIR))
all: docs
# show the current version
version:
@echo $(VERSION)
deps:
./misc/make-deps.sh
run:
find -maxdepth 1 -type f -name '*.go' -not -name '*_test.go' | xargs go run -ldflags "-X main.version=$(VERSION) -X main.program=$(PROGRAM)"
# include race flag
race:
find -maxdepth 1 -type f -name '*.go' -not -name '*_test.go' | xargs go run -race -ldflags "-X main.version=$(VERSION) -X main.program=$(PROGRAM)"
build: mgmt
mgmt: main.go
go generate
go build -ldflags "-X main.version=$(VERSION) -X main.program=$(PROGRAM)"
clean:
[ ! -e mgmt ] || rm mgmt
test:
./test.sh
format:
find -type f -name '*.go' -not -path './old/*' -not -path './tmp/*' -exec gofmt -w {} \;
find -type f -name '*.yaml' -not -path './old/*' -not -path './tmp/*' -not -path './omv.yaml' -exec ruby -e "require 'yaml'; x=YAML.load_file('{}').to_yaml.each_line.map(&:rstrip).join(10.chr)+10.chr; File.open('{}', 'w').write x" \;
docs: mgmt-documentation.pdf
mgmt-documentation.pdf: DOCUMENTATION.md
pandoc DOCUMENTATION.md -o 'mgmt-documentation.pdf'