Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Nov 2022 05:19:09 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 838a06141730 - main - depend-cleanup.sh: Handle rs(1) moving to C++.
Message-ID:  <202211160519.2AG5J99p012694@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=838a061417300678f8604abb9fc6ade8d1bf61b8

commit 838a061417300678f8604abb9fc6ade8d1bf61b8
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-11-16 05:17:28 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-11-16 05:17:28 +0000

    depend-cleanup.sh: Handle rs(1) moving to C++.
    
    To support changes in filenames for programs (and not just libraries),
    update clean_dep() to check .depend.foo.o files as well as
    .depend.foo.pico files.
---
 tools/build/depend-cleanup.sh | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanup.sh
index 35066ee7f921..195162d3efc8 100755
--- a/tools/build/depend-cleanup.sh
+++ b/tools/build/depend-cleanup.sh
@@ -37,6 +37,15 @@ clean_dep()
 		    "$OBJTOP"/obj-lib32/$1/.depend.$2.* \
 		    "$OBJTOP"/obj-lib32/$1/$2.*o
 	fi
+	if [ -e "$OBJTOP"/$1/.depend.$2.o ] && \
+	    egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.o; then \
+		echo "Removing stale dependencies and objects for $2.$3"; \
+		rm -f \
+		    "$OBJTOP"/$1/.depend.$2.* \
+		    "$OBJTOP"/$1/$2.*o \
+		    "$OBJTOP"/obj-lib32/$1/.depend.$2.* \
+		    "$OBJTOP"/obj-lib32/$1/$2.*o
+	fi
 }
 
 # Date      Rev      Description
@@ -98,3 +107,6 @@ if stat "$OBJTOP"/tests/sys/kqueue/libkqueue/*kqtest* \
 	rm -f "$OBJTOP"/tests/sys/kqueue/libkqueue/.depend.* \
 	   "$OBJTOP"/tests/sys/kqueue/libkqueue/*
 fi
+
+# 20221115  42d10b1b56f2    move from rs.c to rs.cc
+clean_dep   usr.bin/rs      rs c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202211160519.2AG5J99p012694>