[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch: `compile' fix
From: |
Tom Tromey |
Subject: |
Patch: `compile' fix |
Date: |
18 Jul 2001 00:23:23 -0600 |
This starts to fix the new test.
It doesn't fix it all though.
I'm checking this in.
Tom
Index: ChangeLog
from Tom Tromey <address@hidden>
* lib/compile: Change how lockdir is computed. If linking or
compiling without `-o', just run the compiler.
Index: lib/compile
===================================================================
RCS file: /cvs/automake/automake/lib/compile,v
retrieving revision 1.4
diff -u -r1.4 compile
--- lib/compile 2001/07/17 06:00:37 1.4
+++ lib/compile 2001/07/18 05:57:45
@@ -51,21 +51,23 @@
shift
done
-test -z "$ofile" && {
- echo "compile: no \`-o' option seen" 1>&2
- exit 1
-}
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$prog" $args
+fi
-test -z "$cfile" && {
- echo "compile: no \`.c' file seen" 1>&2
- exit 1
-}
-
# Name of file we expect compiler to create.
cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
# Create the lock directory.
-lockdir=`echo $ofile | sed -e 's|/|_|g'`
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
while true; do
if mkdir $lockdir > /dev/null 2>&1; then
break
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Patch: `compile' fix,
Tom Tromey <=