From b5d90b915dc068926a1d4094763a4ce63bef3094 Mon Sep 17 00:00:00 2001 From: Sergey Matveev Date: Sun, 10 May 2015 12:10:42 +0300 Subject: [PATCH] BSD Make compatible makefile Signed-off-by: Sergey Matveev --- doc/installation.texi | 6 +++--- doc/makefile | 2 ++ makefile | 16 +++++++--------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/installation.texi b/doc/installation.texi index c72f629..75ee444 100644 --- a/doc/installation.texi +++ b/doc/installation.texi @@ -2,8 +2,8 @@ @unnumbered Installation GoVPN is written on @url{http://golang.org/, Go programming language}, -@url{https://www.gnu.org/software/make/, GNU Make} is recommended for -convenient building. @url{https://www.gnu.org/software/texinfo/, Texinfo} +@emph{Make} is recommended for convenient building. +@url{https://www.gnu.org/software/texinfo/, Texinfo} is used for building documentation. Included required libraries: @@ -24,7 +24,7 @@ binaries will be build in the current directory. % wget http://www.cypherpunks.ru/govpn/download/govpn-2.3.tar.xz.sig % gpg --verify govpn-2.3.tar.xz.sig govpn-2.3.tar.xz % tar xf govpn-2.3.tar.xz -% gmake -C govpn-2.3 all +% make -C govpn-2.3 all @end example @menu diff --git a/doc/makefile b/doc/makefile index c55b888..c959269 100644 --- a/doc/makefile +++ b/doc/makefile @@ -1,5 +1,7 @@ all: govpn.info govpn.html +MAKEINFO ?= makeinfo + govpn.info: *.texi handshake.utxt makeinfo govpn.texi diff --git a/makefile b/makefile index 9dbdc54..305108c 100644 --- a/makefile +++ b/makefile @@ -1,9 +1,7 @@ -.PHONY: govpn-client govpn-server govpn-verifier +GOPATH != pwd +VERSION != cat VERSION -GOPATH=$(shell pwd) -export GOPATH - -LDFLAGS=-X govpn.Version $(shell cat VERSION) +LDFLAGS=-X govpn.Version $(VERSION) all: govpn-client govpn-server govpn-verifier @@ -11,13 +9,13 @@ depends: $(MAKE) -C src govpn-client: depends - go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-client + GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-client govpn-server: depends - go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-server + GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-server govpn-verifier: depends - go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-verifier + GOPATH=$(GOPATH) go build -ldflags "$(LDFLAGS)" govpn/cmd/govpn-verifier bench: - cd src/govpn ; GOMAXPROC=2 go test -bench . + cd src/govpn ; GOPATH=$(GOPATH) GOMAXPROC=2 go test -bench . -- 2.44.0