Re: [PATCH] Dependency tracking for Microsoft Visual C/C++

2000-10-17 Thread Akim Demaille

> "Alexandre" == Alexandre Oliva <[EMAIL PROTECTED]> writes:

Alexandre> We compute dependencies in parallel with the actual
Alexandre> compilation, but we mustn't consider the job done before
Alexandre> both are complete.

Ah!  Yes, I overlooked the ` "$@" '.  Thanks!




Re: [PATCH] Dependency tracking for Microsoft Visual C/C++

2000-10-16 Thread Alexandre Oliva

On Oct 16, 2000, Akim Demaille <[EMAIL PROTECTED]> wrote:

> | Hi,
> | this patch implements support for extracting dependency tracking
> | information by using the preprocessor mode of the Microsoft Visual
> | C/C++ compiler.

> Thanks, installed.

> Could someone explain to me why we launch it in background and then
> just wait for it to complete?

We compute dependencies in parallel with the actual compilation, but
we mustn't consider the job done before both are complete.

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicampoliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist*Please* write to mailing lists, not to me




Re: [PATCH] Dependency tracking for Microsoft Visual C/C++

2000-10-16 Thread Akim Demaille


| Hi,
| this patch implements support for extracting dependency tracking
| information by using the preprocessor mode of the Microsoft Visual
| C/C++ compiler.

Thanks, installed.

Could someone explain to me why we launch it in background and then
just wait for it to complete?




[PATCH] Dependency tracking for Microsoft Visual C/C++

2000-10-09 Thread Morten Eriksen

Hi,

this patch implements support for extracting dependency tracking
information by using the preprocessor mode of the Microsoft Visual
C/C++ compiler.

Regards,
Morten



Index: ChangeLog
===
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.891
diff -u -r1.891 ChangeLog
--- ChangeLog   2000/10/06 22:49:14 1.891
+++ ChangeLog   2000/10/09 17:46:26
@@ -1,3 +1,8 @@
+2000-10-09  Morten Eriksen  <[EMAIL PROTECTED]>
+
+   * depcomp (msvisualcpp): New dependency tracking mode, this one
+   works with Microsoft Visual C++.
+
 2000-10-06  Alexandre Duret-Lutz  <[EMAIL PROTECTED]>
 
* aclocal.in (add_file): Strip comments while scanning for
Index: depcomp
===
RCS file: /cvs/automake/automake/depcomp,v
retrieving revision 1.8
diff -u -r1.8 depcomp
--- depcomp 2000/08/20 15:58:45 1.8
+++ depcomp 2000/10/09 17:46:27
@@ -263,6 +272,44 @@
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
   sed < "$tmpdepfile" -e 's/^[^:]*: //' -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  ( IFS=" "
+case " $* " in
+*" --mode=compile "*)
+  for arg
+  do # cycle over the arguments
+case "$arg" in
+   "--mode=compile")
+ # insert --quiet before "--mode=compile"
+ set fnord "$@" --quiet
+ shift # fnord
+ ;;
+   esac
+   set fnord "$@" "$arg"
+   shift # fnord
+   shift # "$arg"
+  done
+  ;;
+esac
+"$@" -E |
+sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | 
+sort | uniq > "$tmpdepfile"
+  ) &
+  proc=$!
+  "$@"
+  stat=$?
+  wait "$proc"
+  if test "$stat" != 0; then exit $stat; fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> "$depfile"
+  echo "   " >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;