]> Cypherpunks repositories - gostls13.git/commitdiff
work with GNU Make 3.80
authorRuss Cox <rsc@golang.org>
Wed, 11 Nov 2009 20:00:50 +0000 (12:00 -0800)
committerRuss Cox <rsc@golang.org>
Wed, 11 Nov 2009 20:00:50 +0000 (12:00 -0800)
Fixes #30.

R=r1, r
https://golang.org/cl/154061

src/Make.pkg

index 50e1d8d72b64ce338b3d47f43dba811816fcf8ea..fd8e5bdb612bae70cbdb6a6e739adaea4b16230e 100644 (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)