1
0
mirror of https://github.com/golang/go synced 2024-11-26 00:57:56 -07:00

work with GNU Make 3.80

Fixes #30.

R=r1, r
https://golang.org/cl/154061
This commit is contained in:
Russ Cox 2009-11-11 12:00:50 -08:00
parent 7932950844
commit 384932589d

View File

@ -6,7 +6,11 @@ all: package
package: _obj/$(TARG).a
testpackage: _test/$(TARG).a
elem=$(lastword $(subst /, ,$(TARG)))
# GNU Make 3.80 has a bug in lastword
# elem=$(lastword $(subst /, ,$(TARG)))
TARG_words=$(subst /, ,$(TARG))
elem=$(word $(words $(TARG_words)),$(TARG_words))
dir=$(patsubst %/$(elem),%,./$(TARG))
pkgdir=$(GOROOT)/pkg/$(GOOS)_$(GOARCH)