summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKen Raeburn <raeburn@mit.edu>2002-09-24 17:58:33 +0000
committerKen Raeburn <raeburn@mit.edu>2002-09-24 17:58:33 +0000
commitc151bfd6807b14f1c125f4b1d205c765a3a73031 (patch)
tree942f273ffa5a1745b9e50e4b829ca952b7873e14 /src
parent557f6d347801568a94143fcc77cab5a6deb3d6e0 (diff)
* 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. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14895 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/config/ChangeLog6
-rw-r--r--src/config/pre.in14
2 files changed, 18 insertions, 2 deletions
diff --git a/src/config/ChangeLog b/src/config/ChangeLog
index 9da9700d8..1ff8bd012 100644
--- a/src/config/ChangeLog
+++ b/src/config/ChangeLog
@@ -1,3 +1,9 @@
+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.
diff --git a/src/config/pre.in b/src/config/pre.in
index e7c751c15..8671396f9 100644
--- a/src/config/pre.in
+++ b/src/config/pre.in
@@ -317,11 +317,21 @@ COMPILE_ET-k5= $(BUILDTOP)/util/et/compile_et -d $(SRCTOP)/util/et
.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
#