[gtksourceview] win32: fix sed portability issue
- From: Dieter Verfaillie <dieterv src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] win32: fix sed portability issue
- Date: Mon, 9 Jan 2012 19:34:43 +0000 (UTC)
commit c509478d59a29909f1f5e033d18cff9759f42859
Author: Dieter Verfaillie <dieterv optionexplicit be>
Date: Mon Jan 9 08:25:43 2012 +0100
win32: fix sed portability issue
When editing files in-place (sed -i) on windows, sed cannot
open the input file for read and for write at the same time.
We can fix this by not editing in-place but feed the input
file into sed's stdin and write stdout to a temporary file.
When done rename the temporary file on top of the input file.
Doing so achieves the same result and fixes the win32 sed
portability issue.
gtksourceview/Makefile.am | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gtksourceview/Makefile.am b/gtksourceview/Makefile.am
index 9372197..a882200 100644
--- a/gtksourceview/Makefile.am
+++ b/gtksourceview/Makefile.am
@@ -165,7 +165,7 @@ stamp-gtksourceview-typebuiltins.h: Makefile.am $(libgtksourceview_headers)
--eprod "GType @enum_name _get_type (void);\n" \
--eprod "G_END_DECLS\n\n" \
$(libgtksourceview_headers) ) > xgen-gth \
- && $(SED) -i -e 's/GTK_TYPE_SOURCE_/GTK_SOURCE_TYPE_/' xgen-gth \
+ && $(SED) -e 's/GTK_TYPE_SOURCE_/GTK_SOURCE_TYPE_/' <xgen-gth >xgen-gth.temp && mv xgen-gth.temp xgen-gth \
&& (cmp -s xgen-gth gtksourceview-typebuiltins.h || cp xgen-gth gtksourceview-typebuiltins.h) \
&& rm -f xgen-gth && echo stamp > $(@F)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]