Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F133520002
D24228.id70015.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
2 KB
Referenced Files
None
Subscribers
None
D24228.id70015.diff
View Options
Index: Makefile.inc1
===================================================================
--- Makefile.inc1
+++ Makefile.inc1
@@ -927,17 +927,8 @@
# replacing generated files. Handle these cases here in an ad-hoc fashion.
_cleanobj_fast_depend_hack: .PHONY
@echo ">>> Deleting stale dependencies...";
+ sh ${.CURDIR}/tools/build/depend-cleanup.sh ${OBJTOP}
# Date SVN Rev Syscalls/Changes
-# 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp
-.for f in ittnotify_static
- @if [ -e "${OBJTOP}/lib/libomp/.depend.${f}.pico" ] && \
- egrep -qw '${f}\.c' ${OBJTOP}/lib/libomp/.depend.${f}.pico; then \
- echo "Removing stale dependencies for ${f}"; \
- rm -f ${OBJTOP}/lib/libomp/.depend.${f}.* \
- ${OBJTOP}/obj-lib32/lib/libomp/.depend.${f}.* \
- ${LIBCOMPAT:D${LIBCOMPAT_OBJTOP}/lib/libomp/.depend.${f}.*}; \
- fi
-.endfor
# Syscall stubs rewritten in C and obsolete MD assembly implementations
# 20191009 r353340 removal of opensolaris_atomic.S (also r353381)
.if ${MACHINE} != i386
Index: tools/build/depend-cleanup.sh
===================================================================
--- /dev/null
+++ tools/build/depend-cleanup.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+
+# Our current make(1)-based approach to dependency tracking cannot cope with
+# certain source tree changes, including:
+# - removing source files
+# - replacing generated files with files committed to the tree
+# - changing file extensions (e.g. a C source file rewritten in C++)
+#
+# We handle those cases here in an ad-hoc fashion by looking for the known-
+# bad case in the main .depend file, and if found deleting all of the related
+# .depend files (including for example the lib32 version).
+
+OBJTOP=$1
+if [ ! -d "$OBJTOP" ]; then
+ echo "usage: $(basename $0) objtop" >&2
+ exit 1
+fi
+
+# $1 directory
+# $2 source filename w/o extension
+# $3 source extension
+clean_dep()
+{
+ if [ -e "$OBJTOP"/$1/.depend.$2.pico ] && \
+ egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.pico; then \
+ echo "Removing stale dependencies for $2.$3"; \
+ rm -f "$OBJTOP"/$1/.depend.$2.* \
+ "$OBJTOP"/obj-lib32/$1/.depend.$2.*
+ fi
+}
+
+# Date Rev Description
+# 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp
+clean_dep lib/libomp ittnotify_static c
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Oct 27, 9:09 AM (15 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24285568
Default Alt Text
D24228.id70015.diff (2 KB)
Attached To
Mode
D24228: add shell script for stale dependency hack
Attached
Detach File
Event Timeline
Log In to Comment