changeset 22670:57f5337a9c28

Patch from dharding to allow pidgin to be built on win32 using MSYS 1.0.10 which includes a version of sed that doesn't handle in-place replacement. Fixes #5527.
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 15 Apr 2008 16:21:24 +0000
parents 5e6ab03225cc
children d632ea5dc9e5
files libpurple/win32/targets.mak
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/win32/targets.mak	Tue Apr 15 16:16:52 2008 +0000
+++ b/libpurple/win32/targets.mak	Tue Apr 15 16:21:24 2008 +0000
@@ -12,11 +12,10 @@
 	sed -e 's/@PLUGINS_DEFINE@/#define PURPLE_PLUGINS 1/' $@.in > $@
 
 $(PURPLE_VERSION_H): $(PURPLE_VERSION_H).in $(PIDGIN_TREE_TOP)/configure.ac
-	cp $@.in $@
 	awk 'BEGIN {FS="[\\(\\)\\[\\]]"} \
-	  /^m4_define..purple_major_version/ {system("sed -i -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $@");} \
-	  /^m4_define..purple_minor_version/ {system("sed -i -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $@");} \
-	  /^m4_define..purple_micro_version/ {system("sed -i -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $@"); exit}' $(PIDGIN_TREE_TOP)/configure.ac
+	  /^m4_define..purple_major_version/ {system("sed -e s/@PURPLE_MAJOR_VERSION@/"$$5"/ $@.in > $@");} \
+	  /^m4_define..purple_minor_version/ {system("sed -e s/@PURPLE_MINOR_VERSION@/"$$5"/ $@ > $@.tmp & mv $@.tmp $@");} \
+	  /^m4_define..purple_micro_version/ {system("sed -e s/@PURPLE_MICRO_VERSION@/"$$5"/ $@ > $@.tmp & mv $@.tmp $@"); exit}' $(PIDGIN_TREE_TOP)/configure.ac
 
 $(PURPLE_DLL) $(PURPLE_DLL).a: $(PURPLE_VERSION_H)
 	$(MAKE) -C $(PURPLE_TOP) -f $(MINGW_MAKEFILE) libpurple.dll