[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6258] Add texindex.bat for MS-Windows
From: |
Eli Zaretskii |
Subject: |
[6258] Add texindex.bat for MS-Windows |
Date: |
Sun, 10 May 2015 15:09:21 +0000 |
Revision: 6258
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6258
Author: eliz
Date: 2015-05-10 15:09:20 +0000 (Sun, 10 May 2015)
Log Message:
-----------
Add texindex.bat for MS-Windows
* util/texindex.bat: New file.
* util/Makefile.am (w32_bat): Add texindex.bat.
Modified Paths:
--------------
trunk/ChangeLog
trunk/util/Makefile.am
Added Paths:
-----------
trunk/util/texindex.bat
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-05-09 23:24:27 UTC (rev 6257)
+++ trunk/ChangeLog 2015-05-10 15:09:20 UTC (rev 6258)
@@ -1,3 +1,8 @@
+2015-05-10 Eli Zaretskii <address@hidden>
+
+ * util/texindex.bat: New file.
+ * util/Makefile.am (w32_bat): Add texindex.bat.
+
2015-05-09 Karl Berry <address@hidden>
* texindex/texindex.in: set awk_binary, not awk_configured.
Modified: trunk/util/Makefile.am
===================================================================
--- trunk/util/Makefile.am 2015-05-09 23:24:27 UTC (rev 6257)
+++ trunk/util/Makefile.am 2015-05-10 15:09:20 UTC (rev 6258)
@@ -16,7 +16,7 @@
bin_SCRIPTS = texi2dvi texi2pdf pdftexi2dvi
nodist_noinst_SCRIPTS = txixml2texi
-w32_bat = makeinfo.bat pod2texi.bat texi2any.bat
+w32_bat = makeinfo.bat pod2texi.bat texi2any.bat texindex.bat
if HOST_IS_WINDOWS
bin_SCRIPTS += $(w32_bat)
endif
Added: trunk/util/texindex.bat
===================================================================
--- trunk/util/texindex.bat (rev 0)
+++ trunk/util/texindex.bat 2015-05-10 15:09:20 UTC (rev 6258)
@@ -0,0 +1,58 @@
address@hidden off
+REM Copyright 2015 Free Software Foundation, Inc.
+REM
+REM This program is free software; you can redistribute it and/or modify
+REM it under the terms of the GNU General Public License as published by
+REM the Free Software Foundation; either version 3 of the License,
+REM or (at your option) any later version.
+REM
+REM This program is distributed in the hope that it will be useful,
+REM but WITHOUT ANY WARRANTY; without even the implied warranty of
+REM MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+REM GNU General Public License for more details.
+REM
+REM You should have received a copy of the GNU General Public License
+REM along with this program. If not, see <http://www.gnu.org/licenses/>.
+REM
+REM Originally written by Eli Zaretskii.
+REM Please send bug reports, etc. to address@hidden
+REM
+REM Batch file wrapper for the texindex.awk program.
+REM See the texindex shell script for more rationale.
+REM
+setlocal
+REM Directory where this script lives with a trailing backslash
+set mydir=%~dp0
+REM Allow the user override the awk interpreter location
+set awkbinary=
+if "%TEXINDEX_AWK%" == "" goto DefaultAwk
+set awkbinary=%TEXINDEX_AWK%
+if exist "%awkbinary%.exe" goto UserAwk
+if exist "%awkbinary%" goto UserAwk
+echo %0: TEXINDEX_AWK environment variable set, but its value
+echo %0: is not a readable file. Ignoring TEXINDEX_AWK.
+:DefaultAwk
+set awkbinary=gawk
+:UserAwk
+REM Find the texindex.awk script file
+set tiscript=
+if "%TEXINDEX_SCRIPT%" == "" goto DefaultScript
+set tiscript=%TEXINDEX_SCRIPT%
+if exist "%tiscript%" goto UserScript
+echo %0: TEXINDEX_SCRIPT environment variable set, but its value
+echo %0: is not a readable file. Ignoring TEXINDEX_SCRIPT.
+:DefaultScript
+REM In the development tree, the script is in ../texindex/
+set tiscript="%mydir%..\texindex\texindex.awk"
+if exist %tiscript% goto UserScript
+REM The installed script should be in the ../share/ directory relative to us
+set tiscript="%mydir%..\share\texindex.awk"
+REM If not found, abort
+if exist %tiscript% goto UserScript
+echo %0: could not locate texindex.awk script, quitting
+exit /b 1
+:UserScript
+REM Finally, invoke the script
+REM We do not use zeroth arg here because Gawk will interpret
+REM backslashes in the name such that e.g. \t becomes a TAB
+"%awkbinary%" -v Invocation_name="%~nx0" -f "%tiscript%" -- %*
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6258] Add texindex.bat for MS-Windows,
Eli Zaretskii <=