From d680138d58885359181843ba113a2e7ded6b9f0e Mon Sep 17 00:00:00 2001
From: Linus Tolke Y <linus@lysator.liu.se>
Date: Fri, 13 Sep 1991 21:45:27 +0000
Subject: [PATCH] Lagt till distclean.

---
 config/Makefile                  |  3 +++
 config/balance-defs.make         |  7 ++++---
 config/sun4os4-defs.make         |  7 ++++---
 doc/man/Makefile                 |  8 ++++++++
 scripts/Makefile                 |  3 +++
 scripts/sub-clean.make           |  8 ++++++++
 src/include/Makefile             | 10 +++++++++-
 src/libraries/libansi/Makefile   |  3 +++
 src/libraries/libcommon/Makefile |  3 +++
 src/libraries/libmisc/Makefile   |  3 +++
 src/server/Makefile              |  7 +++++--
 11 files changed, 53 insertions(+), 9 deletions(-)

diff --git a/config/Makefile b/config/Makefile
index 9f24795a0..0dcb2b412 100644
--- a/config/Makefile
+++ b/config/Makefile
@@ -14,4 +14,7 @@ binaries:;
 clean:
 	$(RM) $(GENERIC-CLEAN)
 
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN)
+
 depend:;
diff --git a/config/balance-defs.make b/config/balance-defs.make
index d710685ab..3b92c044c 100644
--- a/config/balance-defs.make
+++ b/config/balance-defs.make
@@ -1,4 +1,4 @@
-# $Id: balance-defs.make,v 1.3 1991/09/08 21:09:06 ceder Exp $
+# $Id: balance-defs.make,v 1.4 1991/09/13 21:45:23 linus Exp $
 # This file is included by all Makefiles in the LysKOM hierarchy.
 # It gives default values for all variables that is normally used. 
 # TOPDIR and SCRIPTDIR must be set before this file is included.
@@ -39,8 +39,9 @@ LYSKOMUSRBIN = /usr/local/bin
 
 
 
-GENERIC-CLEAN = *~ *.o lib*.a dependencies core TAGS temp-Makefile  \
-	 temp-?-Makefile Topdir.make
+GENERIC-CLEAN = *~ *.o lib*.a core temp-Makefile temp-?-Makefile
+
+GENERIC-DIST-CLEAN = TAGS Topdir.make dependencies
 
 EXPORTS =
 
diff --git a/config/sun4os4-defs.make b/config/sun4os4-defs.make
index 915b7cbbd..2c45b430f 100644
--- a/config/sun4os4-defs.make
+++ b/config/sun4os4-defs.make
@@ -1,4 +1,4 @@
-# $Id: sun4os4-defs.make,v 1.4 1991/09/13 20:22:19 ceder Exp $
+# $Id: sun4os4-defs.make,v 1.5 1991/09/13 21:45:19 linus Exp $
 # This file is included by all Makefiles in the LysKOM hierarchy.
 # It gives default values for all variables that is normally used. 
 # TOPDIR and SCRIPTDIR must be set before this file is included.
@@ -40,8 +40,9 @@ LYSKOMUSRBIN = /usr/local/bin
 
 
 
-GENERIC-CLEAN = *~ *.o lib*.a dependencies core TAGS temp-Makefile  \
-	 temp-?-Makefile Topdir.make
+GENERIC-CLEAN = *~ *.o lib*.a core temp-Makefile temp-?-Makefile
+
+GENERIC-DIST-CLEAN = TAGS Topdir.make dependencies
 
 EXPORTS =
 
diff --git a/doc/man/Makefile b/doc/man/Makefile
index 97c8fe8ab..70ed938cb 100644
--- a/doc/man/Makefile
+++ b/doc/man/Makefile
@@ -17,6 +17,14 @@ clean:
 	   (cd man$$i; $(RM) *~ core) } \
 	done
 
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN)
+	-for i in $(MANEXTS); \
+	do \
+	   [ -d man$$i ] && { echo making clean in directory man$$i; \
+	   (cd man$$i; $(RM) *.ps *.cat *.man *.txt) } \
+	done
+
 install:
 	for i in $(MANEXTS); \
 	do \
