This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

`make clean-target' should clean target libgcc too


Whenever something relevant is changed in the compiler, I find myself
having to run not only `make clean-target', but also to remove
gcc/libgcc, because, unlike crtstuff's, libgcc's object files don't
depend on cc1.  This patches arranges for `make clean-target' to also
clean up libgcc.  Ok to install?

Index: ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* Makefile.in (clean-target-libgcc): Remove gcc/libgcc.
	(clean-target): Depend on it.

Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/egcs/Makefile.in,v
retrieving revision 1.50
diff -u -r1.50 Makefile.in
--- Makefile.in	2000/07/24 04:33:01	1.50
+++ Makefile.in	2000/07/26 13:36:41
@@ -1101,7 +1052,12 @@
 	  true; \
 	fi
 
-clean-target: $(CLEAN_TARGET_MODULES)
+clean-target: $(CLEAN_TARGET_MODULES) clean-target-libgcc
+clean-target-libgcc:
+	test ! -d gcc/libgcc || \
+	(cd gcc/libgcc && find . -type d -print) | \
+	while read d; do rm -f gcc/$$d/libgcc.a || : ; done
+	-rm -rf gcc/libgcc
 
 # Check target.
 

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]