1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-04 17:27:02 +00:00
Files
go-chasquid-smtp/Makefile
Alberto Bertogli 60ed30e95a Add a Makefile
This patch introduces a Makefile to make it easier to build with version
information, and run all the tests together.

It's just for convenience, plain go commands continue to work just fine.
2016-11-01 23:55:56 +00:00

41 lines
735 B
Makefile

ifndef VERSION
VERSION = `git describe --always --long --dirty`
endif
# https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
ifndef SOURCE_DATE_EPOCH
SOURCE_DATE_EPOCH = `git log -1 --format=%ct`
endif
default: chasquid
all: chasquid chasquid-util smtp-check spf-check
chasquid:
go build -ldflags="\
-X main.version=${VERSION} \
-X main.sourceDateTs=${SOURCE_DATE_EPOCH} \
" ${GOFLAGS}
chasquid-util:
go build ${GOFLAGS} ./cmd/chasquid-util/
smtp-check:
go build ${GOFLAGS} ./cmd/smtp-check/
spf-check:
go build ${GOFLAGS} ./cmd/spf-check/
test:
go test ${GOFLAGS} ./...
setsid -w ./test/run.sh
setsid -w ./cmd/chasquid-util/test.sh
.PHONY: chasquid chasquid-util smtp-check spf-check test