]> Cypherpunks repositories - gostls13.git/commitdiff
all: remove some references to Make.inc etc.
authorRob Pike <r@golang.org>
Wed, 7 Mar 2012 02:51:49 +0000 (13:51 +1100)
committerRob Pike <r@golang.org>
Wed, 7 Mar 2012 02:51:49 +0000 (13:51 +1100)
There are a few more but these are the easiest ones.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5756067

src/cmd/cgo/doc.go
src/cmd/cgo/main.go
src/lib9/utf/Makefile
test/bench/garbage/Makefile
test/bench/go1/Makefile

index f6a14ae08ae83b8c34d86c613ef3b2e0e6dff7a5..109b666bdc953d4dacec50af49fec35e2337c892 100644 (file)
@@ -111,9 +111,9 @@ Not all Go types can be mapped to C types in a useful way.
 Cgo transforms the input file into four output files: two Go source
 files, a C file for 6c (or 8c or 5c), and a C file for gcc.
 
-The standard package makefile rules in Make.pkg automate the
-process of using cgo.  See $GOROOT/misc/cgo/stdio and
-$GOROOT/misc/cgo/gmp for examples.
+The standard package construction rules of the go command
+automate the process of using cgo.  See $GOROOT/misc/cgo/stdio
+and $GOROOT/misc/cgo/gmp for examples.
 
 Cgo does not yet work with gccgo.
 
index a8be7be7d938f0fbcd5b977d03e7c1304710aa85..5f307607ba3655101f02b1e3f98270dd9a91b44f 100644 (file)
@@ -147,7 +147,7 @@ func main() {
                // cgo -dynimport is essentially a separate helper command
                // built into the cgo binary.  It scans a gcc-produced executable
                // and dumps information about the imported symbols and the
-               // imported libraries.  The Make.pkg rules for cgo prepare an
+               // imported libraries.  The 'go build' rules for cgo prepare an
                // appropriate executable and then use its import information
                // instead of needing to make the linkers duplicate all the
                // specialized knowledge gcc has about where to look for imported
index c3b9ec5d066b4c60c9c0ea6ce4ce2fce9f0e967e..bbb2da6a90679803a3d11d40e79e23aebf9e18e6 100644 (file)
@@ -4,21 +4,17 @@
 
 # The library is built by the Makefile in the parent directory.
 # This Makefile only builds mkrunetype.
-
-include ../../Make.inc
-O:=$(HOST_O)
+# GOROOT, GOOS, and GOARCH must be set explicitly.
 
 TARG=mkrunetype
 
-OFILES=\
-       mkrunetype.$O\
-
-include ../../Make.ccmd
-
 UnicodeData-%.txt:
        curl http://www.unicode.org/Public/$*/ucd/UnicodeData.txt >_$@
        mv _$@ $@
 
+mkrunetype: mkrunetype.c
+       cc -I../../../include -o mkrunetype -L$(GOROOT)/pkg/obj/$(GOOS)_$(GOARCH)/ mkrunetype.c -l9
+
 runetypebody-%.c: mkrunetype UnicodeData-%.txt
        mkrunetype -p UnicodeData-$*.txt >_$@
        mv _$@ $@
@@ -30,3 +26,5 @@ UNICODE_VERSION=6.0.0
 test: mkrunetype UnicodeData-$(UNICODE_VERSION).txt
        mkrunetype -c UnicodeData-$(UNICODE_VERSION).txt
 
+clean:
+       rm -f UnicodeData.txt mkrunetype
\ No newline at end of file
index 8002a2017bc568c754bcdca648e4a03865702479..98838453aa6f49a28d27428ba9285d21490c8138 100644 (file)
@@ -2,27 +2,22 @@
 # Use of this source code is governed by a BSD-style
 # license that can be found in the LICENSE file.
 
-include ../../../src/Make.inc
-
 ALL=\
        parser\
        peano\
        tree\
        tree2\
 
-all: $(addsuffix .out, $(ALL))
-
-%.$O: %.go stats.go
-       $(GC) $(GCFLAGS) $(GCIMPORTS) $*.go stats.go
+all: $(ALL)
 
-%.out: %.$O
-       $(LD) -o $@ $*.$O
+%: %.go
+       go build $*.go stats.go
 
-%.bench: %.out
-       time ./$*.out
+%.bench: %
+       time ./$*
 
 bench: $(addsuffix .bench, $(ALL))
 
 clean:
-       rm -f *.[$(OS)] $(addsuffix .out, $(ALL))
+       rm -f $(ALL)
 
index aa558533568d5357b6b74d3da11a753bee0889ef..48e01279d475dc93130d5cc7d0c1230cd3b67faf 100644 (file)
@@ -1,10 +1,5 @@
-include $(GOROOT)/src/Make.inc
 
 TARG=go1
-GOFILES=\
-       dummy.go\
-
-include $(GOROOT)/src/Make.pkg
 
 test:
        echo go1: tests disabled for now TODO