aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tom Willemse2013-05-27 22:40:28 +0200
committerGravatar Tom Willemse2013-05-27 22:40:37 +0200
commite027f3c7e6db96535e2515d6e65389a5079e0a82 (patch)
tree38fed19be886b73c664a6aa2079c3e2abbc01362
parent7f6037855dbfb16e5c05c29fd1eaeba14c4dfabb (diff)
downloadgitto-e027f3c7e6db96535e2515d6e65389a5079e0a82.tar.gz
gitto-e027f3c7e6db96535e2515d6e65389a5079e0a82.zip
Add clean make target
-rw-r--r--Makefile8
-rw-r--r--doc/Makefile8
-rw-r--r--gitto/Makefile6
-rw-r--r--src/Makefile5
-rw-r--r--zsh/Makefile4
5 files changed, 26 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 0b51b8d..8bab8ce 100644
--- a/Makefile
+++ b/Makefile
@@ -7,12 +7,15 @@ export INSTALL_DATA = $(INSTALL) -m 644
dirs = doc src gitto zsh
install-dirs = $(addprefix install-,$(dirs))
uninstall-dirs = $(addprefix uninstall-,$(dirs))
+clean-dirs = $(addprefix clean-,$(dirs))
-.PHONY: all $(dirs) install $(install-dirs) uninstall $(uninstall-dirs)
+.PHONY: all $(dirs) install $(install-dirs) uninstall $(uninstall-dirs) \
+ clean $(clean-dirs)
all: $(dirs)
install: $(install-dirs)
uninstall: $(uninstall-dirs)
+clean: $(clean-dirs)
$(dirs):
$(MAKE) -C $@/
@@ -22,3 +25,6 @@ $(install-dirs): install-%:
$(uninstall-dirs): uninstall-%:
$(MAKE) -C $*/ uninstall
+
+$(clean-dirs): clean-%:
+ $(MAKE) -C $*/ clean
diff --git a/doc/Makefile b/doc/Makefile
index 0e3f42c..c49e71d 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -4,7 +4,7 @@ TEXI2PDF = texi2pdf
DVIPS = dvips
.PHONY: all html dvi pdf ps install uninstall install-dvi install-pdf \
- install-ps
+ install-ps clean
all: gitto.info
@@ -51,3 +51,9 @@ gitto.pdf: gitto.texi
gitto.ps: gitto.dvi
$(DVIPS) gitto.dvi
+
+clean:
+ rm -f gitto.aux gitto.cp gitto.dvi gitto.fn gitto.fns gitto.info \
+ gitto.ky gitto.log gitto.pdf gitto.pg gitto.ps gitto.toc \
+ gitto.tp gitto.vr gitto.vrs
+ rm -rf html/
diff --git a/gitto/Makefile b/gitto/Makefile
index 85657f4..ba060fc 100644
--- a/gitto/Makefile
+++ b/gitto/Makefile
@@ -8,7 +8,8 @@ objects = config.scm config.go git.scm git.go ui.scm ui.go main.scm \
install-objects = $(addprefix install-,$(objects))
uninstall-objects = $(addprefix uninstall-,$(objects))
-.PHONY: all install $(install-objects) uninstall $(uninstall-objects)
+.PHONY: all install $(install-objects) uninstall $(uninstall-objects) \
+ clean
all: $(filter %.go,$(objects))
@@ -29,3 +30,6 @@ $(filter %.go,$(uninstall-objects)): uninstall-%:
$(filter %.scm,$(uninstall-objects)): uninstall-%:
rm -f "$(SITEDIR)/gitto/$*"
+
+clean:
+ rm -f *.go
diff --git a/src/Makefile b/src/Makefile
index 50ed2e4..668d440 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -8,7 +8,7 @@ objects = gitto-path.o
all: libguile-gitto-path.so
-.PHONY: install uninstall
+.PHONY: install uninstall clean
%.x: %.c
guile-snarf -o $@ $< $(CFLAGS)
@@ -26,3 +26,6 @@ install: install-gitto install-libguile-gitto-path
uninstall:
rm -f ${DESTDIR}/bin/gitto
rm -f ${EXTDIR}/libguile-gitto-path.so
+
+clean:
+ rm -f *.o *.x *.so
diff --git a/zsh/Makefile b/zsh/Makefile
index 0c3a2c0..a7dd06c 100644
--- a/zsh/Makefile
+++ b/zsh/Makefile
@@ -1,6 +1,6 @@
DESTDIR ?= /usr/local
-.PHONY: all install uninstall
+.PHONY: all install uninstall clean
all:
@@ -9,3 +9,5 @@ install:
uninstall:
rm -f $(DESTDIR)/share/zsh/site-functions/_gitto
+
+clean: