summaryrefslogtreecommitdiff
path: root/support/intex/src
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/intex/src
Initial commit
Diffstat (limited to 'support/intex/src')
-rw-r--r--support/intex/src/Makefile395
-rw-r--r--support/intex/src/Makefile.am12
-rw-r--r--support/intex/src/Makefile.in395
-rwxr-xr-xsupport/intex/src/mkintex215
-rw-r--r--support/intex/src/mkintex.py215
-rw-r--r--support/intex/src/post-install.sh24
-rw-r--r--support/intex/src/post-install.sh.in24
-rw-r--r--support/intex/src/post-uninstall.sh24
-rw-r--r--support/intex/src/post-uninstall.sh.in24
9 files changed, 1328 insertions, 0 deletions
diff --git a/support/intex/src/Makefile b/support/intex/src/Makefile
new file mode 100644
index 0000000000..d25ca16d56
--- /dev/null
+++ b/support/intex/src/Makefile
@@ -0,0 +1,395 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# src/Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+
+pkgdatadir = $(datadir)/intex
+pkgincludedir = $(includedir)/intex
+pkglibdir = $(libdir)/intex
+pkglibexecdir = $(libexecdir)/intex
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/post-install.sh.in $(srcdir)/post-uninstall.sh.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = post-install.sh post-uninstall.sh
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(bindir)"
+SCRIPTS = $(bin_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = ${SHELL} /home/mtr/projects/intex/missing --run aclocal-1.11
+AMTAR = $${TAR-tar}
+AUTOCONF = ${SHELL} /home/mtr/projects/intex/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/mtr/projects/intex/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/mtr/projects/intex/missing --run automake-1.11
+AWK = gawk
+CYGPATH_W = echo
+DEFS = -DPACKAGE_NAME=\"intex\" -DPACKAGE_TARNAME=\"intex\" -DPACKAGE_VERSION=\"1.8.0\" -DPACKAGE_STRING=\"intex\ 1.8.0\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DPACKAGE=\"intex\" -DVERSION=\"1.8.0\"
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LIBOBJS =
+LIBS =
+LTLIBOBJS =
+MAKEINFO = ${SHELL} /home/mtr/projects/intex/missing --run makeinfo
+MKDIR_P = /bin/mkdir -p
+PACKAGE = intex
+PACKAGE_BUGREPORT =
+PACKAGE_NAME = intex
+PACKAGE_STRING = intex 1.8.0
+PACKAGE_TARNAME = intex
+PACKAGE_URL =
+PACKAGE_VERSION = 1.8.0
+PATH_SEPARATOR = :
+PYTHON = /usr/bin/python
+PYTHON_EXEC_PREFIX = ${exec_prefix}
+PYTHON_PLATFORM = linux2
+PYTHON_PREFIX = ${prefix}
+PYTHON_VERSION = 2.7
+SET_MAKE =
+SHELL = /bin/bash
+STRIP =
+VERSION = 1.8.0
+abs_builddir = /home/mtr/projects/intex/src
+abs_srcdir = /home/mtr/projects/intex/src
+abs_top_builddir = /home/mtr/projects/intex
+abs_top_srcdir = /home/mtr/projects/intex
+am__leading_dot = .
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build_alias =
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host_alias =
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/mtr/projects/intex/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /bin/mkdir -p
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+pkgpyexecdir = ${pyexecdir}/intex
+pkgpythondir = ${pythondir}/intex
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+pyexecdir = ${exec_prefix}/lib/python2.7/dist-packages
+pythondir = ${prefix}/lib/python2.7/dist-packages
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target_alias =
+top_build_prefix = ../
+top_builddir = ..
+top_srcdir = ..
+bin_SCRIPTS = mkintex
+CLEANFILES = $(bin_SCRIPTS)
+do_subst = sed -e 's,[@]datadir[@],$(datadir),g' \
+ -e 's,[@]PYTHON[@],$(PYTHON),g' \
+ -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+ -e 's,[@]VERSION[@],$(VERSION),g'
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+post-install.sh: $(top_builddir)/config.status $(srcdir)/post-install.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+post-uninstall.sh: $(top_builddir)/config.status $(srcdir)/post-uninstall.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binSCRIPTS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-binSCRIPTS
+
+
+mkintex: mkintex.py Makefile
+ $(do_subst) <$< >$@
+ chmod +x $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/support/intex/src/Makefile.am b/support/intex/src/Makefile.am
new file mode 100644
index 0000000000..d80c098482
--- /dev/null
+++ b/support/intex/src/Makefile.am
@@ -0,0 +1,12 @@
+
+bin_SCRIPTS = mkintex
+CLEANFILES = $(bin_SCRIPTS)
+
+do_subst = sed -e 's,[@]datadir[@],$(datadir),g' \
+ -e 's,[@]PYTHON[@],$(PYTHON),g' \
+ -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+ -e 's,[@]VERSION[@],$(VERSION),g'
+
+mkintex: mkintex.py Makefile
+ $(do_subst) <$< >$@
+ chmod +x $@
diff --git a/support/intex/src/Makefile.in b/support/intex/src/Makefile.in
new file mode 100644
index 0000000000..029c1035dc
--- /dev/null
+++ b/support/intex/src/Makefile.in
@@ -0,0 +1,395 @@
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
+ $(srcdir)/post-install.sh.in $(srcdir)/post-uninstall.sh.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_CLEAN_FILES = post-install.sh post-uninstall.sh
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
+am__installdirs = "$(DESTDIR)$(bindir)"
+SCRIPTS = $(bin_SCRIPTS)
+SOURCES =
+DIST_SOURCES =
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+AMTAR = @AMTAR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PYTHON = @PYTHON@
+PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@
+PYTHON_PLATFORM = @PYTHON_PLATFORM@
+PYTHON_PREFIX = @PYTHON_PREFIX@
+PYTHON_VERSION = @PYTHON_VERSION@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+VERSION = @VERSION@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+am__leading_dot = @am__leading_dot@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+pkgpyexecdir = @pkgpyexecdir@
+pkgpythondir = @pkgpythondir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+pyexecdir = @pyexecdir@
+pythondir = @pythondir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+bin_SCRIPTS = mkintex
+CLEANFILES = $(bin_SCRIPTS)
+do_subst = sed -e 's,[@]datadir[@],$(datadir),g' \
+ -e 's,[@]PYTHON[@],$(PYTHON),g' \
+ -e 's,[@]PACKAGE[@],$(PACKAGE),g' \
+ -e 's,[@]VERSION[@],$(VERSION),g'
+
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+post-install.sh: $(top_builddir)/config.status $(srcdir)/post-install.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+post-uninstall.sh: $(top_builddir)/config.status $(srcdir)/post-uninstall.sh.in
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+install-binSCRIPTS: $(bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n' \
+ -e 'h;s|.*|.|' \
+ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) { files[d] = files[d] " " $$1; \
+ if (++n[d] == $(am__install_max)) { \
+ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \
+ else { print "f", d "/" $$4, $$1 } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
+tags: TAGS
+TAGS:
+
+ctags: CTAGS
+CTAGS:
+
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: check-am
+all-am: Makefile $(SCRIPTS)
+installdirs:
+ for dir in "$(DESTDIR)$(bindir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
+mostlyclean-generic:
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binSCRIPTS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binSCRIPTS
+
+.MAKE: install-am install-strip
+
+.PHONY: all all-am check check-am clean clean-generic distclean \
+ distclean-generic distdir dvi dvi-am html html-am info info-am \
+ install install-am install-binSCRIPTS install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+ pdf-am ps ps-am uninstall uninstall-am uninstall-binSCRIPTS
+
+
+mkintex: mkintex.py Makefile
+ $(do_subst) <$< >$@
+ chmod +x $@
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/support/intex/src/mkintex b/support/intex/src/mkintex
new file mode 100755
index 0000000000..8a52a92bdb
--- /dev/null
+++ b/support/intex/src/mkintex
@@ -0,0 +1,215 @@
+#! /usr/bin/python
+# -*- coding: utf-8 -*-
+# $Id$
+from __future__ import with_statement
+"""
+Copyright (C) 2007, 2008 by Martin Thorsen Ranang
+
+This file is part of InTeX.
+
+InTeX is free software: you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+InTeX is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with InTeX. If not, see <http://www.gnu.org/licenses/>.
+"""
+__version__ = "1.8.0"
+__author__ = "Martin Thorsen Ranang <mtr@ranang.org>"
+
+from contextlib import nested
+from itertools import count, imap
+
+import logging
+import optparse
+import os
+import re
+import sys
+
+from intex.config import INTEX_DEFAULT_INDEX, INTEX_INPUT_EXT, INTEX_OUTPUT_EXT
+
+from intex.index import Index
+
+def parse_command_line(command_line_options, usage):
+ """Parse the command line according to the possible
+ COMMAND_LINE_OPTIONS.
+ """
+ license_notice = """
+Copyright (C) 2007, 2008 by Martin Thorsen Ranang
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by Martin Thorsen Ranang."""
+ parser = optparse.OptionParser(usage=usage,
+ version='%%prog %s %s' % (__version__,
+ license_notice))
+ for option, description in command_line_options:
+ parser.add_option(*option, **description)
+
+ # Parse the command line.
+ return parser.parse_args()
+
+
+def resolve_auxiliary_and_args(args):
+ """Resolve the name of the current LaTeX auxiliary file (.aux)
+ based on the supplied arguments and the current working directory.
+ """
+ aux_re = re.compile('^.*\.aux$', re.IGNORECASE)
+ auxiliary = [arg for arg in args
+ if aux_re.match(arg) and os.path.exists(arg)]
+ args = [arg for arg in args if arg not in auxiliary]
+
+ attempts = count(-2)
+
+ while attempts.next():
+ if len(auxiliary) > 1:
+ logging.error('Please explicitly specify the ' \
+ 'LaTeX auxiliary (.aux) file to use.')
+ sys.exit(1)
+
+ elif not auxiliary:
+ auxiliary = ['%s.aux' % (arg) for arg in args
+ if os.path.exists('%s.aux' % (arg))]
+ args = [arg for arg in args if '%s.aux' % (arg) not in auxiliary]
+
+ else:
+ auxiliary = auxiliary[0]
+ break
+
+ return auxiliary, args
+
+
+def main():
+ """Module mainline (for standalone execution).
+ """
+ command_line_options = [
+ (['-D', '--debug'],
+ {'dest': 'debug',
+ 'default': False,
+ 'action': 'store_true',
+ 'help': 'whether or not to output debug information'}),
+ (['-V', '--verbose'],
+ {'dest': 'verbose',
+ 'default': False,
+ 'action': 'store_true',
+ 'help': 'whether or not to output verbose information'}),
+ (['-I', '--only-build-index'],
+ {'dest': 'only_build_index',
+ 'default': False,
+ 'action': 'store_true',
+ 'help': 'only build the internal model of the index'}),
+ (['-O', '--ito-file'],
+ {'dest': 'ito_filename',
+ 'default': None,
+ 'metavar': 'FILE',
+ 'help': 'output the new internal InTeX information to FILE ' \
+ '(default: %default)'}),
+ (['-o', '--index-file'],
+ {'dest': 'index_filename',
+ 'default': None,
+ 'metavar': 'FILE',
+ 'help': 'output the new indexing information to FILE ' \
+ '(default: %default)'}),
+ (['-a', '--acrodef-output'],
+ {'dest': 'acrodef_output',
+ 'default': None,
+ 'metavar': 'FILE',
+ 'help': 'output acronym definitions to FILE ' \
+ '(default: %default)'}),
+ (['-p', '--persondef-output'],
+ {'dest': 'persondef_output',
+ 'default': None,
+ 'metavar': 'FILE',
+ 'help': 'output (person) name definitions to FILE ' \
+ '(default: %default)'}),
+ ]
+
+ # Parse the command line options.
+ options, args = parse_command_line(command_line_options,
+ usage='%prog [options] ' \
+ '<index> [index ...]',)
+
+ # Sort out the name for the basic log.
+ logging.root.name = os.path.basename(__file__)
+
+ log_level = None
+
+ if options.verbose:
+ log_level = logging.INFO
+ if options.debug:
+ log_level = logging.DEBUG
+
+ # Configure the logging module.
+ logging.basicConfig(format='%(asctime)s: %(levelname)s: %(message)s',
+ level=log_level)
+
+ auxiliary, args = resolve_auxiliary_and_args(args)
+ if not auxiliary:
+ logging.warning('No LaTeX auxiliary file specified; exiting.')
+ sys.exit(1)
+
+ if options.index_filename is None:
+ logging.warning('No output index file specified; exiting.')
+ sys.exit(1)
+
+ if len(args) == 0:
+ suffix_re = re.compile('^.*\.%s$' % (INTEX_INPUT_EXT))
+
+ filenames = [filename
+ for filename in os.listdir(os.getcwd())
+ if suffix_re.match(filename)]
+ else:
+ filenames = args
+
+ # If no ITO file was explicitly stated, deduce the implied name.
+ if options.ito_filename is None:
+ options.ito_filename = (os.path.splitext(auxiliary)[0] \
+ + os.path.extsep + 'ito')
+
+ for filename in filenames:
+ if not os.path.exists(filename):
+ logging.error('Input file "%s" not found', filename)
+ sys.exit(1)
+
+ if options.verbose:
+ logging.info('Will use "%s" as (main) LaTeX auxiliary file', auxiliary)
+ logging.info('Will use InTeX input files: %s',
+ ', '.join(imap('"%s"'.__mod__, filenames)))
+
+ # Instatiate one Index object per file specified on the command
+ # line.
+ logging.info('Generating index...')
+ indices = [Index.from_file(filename) for filename in filenames]
+
+ # Generate all reference indices.
+ for index in indices:
+ index.generate_reference_index()
+
+ logging.info('... done (index generated).')
+
+ if options.debug:
+ for index in indices:
+ logging.debug('\n%s', index)
+
+ if options.only_build_index:
+ return
+
+ with nested(open(options.ito_filename, 'w'),
+ open(options.index_filename, 'w')) \
+ as (internal_file, index_file):
+ not_found = index.interpret_auxiliary(auxiliary, internal_file,
+ index_file)
+
+ for reference, page in not_found:
+ logging.warn('On page %s, reference to "%s" was not found '
+ 'in the index.', page, reference)
+
+if __name__ == "__main__":
+ main()
diff --git a/support/intex/src/mkintex.py b/support/intex/src/mkintex.py
new file mode 100644
index 0000000000..1b9e74ce0a
--- /dev/null
+++ b/support/intex/src/mkintex.py
@@ -0,0 +1,215 @@
+#! /usr/bin/python
+# -*- coding: utf-8 -*-
+# $Id$
+from __future__ import with_statement
+"""
+Copyright (C) 2007, 2008 by Martin Thorsen Ranang
+
+This file is part of InTeX.
+
+InTeX is free software: you can redistribute it and/or modify it under
+the terms of the GNU General Public License as published by the Free
+Software Foundation, either version 3 of the License, or (at your
+option) any later version.
+
+InTeX is distributed in the hope that it will be useful, but WITHOUT
+ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+for more details.
+
+You should have received a copy of the GNU General Public License
+along with InTeX. If not, see <http://www.gnu.org/licenses/>.
+"""
+__version__ = "@VERSION@"
+__author__ = "Martin Thorsen Ranang <mtr@ranang.org>"
+
+from contextlib import nested
+from itertools import count, imap
+
+import logging
+import optparse
+import os
+import re
+import sys
+
+from intex.config import INTEX_DEFAULT_INDEX, INTEX_INPUT_EXT, INTEX_OUTPUT_EXT
+
+from intex.index import Index
+
+def parse_command_line(command_line_options, usage):
+ """Parse the command line according to the possible
+ COMMAND_LINE_OPTIONS.
+ """
+ license_notice = """
+Copyright (C) 2007, 2008 by Martin Thorsen Ranang
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Written by Martin Thorsen Ranang."""
+ parser = optparse.OptionParser(usage=usage,
+ version='%%prog %s %s' % (__version__,
+ license_notice))
+ for option, description in command_line_options:
+ parser.add_option(*option, **description)
+
+ # Parse the command line.
+ return parser.parse_args()
+
+
+def resolve_auxiliary_and_args(args):
+ """Resolve the name of the current LaTeX auxiliary file (.aux)
+ based on the supplied arguments and the current working directory.
+ """
+ aux_re = re.compile('^.*\.aux$', re.IGNORECASE)
+ auxiliary = [arg for arg in args
+ if aux_re.match(arg) and os.path.exists(arg)]
+ args = [arg for arg in args if arg not in auxiliary]
+
+ attempts = count(-2)
+
+ while attempts.next():
+ if len(auxiliary) > 1:
+ logging.error('Please explicitly specify the ' \
+ 'LaTeX auxiliary (.aux) file to use.')
+ sys.exit(1)
+
+ elif not auxiliary:
+ auxiliary = ['%s.aux' % (arg) for arg in args
+ if os.path.exists('%s.aux' % (arg))]
+ args = [arg for arg in args if '%s.aux' % (arg) not in auxiliary]
+
+ else:
+ auxiliary = auxiliary[0]
+ break
+
+ return auxiliary, args
+
+
+def main():
+ """Module mainline (for standalone execution).
+ """
+ command_line_options = [
+ (['-D', '--debug'],
+ {'dest': 'debug',
+ 'default': False,
+ 'action': 'store_true',
+ 'help': 'whether or not to output debug information'}),
+ (['-V', '--verbose'],
+ {'dest': 'verbose',
+ 'default': False,
+ 'action': 'store_true',
+ 'help': 'whether or not to output verbose information'}),
+ (['-I', '--only-build-index'],
+ {'dest': 'only_build_index',
+ 'default': False,
+ 'action': 'store_true',
+ 'help': 'only build the internal model of the index'}),
+ (['-O', '--ito-file'],
+ {'dest': 'ito_filename',
+ 'default': None,
+ 'metavar': 'FILE',
+ 'help': 'output the new internal InTeX information to FILE ' \
+ '(default: %default)'}),
+ (['-o', '--index-file'],
+ {'dest': 'index_filename',
+ 'default': None,
+ 'metavar': 'FILE',
+ 'help': 'output the new indexing information to FILE ' \
+ '(default: %default)'}),
+ (['-a', '--acrodef-output'],
+ {'dest': 'acrodef_output',
+ 'default': None,
+ 'metavar': 'FILE',
+ 'help': 'output acronym definitions to FILE ' \
+ '(default: %default)'}),
+ (['-p', '--persondef-output'],
+ {'dest': 'persondef_output',
+ 'default': None,
+ 'metavar': 'FILE',
+ 'help': 'output (person) name definitions to FILE ' \
+ '(default: %default)'}),
+ ]
+
+ # Parse the command line options.
+ options, args = parse_command_line(command_line_options,
+ usage='%prog [options] ' \
+ '<index> [index ...]',)
+
+ # Sort out the name for the basic log.
+ logging.root.name = os.path.basename(__file__)
+
+ log_level = None
+
+ if options.verbose:
+ log_level = logging.INFO
+ if options.debug:
+ log_level = logging.DEBUG
+
+ # Configure the logging module.
+ logging.basicConfig(format='%(asctime)s: %(levelname)s: %(message)s',
+ level=log_level)
+
+ auxiliary, args = resolve_auxiliary_and_args(args)
+ if not auxiliary:
+ logging.warning('No LaTeX auxiliary file specified; exiting.')
+ sys.exit(1)
+
+ if options.index_filename is None:
+ logging.warning('No output index file specified; exiting.')
+ sys.exit(1)
+
+ if len(args) == 0:
+ suffix_re = re.compile('^.*\.%s$' % (INTEX_INPUT_EXT))
+
+ filenames = [filename
+ for filename in os.listdir(os.getcwd())
+ if suffix_re.match(filename)]
+ else:
+ filenames = args
+
+ # If no ITO file was explicitly stated, deduce the implied name.
+ if options.ito_filename is None:
+ options.ito_filename = (os.path.splitext(auxiliary)[0] \
+ + os.path.extsep + 'ito')
+
+ for filename in filenames:
+ if not os.path.exists(filename):
+ logging.error('Input file "%s" not found', filename)
+ sys.exit(1)
+
+ if options.verbose:
+ logging.info('Will use "%s" as (main) LaTeX auxiliary file', auxiliary)
+ logging.info('Will use InTeX input files: %s',
+ ', '.join(imap('"%s"'.__mod__, filenames)))
+
+ # Instatiate one Index object per file specified on the command
+ # line.
+ logging.info('Generating index...')
+ indices = [Index.from_file(filename) for filename in filenames]
+
+ # Generate all reference indices.
+ for index in indices:
+ index.generate_reference_index()
+
+ logging.info('... done (index generated).')
+
+ if options.debug:
+ for index in indices:
+ logging.debug('\n%s', index)
+
+ if options.only_build_index:
+ return
+
+ with nested(open(options.ito_filename, 'w'),
+ open(options.index_filename, 'w')) \
+ as (internal_file, index_file):
+ not_found = index.interpret_auxiliary(auxiliary, internal_file,
+ index_file)
+
+ for reference, page in not_found:
+ logging.warn('On page %s, reference to "%s" was not found '
+ 'in the index.', page, reference)
+
+if __name__ == "__main__":
+ main()
diff --git a/support/intex/src/post-install.sh b/support/intex/src/post-install.sh
new file mode 100644
index 0000000000..0abdccad38
--- /dev/null
+++ b/support/intex/src/post-install.sh
@@ -0,0 +1,24 @@
+#! /bin/sh
+#
+# $Id$
+#
+# Copyright (C) 2007 by Martin Thorsen Ranang
+#
+
+# lsb_release=/etc/lsb-release
+
+# if [ -f $lsb_release ]; then
+# . $lsb_release
+# fi
+
+# if [ $DISTRIB_ID = "Ubuntu" ]; then
+# dh_installtex
+# else
+# if which mktexlsr >/dev/null; then
+# mktexlsr /usr/local/share/texmf
+# fi
+# fi
+
+if which mktexlsr >/dev/null; then
+ mktexlsr /usr/local/share/texmf
+fi
diff --git a/support/intex/src/post-install.sh.in b/support/intex/src/post-install.sh.in
new file mode 100644
index 0000000000..bf533100ac
--- /dev/null
+++ b/support/intex/src/post-install.sh.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+#
+# $Id$
+#
+# Copyright (C) 2007 by Martin Thorsen Ranang
+#
+
+# lsb_release=/etc/lsb-release
+
+# if [ -f $lsb_release ]; then
+# . $lsb_release
+# fi
+
+# if [ $DISTRIB_ID = "Ubuntu" ]; then
+# dh_installtex
+# else
+# if which mktexlsr >/dev/null; then
+# mktexlsr @prefix@/share/texmf
+# fi
+# fi
+
+if which mktexlsr >/dev/null; then
+ mktexlsr @prefix@/share/texmf
+fi
diff --git a/support/intex/src/post-uninstall.sh b/support/intex/src/post-uninstall.sh
new file mode 100644
index 0000000000..fc42c85696
--- /dev/null
+++ b/support/intex/src/post-uninstall.sh
@@ -0,0 +1,24 @@
+#! /bin/sh
+#
+# $Id$
+#
+# Copyright (C) 2007 by Martin Thorsen Ranang
+#
+
+# lsb_release=/etc/lsb-release
+
+# if [ -f $lsb_release ]; then
+# . $lsb_release
+# fi
+
+# if [ $DISTRIB_ID = "Ubuntu" ]; then
+# dh_installtex
+# else
+# if which mktexlsr >/dev/null; then
+# mktexlsr /usr/local/share/texmf
+# fi
+# fi
+
+if which mktexlsr > /dev/null; then
+ mktexlsr /usr/local/share/texmf
+fi
diff --git a/support/intex/src/post-uninstall.sh.in b/support/intex/src/post-uninstall.sh.in
new file mode 100644
index 0000000000..597c6a37ea
--- /dev/null
+++ b/support/intex/src/post-uninstall.sh.in
@@ -0,0 +1,24 @@
+#! /bin/sh
+#
+# $Id$
+#
+# Copyright (C) 2007 by Martin Thorsen Ranang
+#
+
+# lsb_release=/etc/lsb-release
+
+# if [ -f $lsb_release ]; then
+# . $lsb_release
+# fi
+
+# if [ $DISTRIB_ID = "Ubuntu" ]; then
+# dh_installtex
+# else
+# if which mktexlsr >/dev/null; then
+# mktexlsr @prefix@/share/texmf
+# fi
+# fi
+
+if which mktexlsr > /dev/null; then
+ mktexlsr @prefix@/share/texmf
+fi