restructure to build individual binaries

This commit is contained in:
Michael Hobbs
2017-01-14 20:22:37 -08:00
parent e61475c7ea
commit fc31b28ab6
8 changed files with 30 additions and 43 deletions

View File

@@ -1,5 +1,8 @@
.PHONY: build-in-docker build clean
GO_REPO_ROOT ?= /go/src/github.com/dokku/dokku
BUILD_IMAGE ?= golang:1.7.1
build-in-docker: clean
docker run --rm \
-v $$PWD/../..:$(GO_REPO_ROOT) \
@@ -7,8 +10,17 @@ build-in-docker: clean
$(BUILD_IMAGE) \
bash -c "make build" || exit $$?
build:
cd src && go build -a -o ../commands
build: commands subcommands
subcommands: subcommands/gc subcommands/purge-cache
commands: **/**/commands.go
go build -a -o commands src/commands/commands.go
subcommands/gc: **/**/**/gc.go
go build -a -o subcommands/gc src/subcommands/gc/gc.go
subcommands/purge-cache: **/**/**/purge-cache.go
go build -a -o subcommands/purge-cache src/subcommands/purge-cache/purge-cache.go
clean:
rm -f commands
rm -rf commands subcommands