[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6161] Add Windows support to jrtangle.
From: |
Arnold Robbins |
Subject: |
[6161] Add Windows support to jrtangle. |
Date: |
Fri, 27 Feb 2015 08:49:20 +0000 |
Revision: 6161
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6161
Author: arnold
Date: 2015-02-27 08:49:19 +0000 (Fri, 27 Feb 2015)
Log Message:
-----------
Add Windows support to jrtangle.
Modified Paths:
--------------
trunk/texindex/ChangeLog
trunk/texindex/jrtangle
trunk/texindex/jrweave
Modified: trunk/texindex/ChangeLog
===================================================================
--- trunk/texindex/ChangeLog 2015-02-26 21:36:43 UTC (rev 6160)
+++ trunk/texindex/ChangeLog 2015-02-27 08:49:19 UTC (rev 6161)
@@ -1,3 +1,9 @@
+2015-02-27 Arnold D. Robbins <address@hidden>
+
+ * jrweave, jrtangle: Updated to current version. In particular,
+ jrtangle should work out of the box on Windows, thanks to
+ Eli Zaretskii.
+
2015-01-08 Karl Berry <address@hidden>
* version.texi: remove, no easy way to automatically update it.
Modified: trunk/texindex/jrtangle
===================================================================
--- trunk/texindex/jrtangle 2015-02-26 21:36:43 UTC (rev 6160)
+++ trunk/texindex/jrtangle 2015-02-27 08:49:19 UTC (rev 6161)
@@ -1,6 +1,6 @@
#! /usr/local/bin/gawk -f
#
-# Copyright (C) 2013, 2014 Arnold David Robbins
+# Copyright (C) 2013, 2014, 2015 Arnold David Robbins
#
# This file is part of TexiWeb Jr., a literate programming system.
#
@@ -372,20 +372,31 @@
next
}
BEGIN {
- Update_recipe = \
- "PATH=/bin:/usr/bin\n" \
- "export PATH\n" \
- "destname=\"@DIR@/@address@hidden"\n" \
- "outname=\"address@hidden@\"\n" \
- "if [ ! -f \"$destname\" ]\n" \
- "then\n" \
- "\tmv \"$outname\" \"$destname\"\n" \
- "elif cmp -s \"$outname\" \"$destname\" > /dev/null\n" \
- "then\n" \
- "\trm \"$outname\"\n" \
- "else\n" \
- "\tmv \"$outname\" \"$destname\"\n" \
- "fi\n"
+ # This condition should distinguish between the native and
+ # MSYS (POSIX-ish) Gawk. We rely on the fact that MSYS mounts
+ # /tmp and sets $TEMP to point to it, but resets the value
+ # back to the native C:/Foo/Bar value when invoking native
+ # programs.
+ if (ENVIRON["TEMP"] ~ /^[A-Z]:[\\\/]/) {
+ # MS-Windows recipe
+ Update_recipe = \
+ "fc /B \"@address@hidden@address@hidden"
\"@address@hidden@FILE@@address@hidden" >nul 2>&1 || move /Y
\"@address@hidden@address@hidden" \"@address@hidden@FILE@@address@hidden" >nul"
+ } else {
+ # POSIX recipe
+ Update_recipe = \
+ "PATH=/bin:/usr/bin\n" \
+ "export PATH\n" \
+ "destname=\"@DIR@/@address@hidden"\n" \
+ "outname=\"address@hidden@\"\n" \
+ "if [ ! -f \"$destname\" ]\n" \
+ "then\n" \
+ "\tmv \"$outname\" \"$destname\"\n" \
+ "elif cmp -s \"$outname\" \"$destname\" > /dev/null\n" \
+ "then\n" \
+ "\trm \"$outname\"\n" \
+ "else\n" \
+ "\tmv \"$outname\" \"$destname\"\n" \
+ "fi\n"
}
/address@hidden:space:]]*$/,
/address@hidden file_update_recipe[[:space:]]*$/ {
@@ -445,7 +456,7 @@
results["output"] = (dir "/" file suffix)
}
BEGIN {
- if (Debug ~ /shell/)
+ if (Debug ~ /shell/ && ENVIRON["TEMP"] !~ /^[A-Z]:[\\\/]/)
if (length(Shell_debug) == 0)
Shell_debug = "set -x; "
}
Modified: trunk/texindex/jrweave
===================================================================
--- trunk/texindex/jrweave 2015-02-26 21:36:43 UTC (rev 6160)
+++ trunk/texindex/jrweave 2015-02-27 08:49:19 UTC (rev 6161)
@@ -1,6 +1,6 @@
#! /usr/local/bin/gawk -f
#
-# Copyright (C) 2013, 2014 Arnold David Robbins
+# Copyright (C) 2013, 2014, 2015 Arnold David Robbins
#
# This file is part of TexiWeb Jr., a literate programming system.
#
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6161] Add Windows support to jrtangle.,
Arnold Robbins <=