]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* depcomp: Altered sed clause to strip of inclusion depth
authorAkim Demaille <akim@epita.fr>
Tue, 17 Oct 2000 08:29:44 +0000 (08:29 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 17 Oct 2000 08:29:44 +0000 (08:29 +0000)
ChangeLog
THANKS
depcomp
lib/depcomp

index 1f69a91668c72186383aed282e94b6aae1f61553..c923879abfba3887c1da7c58fc4780ee88d9bfe1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2000-10-17  Alex Hornby <alex@anvil.com>
+
+       * depcomp: Altered sed clause to strip of inclusion depth
+       numbers generated by cpp. Also output in gcc style.
+
 2000-10-16  Morten Eriksen  <mortene@sim.no>
 
        * depcomp (msvisualcpp): New dependency tracking mode, for
diff --git a/THANKS b/THANKS
index 8101930cd83a90a03b67dc049c4f662ce9f8806e..79a7db7ffa64117c862564f838ecea6d969e4d4b 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -85,6 +85,7 @@ Michael Brantley      Michael-Brantley@deshaw.com
 Michel de Ruiter       mdruiter@cs.vu.nl
 Miles Bader            miles@ccs.mt.nec.co.jp
 Miodrag Vallat         miodrag@ifrance.com
+Morten Eriksen         mortene@sim.no
 Motoyuki Kasahara      m-kasahr@sra.co.jp
 Motoyuki Kasahara      m-kasahr@sra.co.jp
 Nicolas Thiery         nthiery@Icare.mines.edu
diff --git a/depcomp b/depcomp
index 4779ed079def195dcb4e9ec74d61ad5afef33b60..0a92302ec9790cbb8243d55b4f190a159a07f2d6 100755 (executable)
--- a/depcomp
+++ b/depcomp
@@ -248,7 +248,7 @@ cpp)
     *" --mode=compile "*)
       for arg
       do # cycle over the arguments
-        case "$arg" in
+        case $arg in
        "--mode=compile")
          # insert --quiet before "--mode=compile"
          set fnord "$@" --quiet
@@ -262,7 +262,8 @@ cpp)
       ;;
     esac
     "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)"/ s::'"$object"'\: \1:p' > "$tmpdepfile"
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
   ) &
   proc=$!
   "$@"
@@ -270,8 +271,9 @@ cpp)
   wait "$proc"
   if test "$stat" != 0; then exit $stat; fi
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed < "$tmpdepfile" -e 's/^[^:]*: //' -e 's/$/ :/' >> "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
index 4779ed079def195dcb4e9ec74d61ad5afef33b60..0a92302ec9790cbb8243d55b4f190a159a07f2d6 100755 (executable)
@@ -248,7 +248,7 @@ cpp)
     *" --mode=compile "*)
       for arg
       do # cycle over the arguments
-        case "$arg" in
+        case $arg in
        "--mode=compile")
          # insert --quiet before "--mode=compile"
          set fnord "$@" --quiet
@@ -262,7 +262,8 @@ cpp)
       ;;
     esac
     "$@" -E |
-    sed -n '/^# [0-9][0-9]* "\([^"]*\)"/ s::'"$object"'\: \1:p' > "$tmpdepfile"
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
   ) &
   proc=$!
   "$@"
@@ -270,8 +271,9 @@ cpp)
   wait "$proc"
   if test "$stat" != 0; then exit $stat; fi
   rm -f "$depfile"
-  cat < "$tmpdepfile" > "$depfile"
-  sed < "$tmpdepfile" -e 's/^[^:]*: //' -e 's/$/ :/' >> "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;