Commit bdcf1f81 authored by Russ Cox's avatar Russ Cox

add and use Make.cmd

R=r
DELTA=63  (23 added, 31 deleted, 9 changed)
OCL=33932
CL=33959
parent 3443656b
# 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
all: $(TARG)
$(TARG): _go_.$O $(OFILES)
$(LD) -o $@ _go_.$O $(OFILES)
_go_.$O: $(GOFILES)
$(GC) -o $@ $(GOFILES)
install: $(GOBIN)/$(TARG)
$(GOBIN)/$(TARG): $(TARG)
cp $(TARG) $@
clean:
rm -f *.[$(OS)] $(TARG) $(CLEANFILES)
nuke:
rm -f *.[$(OS)] $(TARG) $(CLEANFILES) $(GOBIN)/$(TARG)
...@@ -2,24 +2,14 @@ ...@@ -2,24 +2,14 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include $(GOROOT)/src/Make.conf
include $(GOROOT)/src/Make.$(GOARCH) include $(GOROOT)/src/Make.$(GOARCH)
TARG=ebnflint TARG=ebnflint
OFILES=\ GOFILES=\
ebnflint.$O\ ebnflint.go\
$(TARG): $(OFILES) include $(GOROOT)/src/Make.cmd
$(LD) -o $(TARG) $(OFILES)
test: $(TARG) test: $(TARG)
$(TARG) -start="SourceFile" $(GOROOT)/doc/go_spec.html $(TARG) -start="SourceFile" $(GOROOT)/doc/go_spec.html
clean:
rm -f $(OFILES) $(TARG)
install: $(TARG)
cp $(TARG) $(GOBIN)/$(TARG)
%.$O: %.go
$(GC) $<
...@@ -2,21 +2,10 @@ ...@@ -2,21 +2,10 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include $(GOROOT)/src/Make.conf
include $(GOROOT)/src/Make.$(GOARCH) include $(GOROOT)/src/Make.$(GOARCH)
TARG=godoc TARG=godoc
OFILES=\ GOFILES=\
godoc.$O\ godoc.go\
$(TARG): $(OFILES) include $(GOROOT)/src/Make.cmd
$(LD) -o $(TARG) $(OFILES)
clean:
rm -f $(OFILES) $(TARG)
install: $(TARG)
cp $(TARG) $(GOBIN)/$(TARG)
%.$O: %.go
$(GC) $<
...@@ -2,15 +2,13 @@ ...@@ -2,15 +2,13 @@
# Use of this source code is governed by a BSD-style # Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file. # license that can be found in the LICENSE file.
include $(GOROOT)/src/Make.conf
include $(GOROOT)/src/Make.$(GOARCH) include $(GOROOT)/src/Make.$(GOARCH)
TARG=gofmt TARG=gofmt
OFILES=\ GOFILES=\
gofmt.$O\ gofmt.go\
$(TARG): $(OFILES) include $(GOROOT)/src/Make.cmd
$(LD) -o $(TARG) $(OFILES)
test: $(TARG) test: $(TARG)
./test.sh ./test.sh
...@@ -18,11 +16,3 @@ test: $(TARG) ...@@ -18,11 +16,3 @@ test: $(TARG)
smoketest: $(TARG) smoketest: $(TARG)
./test.sh $(GOROOT)/src/pkg/go/parser/parser.go ./test.sh $(GOROOT)/src/pkg/go/parser/parser.go
clean:
rm -f $(OFILES) $(TARG)
install: $(TARG)
cp $(TARG) $(GOBIN)/$(TARG)
%.$O: %.go
$(GC) $<
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment