[PATCH] rebuild libgcc properly
Ben Elliston
bje@au1.ibm.com
Mon Oct 10 00:57:00 GMT 2005
Here is a simpler version of my original patch--I think it's better to keep the
knowledge of how to trigger recompilation in the Makefile, rather than requiring
users to know to rm -r libgcc or stmp-dirs.
This allows make clean-target to operate from the gcc build directory instead of the
top-level. Running make clean-target-libgcc still works at the top-level.
Okay for 4.2?
2005-10-10 Ben Elliston <bje@au.ibm.com>
* Makefile.tpl (clean-target-libgcc): Invoke clean-target-libgcc
from the gcc build directory.
* Makefile.in: Regenerate.
[gcc/ChangeLog]
2005-10-10 Ben Elliston <bje@au.ibm.com>
* Makefile.in (clean-target): Depend on clean-target-libgcc.
(clean-target-libgcc): Import rule from the top-level Makefile.in.
Index: Makefile.tpl
===================================================================
RCS file: /home/bje/gcc-cvs/gcc/Makefile.tpl,v
retrieving revision 1.145
diff -u -p -r1.145 Makefile.tpl
--- Makefile.tpl 6 Oct 2005 15:24:06 -0000 1.145
+++ Makefile.tpl 10 Oct 2005 00:51:29 -0000
@@ -840,11 +840,7 @@ realclean: maintainer-clean
# Extra dependency for clean-target, owing to the mixed nature of gcc
clean-target: 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
- -rm -f gcc/stmp-dirs
+ (cd gcc && $(MAKE) $@)
# Check target.
Index: gcc/Makefile.in
===================================================================
RCS file: /home/bje/gcc-cvs/gcc/gcc/Makefile.in,v
retrieving revision 1.1446.2.24
diff -u -p -r1.1446.2.24 Makefile.in
--- Makefile.in 5 Oct 2005 22:02:56 -0000 1.1446.2.24
+++ Makefile.in 10 Oct 2005 00:51:59 -0000
@@ -3448,6 +3448,18 @@ fsf-funding.pod: funding.texi
-$(TEXI2POD) $< > $@
#
+# clean-target removes target object files.
+# This can be added to over time.
+
+clean-target: clean-target-libgcc
+
+clean-target-libgcc:
+ test ! -d libgcc || \
+ (cd libgcc && find . -type d -print) | \
+ while read d; do rm -f $$d/libgcc.a || : ; done
+ -rm -r libgcc
+ -rm stmp-dirs
+
# Deletion of files made during compilation.
# There are four levels of this:
# `mostlyclean', `clean', `distclean' and `maintainer-clean'.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20051010/df366635/attachment.sig>
More information about the Gcc-patches
mailing list