+2002-09-24 Ken Raeburn <raeburn@mit.edu>
+
+ * pre.in (.et.c, .et.h): Change rules to only update the desired
+ target file, by using temporary files; this makes them safe for
+ use in parallel builds.
+
2002-09-19 Ezra Peisach <epeisach@bu.edu>
* post.in (Makefile): Revert change until aclocal.m4 fixed.
.SUFFIXES: .h .c .et .ct
+# These versions cause both .c and .h files to be generated at once.
+# But GNU make doesn't understand this, and parallel builds can trigger
+# both of them at once, causing them to stomp on each other. The versions
+# below only update one of the files, so compile_et has to get run twice,
+# but it won't break parallel builds.
+#.et.h: ; $(COMPILE_ET) $<
+#.et.c: ; $(COMPILE_ET) $<
+
.et.h:
- $(COMPILE_ET) $<
+ set -x ; d=ettmp$$$$ ; (cp $< $$d.et && $(COMPILE_ET) $$d.et && mv $$d.h $*.h) ; \
+ e=$$? ; rm -f $$d.* ; exit $$e
.et.c:
- $(COMPILE_ET) $<
+ set -x ; d=ettmp$$$$ ; (cp $< $$d.et && $(COMPILE_ET) $$d.et && mv $$d.c $*.c) ; \
+ e=$$? ; rm -f $$d.* ; exit $$e
# rule to make object files
#