]> Cypherpunks repositories - gostls13.git/commitdiff
build: generate, clean .exe files on Windows
authorJoe Poirier <jdpoirier@gmail.com>
Thu, 9 Sep 2010 05:42:55 +0000 (01:42 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 9 Sep 2010 05:42:55 +0000 (01:42 -0400)
R=rsc, brainman, vcc
CC=golang-dev
https://golang.org/cl/2165044

src/Make.ccmd
src/Make.pkg

index e22e256f00335b5012ad136dddae1a416f5a02af..a0da13857e45a51f9598f296ba8df02260e63d25 100644 (file)
@@ -4,6 +4,10 @@
 
 # Makefile for commands written in C.
 
+ifeq (windows,$(findstring windows, $(shell uname | tr A-Z a-z | sed 's/mingw/windows/')))
+TARG:=$(TARG).exe
+endif
+
 $(TARG): $(OFILES) $(LIB)
        $(HOST_LD) -o $(TARG) -L"$(GOROOT)"/lib $(OFILES) $(LIB) -lbio -l9 -lm
 
index 6c1ac7a87211c6c106f68179582cb53f6504ced7..d5ccbe0308897339aa39ec4361200064c3416c76 100644 (file)
@@ -50,7 +50,7 @@ coverage:
        gotest
        6cov -g $(shell pwd) $O.out | grep -v '_test\.go:'
 
-CLEANFILES+=*.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go
+CLEANFILES+=*.cgo1.go *.cgo2.c _cgo_defun.c _cgo_gotypes.go _cgo_export.* *.so _obj _test _testmain.go *.exe
 
 test:
        gotest