Browse Source

Initial commit

master
Georg Hopp 7 years ago
commit
f89110b149
Signed by: ghopp GPG Key ID: 4C5D226768784538
  1. 2
      .gitignore
  2. 29
      Makefile
  3. 33
      version.go.m4

2
.gitignore

@ -0,0 +1,2 @@
# Generated with m4
version.go

29
Makefile

@ -0,0 +1,29 @@
PACKAGE = gitlab.weird-web-workers.org/ghopp/test
SOURCES = version.go
VERSION = 0.0.1
REVISION = $(shell git rev-parse HEAD)
BUILDTIME= "$(shell date -u +'%Y-%m-%dT%H:%M:%SZ')"
GOOS = $(shell go env GOOS)
GOARCH = $(shell go env GOARCH)
LIBRARY = $(GOPATH)/pkg/$(GOOS)_$(GOARCH)/$(PACKAGE).a
.PHONY: all clean
all: $(LIBRARY)
$(LIBRARY): $(SOURCES)
go install $(PACKAGE)
version.go: version.go.m4
-@m4 -Dm4_version=$(VERSION) \
-Dm4_revision=$(REVISION) \
-Dm4_build_time=$(BUILDTIME) \
$< >$@
clean:
-@rm -f version.go 2>/dev/null
-@rm -f $(LIBRARY) 2>/dev/null

33
version.go.m4

@ -0,0 +1,33 @@
/*
Package version information.
Authors:
Georg Hopp <georg@steffers.org>
Changes:
2018-09-30 [Georg Hopp] File created.
Copyright © 2018 Georg Hopp
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package test
const (
VERSION = "m4_version"
REVISION = "m4_revision"
BUILD_TIME = "m4_build_time"
)
// vim: ts=4 sts=4 sw=4 noet tw=72:
Loading…
Cancel
Save