[PATCH 2/3] mock cvs 2007-03: add SUBDIRS to distclean

Ken MacLeod ken at bitsko.slc.ut.us
Wed Jun 13 02:15:26 UTC 2007


Adds SUBDIRS to the make 'distclean' target and 'distclean' to the
sub-directory Makefiles.


---

 Makefile      |    3 ++-
 docs/Makefile |    2 ++
 etc/Makefile  |    2 ++
 src/Makefile  |    2 ++
 4 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index f3e7214..0dd1094 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,8 @@ clean:
 
 distclean: clean
 	rm -rf dist build
-	rm *.tar.gz
+	rm -f *.tar.gz
+	for d in $(SUBDIRS); do make -C $$d distclean ; done
 
 subdirs:
 	for d in $(SUBDIRS); do make -C $$d; [ $$? = 0 ] || exit 1 ; done
diff --git a/docs/Makefile b/docs/Makefile
index 515cddb..0ebb642 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -4,6 +4,8 @@ all:
 clean:
 	rm -f *.pyc *.pyo *~
 
+distclean: clean
+
 install:
 	mkdir -p $(DESTDIR)/usr/share/man/man1
 	install -m 644 mock.1 $(DESTDIR)/usr/share/man/man1/mock.1
diff --git a/etc/Makefile b/etc/Makefile
index f395a1f..5f83ff0 100644
--- a/etc/Makefile
+++ b/etc/Makefile
@@ -4,6 +4,8 @@ all:
 clean:
 	rm -f *.bak *~
 
+distclean: clean
+
 install:
 	mkdir -p $(DESTDIR)/etc/mock/
 	for item in *.cfg; do \
diff --git a/src/Makefile b/src/Makefile
index 8e62ea7..14b30e1 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -25,6 +25,8 @@ clean:
 	rm -f $(EXECUTABLE)
 	rm -f *~ *.bak *.o *.so
 
+distclean: clean
+
 install:
 	$(MKDIR) -p $(DESTDIR)/$(SBINDIR) $(DESTDIR)/$(LIBDIR)
 	$(INSTALL) -m 4750 $(EXECUTABLE) $(DESTDIR)/$(SBINDIR)/$(EXECUTABLE)




More information about the Fedora-buildsys-list mailing list