1
0
Эх сурвалжийг харах

Support nested objects for creating .deps dirs

Bryan Drewery 11 жил өмнө
parent
commit
21c5dc9e07

+ 9 - 3
build/autotools/includes/depend.m4

@@ -28,9 +28,9 @@ files="src/Makefile.in src/compat/Makefile.in src/crypto/Makefile.in src/mod/cha
 for mf in $files; do
   # Strip MF so we end up with the name of the file.
   mf=${mf%%:*}
-  dirpart=${mf%/*}
-  rm -f "$dirpart/.deps/includes"
-  test -d "$dirpart/.deps" || mkdir "$dirpart/.deps"
+  dirmf=${mf%/*}
+  rm -f "$dirmf/.deps/includes"
+  test -d "$dirmf/.deps" || mkdir "$dirmf/.deps"
   for file in `sed -n -e '
     /^OBJS = .*\\\\$/ {
       s/^OBJS = //
@@ -43,6 +43,12 @@ for mf in $files; do
     }
     /^OBJS = / s/^OBJS = //p' < "$mf"`;
   do
+    dirpart="${dirmf}/${file}"
+    dirpart="${dirpart%/*}"
+    if [[ "${dirpart}" != "${dirmf}" ]]; then
+      test -d "${dirpart}/.deps" || mkdir "${dirpart}/.deps"
+    fi
+    file="${file##*/}"
     suffix=${file##*.}
     base=${file%%.*}
     test -f "$dirpart/$base.cc" || test -f "$dirpart/$base.c" || continue

+ 9 - 3
configure

@@ -8867,9 +8867,9 @@ files="src/Makefile.in src/compat/Makefile.in src/crypto/Makefile.in src/mod/cha
 for mf in $files; do
   # Strip MF so we end up with the name of the file.
   mf=${mf%%:*}
-  dirpart=${mf%/*}
-  rm -f "$dirpart/.deps/includes"
-  test -d "$dirpart/.deps" || mkdir "$dirpart/.deps"
+  dirmf=${mf%/*}
+  rm -f "$dirmf/.deps/includes"
+  test -d "$dirmf/.deps" || mkdir "$dirmf/.deps"
   for file in `sed -n -e '
     /^OBJS = .*\\\\$/ {
       s/^OBJS = //
@@ -8882,6 +8882,12 @@ for mf in $files; do
     }
     /^OBJS = / s/^OBJS = //p' < "$mf"`;
   do
+    dirpart="${dirmf}/${file}"
+    dirpart="${dirpart%/*}"
+    if [ "${dirpart}" != "${dirmf}" ]; then
+      test -d "${dirpart}/.deps" || mkdir "${dirpart}/.deps"
+    fi
+    file="${file##*/}"
     suffix=${file##*.}
     base=${file%%.*}
     test -f "$dirpart/$base.cc" || test -f "$dirpart/$base.c" || continue