diff --git a/scripts/Makefile b/scripts/Makefile
index ac6306c77..89467acad 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -13,3 +13,6 @@ binaries:;
 
 clean:
 	$(RM) $(GENERIC-CLEAN)
+
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN)
diff --git a/scripts/sub-clean.make b/scripts/sub-clean.make
index facec7de3..56aee0371 100644
--- a/scripts/sub-clean.make
+++ b/scripts/sub-clean.make
@@ -6,3 +6,11 @@ clean:
 	   [ -d $$i ] && { echo making clean in directory $$i; \
 	   (cd $$i; $(MAKE) $(EXPORTS) clean) } \
 	done
+
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN)
+	-for i in $(SUBDIRS); \
+	do \
+	   [ -d $$i ] && { echo making distclean in directory $$i; \
+	   (cd $$i; $(MAKE) $(EXPORTS) distclean) } \
+	done
diff --git a/src/include/Makefile b/src/include/Makefile
index e762b945a..bf9edbeb2 100644
--- a/src/include/Makefile
+++ b/src/include/Makefile
@@ -35,4 +35,12 @@ clean:
 		(cd $$i; $(MAKE) $(EXPORTS) clean); } \
 	done
 
-depend:;
\ No newline at end of file
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN)
+	for i in $(SUBDIRS); \
+	do	\
+		[ -d $$i ] && { echo making distclean in directory $$i; \
+		(cd $$i; $(MAKE) $(EXPORTS) distclean); } \
+	done
+
+depend:;
diff --git a/src/libraries/libansi/Makefile b/src/libraries/libansi/Makefile
index 7b6d7c792..4e06a5993 100644
--- a/src/libraries/libansi/Makefile
+++ b/src/libraries/libansi/Makefile
@@ -25,6 +25,9 @@ binaries:;
 clean:
 	$(RM) ${LIBOBJS} $(GENERIC-CLEAN)
 
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN)
+
 
 # Recreate the Makefile
 include $(SCRIPTDIR)/Single-depend.make
diff --git a/src/libraries/libcommon/Makefile b/src/libraries/libcommon/Makefile
index 9497ddcd1..da160b04d 100644
--- a/src/libraries/libcommon/Makefile
+++ b/src/libraries/libcommon/Makefile
@@ -43,6 +43,9 @@ liblyskom-client.a: client-dir
 
 clean:
 	$(RM) $(GENERIC-CLEAN) $(LIBRARIES)
+
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN)
 	$(RM) -r client-dir server-dir
 
 libraries: includes all 
diff --git a/src/libraries/libmisc/Makefile b/src/libraries/libmisc/Makefile
index 87a797411..4df6d7245 100644
--- a/src/libraries/libmisc/Makefile
+++ b/src/libraries/libmisc/Makefile
@@ -33,6 +33,9 @@ testnumlist: testnumlist.o numlist.o
 clean:
 	$(RM) ${OBJECTS} $(GENERIC-CLEAN) Distfile testnumlist
 
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN)
+
 
 # Recreate the Makefile
 include $(SCRIPTDIR)/Single-depend.make
diff --git a/src/server/Makefile b/src/server/Makefile
index f3d16e7c0..112a9f020 100755
--- a/src/server/Makefile
+++ b/src/server/Makefile
@@ -1,4 +1,4 @@
-# $Id: Makefile,v 0.12 1991/09/08 21:08:47 ceder Exp $
+# $Id: Makefile,v 0.13 1991/09/13 21:45:06 linus Exp $
 
 include Topdir.make
 SCRIPTDIR = $(TOPDIR)/scripts
@@ -114,7 +114,10 @@ install:  $(PROGRAMS)
 # Don't strip ramkomd - we want debugging info!
 
 clean:
-	$(RM) $(GENERIC-CLEAN) $(PROGRAMS) $(SPECIALS)
+	$(RM) $(GENERIC-CLEAN) $(PROGRAMS)
+
+distclean: clean
+	$(RM) $(GENERIC-DIST-CLEAN) $(SPECIALS)
 
 specials: $(SPECIALS)
 
-- 
GitLab