Commit fbb4be32 authored by Anthony Martin's avatar Anthony Martin Committed by Russ Cox

make: add nuke target for C commands and libs

Also, clean *.out files for commands written in Go.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/4535051
parent fa23a700
...@@ -18,6 +18,9 @@ CLEANFILES+=y.tab.[ch] ...@@ -18,6 +18,9 @@ CLEANFILES+=y.tab.[ch]
clean: clean:
rm -f *.$(HOST_O) $(TARG) $(CLEANFILES) rm -f *.$(HOST_O) $(TARG) $(CLEANFILES)
nuke: clean
rm -f "$(GOBIN)/$(TARG)"
ifneq ($(NOINSTALL),1) ifneq ($(NOINSTALL),1)
install: $(QUOTED_GOBIN)/$(TARG) install: $(QUOTED_GOBIN)/$(TARG)
endif endif
......
...@@ -26,6 +26,8 @@ CLEANFILES+=y.tab.[ch] y.output a.out $(LIB) ...@@ -26,6 +26,8 @@ CLEANFILES+=y.tab.[ch] y.output a.out $(LIB)
clean: clean:
rm -f *.$(HOST_O) $(CLEANFILES) rm -f *.$(HOST_O) $(CLEANFILES)
nuke: clean
rm -f "$(GOROOT)/lib/$(LIB)"
y.tab.h: $(YFILES) y.tab.h: $(YFILES)
LANG=C LANGUAGE="en_US.UTF8" bison -v -y $(HOST_YFLAGS) $(YFILES) LANG=C LANGUAGE="en_US.UTF8" bison -v -y $(HOST_YFLAGS) $(YFILES)
......
...@@ -27,7 +27,7 @@ install: $(TARGDIR)/$(TARG) ...@@ -27,7 +27,7 @@ install: $(TARGDIR)/$(TARG)
$(TARGDIR)/$(TARG): $(TARG) $(TARGDIR)/$(TARG): $(TARG)
mkdir -p $(TARGDIR) && cp -f $(TARG) $(TARGDIR) mkdir -p $(TARGDIR) && cp -f $(TARG) $(TARGDIR)
CLEANFILES+=$(TARG) _test _testmain.go CLEANFILES+=$(TARG) _test _testmain.go test.out build.out
nuke: clean nuke: clean
rm -f $(TARGDIR)/$(TARG) rm -f $(TARGDIR)/$(TARG)
......
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