5 # Our current make(1)-based approach to dependency tracking cannot cope with
6 # certain source tree changes, including:
7 # - removing source files
8 # - replacing generated files with files committed to the tree
9 # - changing file extensions (e.g. a C source file rewritten in C++)
11 # We handle those cases here in an ad-hoc fashion by looking for the known-
12 # bad case in the main .depend file, and if found deleting all of the related
13 # .depend files (including for example the lib32 version).
16 if [ ! -d "$OBJTOP" ]; then
17 echo "usage: $(basename $0) objtop" >&2
22 # $2 source filename w/o extension
26 if [ -e "$OBJTOP"/$1/.depend.$2.pico ] && \
27 egrep -qw "$2\.$3" "$OBJTOP"/$1/.depend.$2.pico; then \
28 echo "Removing stale dependencies for $2.$3"; \
29 rm -f "$OBJTOP"/$1/.depend.$2.* \
30 "$OBJTOP"/obj-lib32/$1/.depend.$2.*
34 # Date Rev Description
35 # 20190916 r352703 shm_open syscall reimplemented in C
36 clean_dep lib/libc shm_open S
37 # 20200310 r358851 rename of openmp's ittnotify_static.c to .cpp
38 clean_dep lib/libomp ittnotify_static c
39 # 20200414 r359930 closefrom
40 clean_dep lib/libc closefrom S