<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -246,13 +246,11 @@ lev_lex.o:   lev_lex.c $(HACK_H) ../include/lev_comp.h ../include/sp_lev.h
 ../include/lev_comp.h: lev_yacc.c
 
 lev_yacc.c: lev_comp.y
-	$(YACC) $(YACCDIST) -d lev_comp.y
-	mv $(YTABC) lev_yacc.c
-	mv $(YTABH) ../include/lev_comp.h
+	mkdir -p lev_comp_tmp
+	( cd lev_comp_tmp; $(YACC) $(YACCDIST) -d ../lev_comp.y; mv $(YTABC) ../lev_yacc.c; mv $(YTABH) ../../include/lev_comp.h )
 
 lev_lex.c: lev_comp.l
-	$(LEX) $(FLEXDIST) lev_comp.l
-	mv $(LEXYYC) lev_lex.c
+	( cd lev_comp_tmp; $(LEX) $(FLEXDIST) ../lev_comp.l; mv $(LEXYYC) ../lev_lex.c )
 
 # with all of extern.h's functions to complain about, we drown in
 # 'defined but not used' without -u
@@ -277,13 +275,11 @@ dgn_lex.o:   dgn_lex.c $(CONFIG.H) ../include/dgn_comp.h ../include/dgn_file.h
 ../include/dgn_comp.h: dgn_yacc.c
 
 dgn_yacc.c: dgn_comp.y
-	$(YACC) $(YACCDIST) -d dgn_comp.y
-	mv $(YTABC) dgn_yacc.c
-	mv $(YTABH) ../include/dgn_comp.h
+	mkdir -p dgn_comp_tmp
+	( cd dgn_comp_tmp; $(YACC) $(YACCDIST) -d ../dgn_comp.y; mv $(YTABC) ../dgn_yacc.c; mv $(YTABH) ../../include/dgn_comp.h )
 
 dgn_lex.c: dgn_comp.l
-	$(LEX) $(FLEXDIST) dgn_comp.l
-	mv $(LEXYYC) dgn_lex.c
+	( cd dgn_comp_tmp; $(LEX) $(FLEXDIST) ../dgn_comp.l; mv $(LEXYYC) ../dgn_lex.c )
 
 # with all of extern.h's functions to complain about, we drown in
 # 'defined but not used' without -u
@@ -416,6 +412,7 @@ spotless: clean
 	-rm -f ../include/lev_comp.h ../include/dgn_comp.h
 	-rm -f ../include/tile.h
 	-rm -f makedefs lev_comp dgn_comp recover dlb roll
+	-rm -rf lev_comp_tmp dgn_comp_tmp
 	-rm -f gif2txt txt2ppm tile2x11 tile2img.ttp xpm2img.ttp tilemap
 
 tileedit: tileedit.cpp $(TEXT_IO)</diff>
      <filename>sys/unix/Makefile.utl</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>1c9205517b643a6740454d7d58ecbfec31bffac4</id>
    </parent>
  </parents>
  <author>
    <name>Steven Noonan</name>
    <email>steven@uplinklabs.net</email>
  </author>
  <url>http://github.com/tycho/nethack/commit/cf34b76d5ba2710c38bae7b9879765ca0b4f2032</url>
  <id>cf34b76d5ba2710c38bae7b9879765ca0b4f2032</id>
  <committed-date>2009-08-30T19:53:42-07:00</committed-date>
  <authored-date>2009-08-30T18:39:48-07:00</authored-date>
  <message>Makefile.utl: prevent dgn_comp and lev_comp collisions

During a parallelized make (i.e., 'make -j3'), dgn_comp and lev_comp
would step on each others' toes by writing the same lex.yy.c, etc.

Fixed by giving dgn_comp and lev_comp their own working directory,
and moving the result to the appropriate location.

Signed-off-by: Steven Noonan &lt;steven@uplinklabs.net&gt;</message>
  <tree>ca9127e8b4fee5513e126bf21d685828e29e33d9</tree>
  <committer>
    <name>Steven Noonan</name>
    <email>steven@uplinklabs.net</email>
  </committer>
</commit>
