Commit f89110b149c88f3a3f5a7a5c8544b07b0f3b4ffb

Authored by Georg Hopp
0 parents

Initial commit

  1 +# Generated with m4
  2 +version.go
... ...
  1 +PACKAGE = gitlab.weird-web-workers.org/ghopp/test
  2 +
  3 +SOURCES = version.go
  4 +
  5 +VERSION = 0.0.1
  6 +REVISION = $(shell git rev-parse HEAD)
  7 +BUILDTIME= "$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')"
  8 +
  9 +GOOS = $(shell go env GOOS)
  10 +GOARCH = $(shell go env GOARCH)
  11 +
  12 +LIBRARY = $(GOPATH)/pkg/$(GOOS)_$(GOARCH)/$(PACKAGE).a
  13 +
  14 +.PHONY: all clean
  15 +
  16 +all: $(LIBRARY)
  17 +
  18 +$(LIBRARY): $(SOURCES)
  19 + go install $(PACKAGE)
  20 +
  21 +version.go: version.go.m4
  22 + -@m4 -Dm4_version=$(VERSION) \
  23 + -Dm4_revision=$(REVISION) \
  24 + -Dm4_build_time=$(BUILDTIME) \
  25 + $< >$@
  26 +
  27 +clean:
  28 + -@rm -f version.go 2>/dev/null
  29 + -@rm -f $(LIBRARY) 2>/dev/null
... ...
  1 +/*
  2 +Package version information.
  3 +
  4 +Authors:
  5 +Georg Hopp <georg@steffers.org>
  6 +
  7 +Changes:
  8 +2018-09-30 [Georg Hopp] File created.
  9 +
  10 +Copyright © 2018 Georg Hopp
  11 +
  12 +This program is free software: you can redistribute it and/or modify
  13 +it under the terms of the GNU General Public License as published by
  14 +the Free Software Foundation, either version 3 of the License, or
  15 +(at your option) any later version.
  16 +
  17 +This program is distributed in the hope that it will be useful,
  18 +but WITHOUT ANY WARRANTY; without even the implied warranty of
  19 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20 +GNU General Public License for more details.
  21 +
  22 +You should have received a copy of the GNU General Public License
  23 +along with this program. If not, see <http://www.gnu.org/licenses/>.
  24 +*/
  25 +package test
  26 +
  27 +const (
  28 + VERSION = "m4_version"
  29 + REVISION = "m4_revision"
  30 + BUILD_TIME = "m4_build_time"
  31 +)
  32 +
  33 +// vim: ts=4 sts=4 sw=4 noet tw=72:
... ...
Please register or login to post a comment