[anjuta] Use distinct temp filenames to fix parallel build



commit bc1fead1a54dd659300e8f3bc0c26f006cabe375
Author: Daniel Elstner <danielk openismus com>
Date:   Wed Aug 26 14:02:07 2009 +0200

    Use distinct temp filenames to fix parallel build
    
    * plugins/file-manager/Makefile.am (file-view-marshal.[ch]): Choose
    a name for the temporary output file that is more likely to be unique
    than "xgen-gmc".  Also rewrite the commands to something more proper
    and portable.

 plugins/file-manager/Makefile.am |   24 ++++++++++++------------
 1 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/plugins/file-manager/Makefile.am b/plugins/file-manager/Makefile.am
index 6e8a99c..2090cf4 100644
--- a/plugins/file-manager/Makefile.am
+++ b/plugins/file-manager/Makefile.am
@@ -59,18 +59,18 @@ libfile_manager_la_LIBADD = \
 	$(GDL_LIBS) \
 	$(GIO_LIBS)
 
-file-view-marshal.h: file-view-marshal.list
-	@GLIB_GENMARSHAL@ \
-	        --prefix=file_view_cclosure_marshal $< --header > xgen-gmc \
-	&& cp xgen-gmc $(@F) \
-	&& rm -f xgen-gmc
-
-file-view-marshal.c: file-view-marshal.list
-	echo "#include \"file-view-marshal.h\"" > xgen-gmc \
-	&& @GLIB_GENMARSHAL@ \
-	        --prefix=file_view_cclosure_marshal $< --body >> xgen-gmc \
-	&& cp xgen-gmc $(@F) \
-	&& rm -f xgen-gmc	
+file-view-marshal.h: $(srcdir)/file-view-marshal.list
+	if $(GLIB_GENMARSHAL) --prefix=file_view_cclosure_marshal \
+	   --header $(srcdir)/file-view-marshal.list >.genmarshal-$@; \
+	then mv -f .genmarshal-$@ $@; \
+	else rm -f .genmarshal-$@; fi
+
+file-view-marshal.c: $(srcdir)/file-view-marshal.list
+	if { echo '#include "file-view-marshal.h"' && $(GLIB_GENMARSHAL) \
+	     --prefix=file_view_cclosure_marshal --body $(srcdir)/file-view-marshal.list; \
+	   } >.genmarshal-$@; \
+	then mv -f .genmarshal-$@ $@; \
+	else rm -f .genmarshal-$@; fi
 
 prefs_ui_files = file-manager.ui
 include $(top_srcdir)/scripts/build-schemas.mk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]