Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tools/gcc add something to auto-detect when GCC has changed ...
details: https://anonhg.NetBSD.org/src/rev/9647c4ea7230
branches: trunk
changeset: 460843:9647c4ea7230
user: mrg <mrg%NetBSD.org@localhost>
date: Wed Nov 06 07:26:31 2019 +0000
description:
add something to auto-detect when GCC has changed from gcc to gcc.old
or back and auto-cleandir tools/gcc.
based upon the code for PREVIOUSTOOLDIR in tools/Makefile.
diffstat:
tools/gcc/Makefile | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diffs (37 lines):
diff -r da68ad366326 -r 9647c4ea7230 tools/gcc/Makefile
--- a/tools/gcc/Makefile Wed Nov 06 06:57:22 2019 +0000
+++ b/tools/gcc/Makefile Wed Nov 06 07:26:31 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.96 2019/10/24 03:19:14 christos Exp $
+# $NetBSD: Makefile,v 1.97 2019/11/06 07:26:31 mrg Exp $
.include <bsd.hostinit.mk>
@@ -254,6 +254,27 @@
true
@touch $@
+.if !defined(PREV_GCC)
+. if exists(PREV_GCC)
+PREV_GCC!= cat PREV_GCC
+. else
+PREV_GCC=
+. endif
+.endif
+
+CLEANFILES+= PREV_GCC
+
+realall realdepend: .MAKE
+.if !empty(PREV_GCC) && "${PREV_GCC}" != "${EXTERNAL_GCC_SUBDIR}-${HAVE_GCC}"
+ @echo "*** WARNING: GCC has changed version?"
+ @echo "*** PREV_GCC '${PREV_GCC}'"
+ @echo "*** != EXTERNAL_GCC_SUBDIR-HAVE_GCC '${EXTERNAL_GCC_SUBDIR}-${HAVE_GCC}'"
+ @echo "*** Cleaning mis-matched tools/gcc"
+ rm -f PREV_GCC
+ (cd ${.CURDIR} && ${MAKE} cleandir)
+.endif
+ echo ${EXTERNAL_GCC_SUBDIR}-${HAVE_GCC} >PREV_GCC
+
clean: clean.native
clean.native:
-rm -r -f .native
Home |
Main Index |
Thread Index |
Old Index