changeset 37062:3e8707a64e46

(.NOTPARALLEL, .NO_PARALLEL): New special targets. (${TIT}): If the target file already exist, don't remake it.
author Gerd Moellmann <gerd@gnu.org>
date Thu, 29 Mar 2001 14:26:20 +0000
parents e5b70de7b794
children 98458fd6ac46
files leim/Makefile.in
diffstat 1 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/leim/Makefile.in	Thu Mar 29 14:25:52 2001 +0000
+++ b/leim/Makefile.in	Thu Mar 29 14:26:20 2001 +0000
@@ -150,13 +150,25 @@
 	mkdir $@
 	touch stamp-subdir
 
+# The rule which generates ${TIT} files creates them all in one go.
+# So we need to prevent parallel execution for that target, otherwise
+# Emacs complains about files being locked.  .NOTPARALLEL is for GNU
+# Make, .NO_PARALLEL is for other Make's.
+.NOTPARALLEL: ${TIT}
+
+.NO_PARALLEL: ${TIT}
+
 # Rule to generate quail/*.el from CXTERM-DIC/*.tit.
+# The "if [ -f $@ ]; then true; " part prevents parallel Make's
+# which don't honor .NOTPARALLEL, such as SGI's Make.
 ${TIT}:
 	if [ -d quail ]; then true; else make quail; fi
-	${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
-	    --eval '(batch-titdic-convert t)' -dir quail ${srcdir}/CXTERM-DIC
-	${RUN-EMACS}  -l ${buildlisppath}/international/quail \
-	    -f batch-byte-compile ${TIT:.elc=.el}
+	if [ -f $@ ]; then true; else \
+	 ${RUN-EMACS} -l ${buildlisppath}/international/titdic-cnv \
+	  --eval '(batch-titdic-convert t)' -dir quail ${srcdir}/CXTERM-DIC; fi
+	if [ -f $@ ]; then true; else \
+	  ${RUN-EMACS}  -l ${buildlisppath}/international/quail \
+	   -f batch-byte-compile ${TIT:.elc=.el}; fi
 
 leim-list.el: ${SUBDIRS} ${WORLD}
 	if [ x`(cd ${srcdir} && /bin/pwd)` = x`(/bin/pwd)` ] ; then \