Added makefile

This commit is contained in:
Eduard Urbach 2017-06-16 15:05:37 +02:00
parent 5eea2a49e2
commit b1986af93a
2 changed files with 27 additions and 0 deletions

4
jobs/build.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
MYDIR="$(dirname "$(realpath "$0")")"
cd "$MYDIR"
for dir in ./*; do ([ -d "$dir" ] && cd "$dir" && echo "Building $dir" && go build); done

23
makefile Normal file
View File

@ -0,0 +1,23 @@
# Makefile for Anime Notifier
GOCMD=@go
GOBUILD=$(GOCMD) build
GOINSTALL=$(GOCMD) install
GOTEST=$(GOCMD) test
BUILDJOBS=@./jobs/build.sh
server:
$(GOBUILD)
jobs:
$(BUILDJOBS)
install:
$(GOINSTALL)
test:
$(GOTEST)
bench:
$(GOTEST) -bench .
depslist:
$(GOCMD) list -f {{.Deps}} | sed -e 's/\[//g' -e 's/\]//g' | tr " " "\n"
all: server jobs
.PHONY: jobs