More problems with aggressive parallel builds (make -j). The three rules: %-test.xdy : %.pl $(PERL) -I$(srcdir) $< $* %-doc.tex : %.pl $(PERL) -I$(srcdir) $< $* %.xdy : %.pl $(PERL) -I$(srcdir) $< $* must not run simultaneously or %-test.xdy could be destroyed. diff -ur -x Makefile.in xindy.orig/make-rules/alphabets/Makefile.am xindy/make-rules/alphabets/Makefile.am --- xindy/make-rules/alphabets/Makefile.am 2009-12-17 14:53:07.000000000 +0100 +++ xindy/make-rules/alphabets/Makefile.am 2009-12-02 20:34:28.000000000 +0100 @@ -892,14 +892,24 @@ %-lang.xdy : %-test.xdy sed -n '1,10 p' <$< >$@ +# Running "$(PERL) -I$(srcdir) $< $*" creates %-test.xdy, %-doc.tex, %.raw, +# and %.xdy; %-test.xdy is finished first. We must not run this command +# several times simultaneously (for details see Automake manual 27.9). %-test.xdy : %.pl $(PERL) -I$(srcdir) $< $* -%-doc.tex : %.pl - $(PERL) -I$(srcdir) $< $* - -%.xdy : %.pl - $(PERL) -I$(srcdir) $< $* +%-doc.tex %.xdy : %-test.xdy + @if test -f $@; then :; else \ + trap 'rm -rf $*.lock $<' 1 2 13 15; \ + if mkdir $*.lock 2>/dev/null; then \ + rm -f $<; \ + $(MAKE) $(AM_MAKEFLAGS) $<; \ + result=$$?; rm -rf $*.lock; exit $$result; \ + else \ + while test -d $*.lock; do sleep 1; done; \ + test -f $<; \ + fi; \ + fi SUBDIRS = \ albanian \ @@ -1264,5 +1274,3 @@ CLEANFILES = $(ALPHABETS) $(DOC_CLEAN) -.NOTPARALLEL: -