Files
releases/Makefile
T
Torin Sandall 157e4f083a Add references to the grammar
The special iterator variable ("_") is not supported yet. The _ variable will
be handled by mangling the variable name while parsing the rules (which are
still to come).

Also refactored terms to use type declaration and type switches. All terms are
now represented by underlying Go types without relying on extra structs. The
Kind attribute on Term has been removed in favour of type switches.

Lastly, removing the generated parser from the repository for now. Once the
grammar has stabilized, we can add the generated code back. The diffs were
unpleasant.
2016-04-02 12:03:31 -07:00

40 lines
1.0 KiB
Makefile

# Copyright 2015 The OPA Authors. All rights reserved.
# Use of this source code is governed by an Apache2
# license that can be found in the LICENSE file.
PACKAGES := github.com/open-policy-agent/opa/opalog/.../ \
github.com/open-policy-agent/opa/cmd/.../
BUILD_COMMIT := $(shell ./build/get-build-commit.sh)
BUILD_TIMESTAMP := $(shell ./build/get-build-timestamp.sh)
BUILD_HOSTNAME := $(shell ./build/get-build-hostname.sh)
LDFLAGS := -ldflags "-X github.com/open-policy-agent/opa/version.Vcs=$(BUILD_COMMIT) \
-X github.com/open-policy-agent/opa/version.Timestamp=$(BUILD_TIMESTAMP) \
-X github.com/open-policy-agent/opa/version.Hostname=$(BUILD_HOSTNAME)"
GO := go
GO15VENDOREXPERIMENT := 1
export GO15VENDOREXPERIMENT
.PHONY: all deps generate build test clean
all: build test
deps:
$(GO) install ./vendor/github.com/PuerkitoBio/pigeon
$(GO) install ./vendor/golang.org/x/tools/cmd/goimports
generate:
$(GO) generate
build: generate
$(GO) build -o opa $(LDFLAGS)
test: generate
$(GO) test -v $(PACKAGES)
clean:
rm -f ./opa