Description: Fix make clean
Author: Carsten Leonhardt <leo@debian.org>
Last-Update: 2024-01-25

--- a/Makefile.in
+++ b/Makefile.in
@@ -209,7 +209,7 @@
 	      $(MAKE) DESTDIR=$(DESTDIR) -C $$I clean ; done
 
 # clean for distribution
-distclean:
+distclean: clean
 	@for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
 	@for I in $(all_subdirs); do (cd $$I && $(RMF) startit stopit btraceback); done
 	@(cd $(srcdir) && $(RMF) *~ config.cache config.h config.log config.status config.out)
@@ -221,6 +221,8 @@
 	@$(RMF) working/* kerns-*
 	@$(RMF) -rf txt diff src/python src/testprogs
 	@$(RMF) libtool
+# clean up files generated by configure (e.g. Makefile.in exists -> rm Makefile)
+	find * -name "*.in" | sed 's/.in$$//' | xargs rm -f
 
 devclean:
 	@for I in $(all_subdirs); do (cd $$I && $(MAKE) $@ || exit 1); done
--- a/src/console/Makefile.in
+++ b/src/console/Makefile.in
@@ -74,7 +74,7 @@
 
 clean:	libtool-clean
 	@$(RMF) console bconsole core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
-	@$(RMF) static-console static-bconsole gmon.out
+	@$(RMF) static-console static-bconsole gmon.out bbconsjson
 
 realclean: clean
 	@$(RMF) tags console.conf bconsole.conf
--- a/src/filed/Makefile.in
+++ b/src/filed/Makefile.in
@@ -139,7 +139,7 @@
 
 clean:	libtool-clean
 	@$(RMF) bacula-fd filed core core.* a.out *.o *.bak *~ *.intpro *.extpro 1 2 3
-	@$(RMF) static-bacula-fd
+	@$(RMF) static-bacula-fd bfdjson
 	@if test -f win32/Makefile -a "${GMAKE}" != "none"; then \
 	   (cd win32; $(GMAKE) clean); \
 	fi
--- a/src/tools/Makefile.in
+++ b/src/tools/Makefile.in
@@ -40,7 +40,7 @@
 DIRCONFOBJS = ../dird/dird_conf.o ../dird/run_conf.o ../dird/inc_conf.o ../dird/ua_acl.o
 
 NODIRTOOLS = bsmtp
-DIRTOOLS = bsmtp dbcheck drivetype fstype testfind testls bregex bwild bbatch bregtest bvfs_test
+DIRTOOLS = bsmtp dbcheck drivetype fstype testfind testls bregex bwild bbatch bregtest bvfs_test gigaslam grow
 TOOLS = $(@DIR_TOOLS@)
 
 INSNODIRTOOLS = bsmtp
