1
0
mirror of https://github.com/golang/go synced 2024-11-25 09:07:58 -07:00
go/src/Make.common

27 lines
654 B
Plaintext

# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# GNU Make syntax:
ifndef GOBIN
GOBIN=$(HOME)/bin
endif
# ugly hack to deal with whitespaces in $GOBIN
nullstring :=
space := $(nullstring) # a space at the end
ifndef GOBIN
QUOTED_HOME=$(subst $(space),\ ,$(HOME))
GOBIN=$(QUOTED_HOME)/bin
endif
QUOTED_GOBIN=$(subst $(space),\ ,$(GOBIN))
# ugly hack to deal with whitespaces in $GOROOT
QUOTED_GOROOT:=$(subst $(space),\ ,$(GOROOT))
clean:
rm -rf *.o *.a *.[$(OS)] [$(OS)].out $(CLEANFILES)
%.make:
(cd $* && $(QUOTED_GOBIN)/gomake install)