--- /dev/null
+# 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)
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include $(GOROOT)/src/Make.conf
include $(GOROOT)/src/Make.$(GOARCH)
TARG=ebnflint
-OFILES=\
- ebnflint.$O\
+GOFILES=\
+ ebnflint.go\
-$(TARG): $(OFILES)
- $(LD) -o $(TARG) $(OFILES)
+include $(GOROOT)/src/Make.cmd
test: $(TARG)
$(TARG) -start="SourceFile" $(GOROOT)/doc/go_spec.html
-clean:
- rm -f $(OFILES) $(TARG)
-
-install: $(TARG)
- cp $(TARG) $(GOBIN)/$(TARG)
-
-%.$O: %.go
- $(GC) $<
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include $(GOROOT)/src/Make.conf
include $(GOROOT)/src/Make.$(GOARCH)
TARG=godoc
-OFILES=\
- godoc.$O\
+GOFILES=\
+ godoc.go\
-$(TARG): $(OFILES)
- $(LD) -o $(TARG) $(OFILES)
-
-clean:
- rm -f $(OFILES) $(TARG)
-
-install: $(TARG)
- cp $(TARG) $(GOBIN)/$(TARG)
-
-%.$O: %.go
- $(GC) $<
+include $(GOROOT)/src/Make.cmd
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include $(GOROOT)/src/Make.conf
include $(GOROOT)/src/Make.$(GOARCH)
TARG=gofmt
-OFILES=\
- gofmt.$O\
+GOFILES=\
+ gofmt.go\
-$(TARG): $(OFILES)
- $(LD) -o $(TARG) $(OFILES)
+include $(GOROOT)/src/Make.cmd
test: $(TARG)
./test.sh
smoketest: $(TARG)
./test.sh $(GOROOT)/src/pkg/go/parser/parser.go
-clean:
- rm -f $(OFILES) $(TARG)
-
-install: $(TARG)
- cp $(TARG) $(GOBIN)/$(TARG)
-
-%.$O: %.go
- $(GC) $<