summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2012-04-17 07:17:56 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2012-04-17 07:17:56 +0000
commit61b2e8fae6bf01dcf22c6c621d7f98515c6a3f7c (patch)
tree8857e072513a76f3c8a2c5ba3933eefd282d2230 /Build
parent5c0ad954383dc3badac5be2bb2e7078a0485a0a0 (diff)
mtx; Add manpages, Lua script, and a test case
git-svn-id: svn://tug.org/texlive/trunk@26008 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/utils/mtx/Makefile.am25
-rw-r--r--Build/source/utils/mtx/Makefile.in363
-rw-r--r--Build/source/utils/mtx/aclocal.m41
-rwxr-xr-xBuild/source/utils/mtx/configure77
-rw-r--r--Build/source/utils/mtx/configure.ac5
-rw-r--r--Build/source/utils/mtx/m-tx.1106
-rwxr-xr-xBuild/source/utils/mtx/m-tx.lua174
-rwxr-xr-xBuild/source/utils/mtx/mtx.test16
-rw-r--r--Build/source/utils/mtx/prepmx.195
-rw-r--r--Build/source/utils/mtx/tests/mozart.mtx7
-rw-r--r--Build/source/utils/mtx/tests/mozart.pmx26
11 files changed, 871 insertions, 24 deletions
diff --git a/Build/source/utils/mtx/Makefile.am b/Build/source/utils/mtx/Makefile.am
index 287dd4f31fa..6334685b74c 100644
--- a/Build/source/utils/mtx/Makefile.am
+++ b/Build/source/utils/mtx/Makefile.am
@@ -61,3 +61,28 @@ libp2c_a_SOURCES = \
$(MTX_TREE)/libp2c/p2c.h \
$(MTX_TREE)/libp2c/p2clib.c
+lua_scripts = m-tx
+
+scriptsdir = texmf/scripts/m-tx
+nodist_bin_SCRIPTS =
+
+include $(srcdir)/../../texk/am/script_links.am
+
+texmfdir = $(datarootdir)/$(scriptsdir)
+dist_texmf_SCRIPTS = $(lua_scripts:=.lua)
+
+install-data-hook: install-lua-links
+
+uninstall-hook: uninstall-links
+
+dist_man1_MANS = m-tx.1 prepmx.1
+
+## Tests
+##
+TESTS = mtx.test
+EXTRA_DIST += $(TESTS)
+
+## mtx.test
+EXTRA_DIST += tests/mozart.mtx tests/mozart.pmx
+DISTCLEANFILES = mozart*
+
diff --git a/Build/source/utils/mtx/Makefile.in b/Build/source/utils/mtx/Makefile.in
index f6fbd6226fa..6fa513a4455 100644
--- a/Build/source/utils/mtx/Makefile.in
+++ b/Build/source/utils/mtx/Makefile.in
@@ -16,6 +16,7 @@
@SET_MAKE@
+
VPATH = @srcdir@
am__make_dryrun = \
{ \
@@ -51,18 +52,22 @@ NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
bin_PROGRAMS = prepmx$(EXEEXT)
-subdir = .
-DIST_COMMON = $(am__configure_deps) $(srcdir)/../../build-aux/depcomp \
+DIST_COMMON = $(am__configure_deps) $(dist_man1_MANS) \
+ $(dist_texmf_SCRIPTS) $(srcdir)/../../build-aux/depcomp \
$(srcdir)/../../build-aux/install-sh \
- $(srcdir)/../../build-aux/missing $(srcdir)/Makefile.am \
+ $(srcdir)/../../build-aux/missing \
+ $(srcdir)/../../texk/am/script_links.am $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure \
../../build-aux/config.guess ../../build-aux/config.sub \
../../build-aux/depcomp ../../build-aux/install-sh \
../../build-aux/ltmain.sh ../../build-aux/missing \
../../build-aux/texinfo.tex ../../build-aux/ylwrap ChangeLog
+@WIN32_TRUE@@WIN32_WRAP_TRUE@am__append_1 = $(wrappers)
+subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../m4/kpse-warnings.m4 \
- $(top_srcdir)/version.ac $(top_srcdir)/configure.ac
+ $(top_srcdir)/../../m4/kpse-win32.m4 $(top_srcdir)/version.ac \
+ $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -77,7 +82,8 @@ libp2c_a_AR = $(AR) $(ARFLAGS)
libp2c_a_LIBADD =
am_libp2c_a_OBJECTS = p2clib.$(OBJEXT)
libp2c_a_OBJECTS = $(am_libp2c_a_OBJECTS)
-am__installdirs = "$(DESTDIR)$(bindir)"
+am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(texmfdir)" \
+ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"
PROGRAMS = $(bin_PROGRAMS)
am_prepmx_OBJECTS = analyze.$(OBJEXT) cfuncs.$(OBJEXT) \
control.$(OBJEXT) files.$(OBJEXT) globals.$(OBJEXT) \
@@ -88,6 +94,34 @@ am_prepmx_OBJECTS = analyze.$(OBJEXT) cfuncs.$(OBJEXT) \
prepmx_OBJECTS = $(am_prepmx_OBJECTS)
prepmx_LDADD = $(LDADD)
prepmx_DEPENDENCIES = libp2c.a
+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; }; \
+ }
+SCRIPTS = $(dist_texmf_SCRIPTS) $(nodist_bin_SCRIPTS)
DEFAULT_INCLUDES = -I.@am__isrc@
depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp
am__depfiles_maybe = depfiles
@@ -103,8 +137,13 @@ am__can_run_installinfo = \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man1_MANS)
ETAGS = etags
CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
@@ -213,7 +252,8 @@ top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
ACLOCAL_AMFLAGS = -I ../../m4
-EXTRA_DIST = $(MTX_TREE) $(MTX_TREE)-PATCHES
+EXTRA_DIST = $(MTX_TREE) $(MTX_TREE)-PATCHES ../../build-aux/relpath \
+ $(TESTS) tests/mozart.mtx tests/mozart.pmx
INCLUDES = -I$(srcdir)/$(MTX_TREE)/libp2c
AM_CFLAGS = #$(WARNING_CFLAGS)
prepmx_SOURCES = \
@@ -254,13 +294,24 @@ libp2c_a_SOURCES = \
$(MTX_TREE)/libp2c/p2c.h \
$(MTX_TREE)/libp2c/p2clib.c
+lua_scripts = m-tx
+scriptsdir = texmf/scripts/m-tx
+nodist_bin_SCRIPTS = $(am__append_1)
+all_scripts = $(lua_scripts) $(perl_scripts) $(shell_scripts)
+@WIN32_TRUE@@WIN32_WRAP_TRUE@wrappers = $(all_scripts:=.exe)
+@WIN32_TRUE@@WIN32_WRAP_TRUE@runscript = $(top_srcdir)/../../texk/texlive/w32_wrapper/runscript.exe
+texmfdir = $(datarootdir)/$(scriptsdir)
+dist_texmf_SCRIPTS = $(lua_scripts:=.lua)
+dist_man1_MANS = m-tx.1 prepmx.1
+TESTS = mtx.test
+DISTCLEANFILES = mozart*
all: all-am
.SUFFIXES:
.SUFFIXES: .c .o .obj
am--refresh: Makefile
@:
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(srcdir)/../../texk/am/script_links.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
@@ -283,6 +334,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
esac;
+$(srcdir)/../../texk/am/script_links.am:
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
$(SHELL) ./config.status --recheck
@@ -342,6 +394,76 @@ clean-binPROGRAMS:
prepmx$(EXEEXT): $(prepmx_OBJECTS) $(prepmx_DEPENDENCIES) $(EXTRA_prepmx_DEPENDENCIES)
@rm -f prepmx$(EXEEXT)
$(LINK) $(prepmx_OBJECTS) $(prepmx_LDADD) $(LIBS)
+install-dist_texmfSCRIPTS: $(dist_texmf_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(dist_texmf_SCRIPTS)'; test -n "$(texmfdir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(texmfdir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(texmfdir)" || exit 1; \
+ fi; \
+ 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)$(texmfdir)$$dir'"; \
+ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(texmfdir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-dist_texmfSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_texmf_SCRIPTS)'; test -n "$(texmfdir)" || exit 0; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 's,.*/,,;$(transform)'`; \
+ dir='$(DESTDIR)$(texmfdir)'; $(am__uninstall_files_from_dir)
+install-nodist_binSCRIPTS: $(nodist_bin_SCRIPTS)
+ @$(NORMAL_INSTALL)
+ @list='$(nodist_bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
+ if test -n "$$list"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+ fi; \
+ 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-nodist_binSCRIPTS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_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)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -603,6 +725,47 @@ utility.obj: $(MTX_TREE)/utility.c
@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$(MTX_TREE)/utility.c' object='utility.obj' libtool=no @AMDEPBACKSLASH@
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o utility.obj `if test -f '$(MTX_TREE)/utility.c'; then $(CYGPATH_W) '$(MTX_TREE)/utility.c'; else $(CYGPATH_W) '$(srcdir)/$(MTX_TREE)/utility.c'; fi`
+install-man1: $(dist_man1_MANS)
+ @$(NORMAL_INSTALL)
+ @list1='$(dist_man1_MANS)'; \
+ list2=''; \
+ test -n "$(man1dir)" \
+ && test -n "`echo $$list1$$list2`" \
+ || exit 0; \
+ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \
+ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \
+ { for i in $$list1; do echo "$$i"; done; \
+ if test -n "$$list2"; then \
+ for i in $$list2; do echo "$$i"; done \
+ | sed -n '/\.1[a-z]*$$/p'; \
+ fi; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -656,7 +819,113 @@ GTAGS:
distclean-tags:
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+check-TESTS: $(TESTS)
+ @failed=0; all=0; xfail=0; xpass=0; skip=0; \
+ srcdir=$(srcdir); export srcdir; \
+ list=' $(TESTS) '; \
+ $(am__tty_colors); \
+ if test -n "$$list"; then \
+ for tst in $$list; do \
+ if test -f ./$$tst; then dir=./; \
+ elif test -f $$tst; then dir=; \
+ else dir="$(srcdir)/"; fi; \
+ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xpass=`expr $$xpass + 1`; \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=XPASS; \
+ ;; \
+ *) \
+ col=$$grn; res=PASS; \
+ ;; \
+ esac; \
+ elif test $$? -ne 77; then \
+ all=`expr $$all + 1`; \
+ case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$tst[\ \ ]*) \
+ xfail=`expr $$xfail + 1`; \
+ col=$$lgn; res=XFAIL; \
+ ;; \
+ *) \
+ failed=`expr $$failed + 1`; \
+ col=$$red; res=FAIL; \
+ ;; \
+ esac; \
+ else \
+ skip=`expr $$skip + 1`; \
+ col=$$blu; res=SKIP; \
+ fi; \
+ echo "$${col}$$res$${std}: $$tst"; \
+ done; \
+ if test "$$all" -eq 1; then \
+ tests="test"; \
+ All=""; \
+ else \
+ tests="tests"; \
+ All="All "; \
+ fi; \
+ if test "$$failed" -eq 0; then \
+ if test "$$xfail" -eq 0; then \
+ banner="$$All$$all $$tests passed"; \
+ else \
+ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \
+ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \
+ fi; \
+ else \
+ if test "$$xpass" -eq 0; then \
+ banner="$$failed of $$all $$tests failed"; \
+ else \
+ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \
+ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \
+ fi; \
+ fi; \
+ dashes="$$banner"; \
+ skipped=""; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ skipped="($$skip test was not run)"; \
+ else \
+ skipped="($$skip tests were not run)"; \
+ fi; \
+ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$skipped"; \
+ fi; \
+ report=""; \
+ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+ report="Please report to $(PACKAGE_BUGREPORT)"; \
+ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
+ dashes="$$report"; \
+ fi; \
+ dashes=`echo "$$dashes" | sed s/./=/g`; \
+ if test "$$failed" -eq 0; then \
+ col="$$grn"; \
+ else \
+ col="$$red"; \
+ fi; \
+ echo "$${col}$$dashes$${std}"; \
+ echo "$${col}$$banner$${std}"; \
+ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \
+ test -z "$$report" || echo "$${col}$$report$${std}"; \
+ echo "$${col}$$dashes$${std}"; \
+ test "$$failed" -eq 0; \
+ else :; fi
+
distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ 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"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
$(am__remove_distdir)
test -d "$(distdir)" || mkdir "$(distdir)"
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -822,10 +1091,11 @@ distcleancheck: distclean
$(distcleancheck_listfiles) ; \
exit 1; } >&2
check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS)
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS)
installdirs:
- for dir in "$(DESTDIR)$(bindir)"; do \
+ for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(texmfdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -854,6 +1124,7 @@ clean-generic:
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)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@@ -882,13 +1153,14 @@ info: info-am
info-am:
-install-data-am:
-
+install-data-am: install-dist_texmfSCRIPTS install-man
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) install-data-hook
install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-binPROGRAMS
+install-exec-am: install-binPROGRAMS install-nodist_binSCRIPTS
install-html: install-html-am
@@ -898,7 +1170,7 @@ install-info: install-info-am
install-info-am:
-install-man:
+install-man: install-man1
install-pdf: install-pdf-am
@@ -929,30 +1201,75 @@ ps: ps-am
ps-am:
-uninstall-am: uninstall-binPROGRAMS
+uninstall-am: uninstall-binPROGRAMS uninstall-dist_texmfSCRIPTS \
+ uninstall-man uninstall-nodist_binSCRIPTS
+ @$(NORMAL_INSTALL)
+ $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
+uninstall-man: uninstall-man1
-.MAKE: install-am install-strip
+.MAKE: check-am install-am install-data-am install-strip uninstall-am
-.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \
- clean-binPROGRAMS clean-generic clean-noinstLIBRARIES ctags \
- dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
+.PHONY: CTAGS GTAGS all all-am am--refresh check check-TESTS check-am \
+ clean clean-binPROGRAMS clean-generic clean-noinstLIBRARIES \
+ ctags dist dist-all dist-bzip2 dist-gzip dist-hook dist-lzip \
dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
distclean distclean-compile distclean-generic distclean-tags \
distcleancheck distdir distuninstallcheck dvi dvi-am html \
html-am info info-am install install-am install-binPROGRAMS \
- install-data install-data-am install-dvi install-dvi-am \
+ install-data install-data-am install-data-hook \
+ install-dist_texmfSCRIPTS 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 \
+ install-info install-info-am install-man install-man1 \
+ install-nodist_binSCRIPTS install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs maintainer-clean \
maintainer-clean-generic mostlyclean mostlyclean-compile \
mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \
- uninstall-am uninstall-binPROGRAMS
+ uninstall-am uninstall-binPROGRAMS uninstall-dist_texmfSCRIPTS \
+ uninstall-hook uninstall-man uninstall-man1 \
+ uninstall-nodist_binSCRIPTS
# in case of an SVN repository
dist-hook:
rm -rf `find $(distdir) -name .svn`
+.PHONY: install-lua-links install-perl-links install-shell-links \
+ install-links uninstall-links
+@WIN32_TRUE@@WIN32_WRAP_TRUE@$(wrappers): $(runscript)
+@WIN32_TRUE@@WIN32_WRAP_TRUE@ $(LN_S) $(runscript) $@
+
+install-lua-links:
+@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=lua EXT=lua install-links
+
+install-perl-links:
+@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=perl EXT=pl install-links
+
+install-shell-links:
+@WIN32_FALSE@ $(MAKE) $(AM_MAKEFLAGS) TYPE=shell EXT=sh install-links
+
+# We support native builds, multiplatform or not, as well as distro builds.
+install-links:
+ @REL=`$(SHELL) $(srcdir)/../../build-aux/relpath '$(DESTDIR)' '$(bindir)' '$(datarootdir)'`; \
+ if test -z "$$REL"; then \
+ echo 'unable to compute relative path for linked $(TYPE) scripts' >&2; \
+ exit 1; \
+ fi; \
+ cd $(DESTDIR)$(bindir) && \
+ for f in $($(TYPE)_scripts); do \
+ rm -f $$f; \
+ echo "creating link '$$f' -> '$$REL/$(scriptsdir)/$$f.$(EXT)'"; \
+ $(LN_S) $$REL/$(scriptsdir)/$$f.$(EXT) $$f || exit 1; \
+ done
+
+uninstall-links:
+@WIN32_FALSE@ @for f in $(all_scripts); do \
+@WIN32_FALSE@ echo "rm -f '$(DESTDIR)$(bindir)/$$f'"; \
+@WIN32_FALSE@ rm -f "$(DESTDIR)$(bindir)/$$f"; \
+@WIN32_FALSE@ done
+
+install-data-hook: install-lua-links
+
+uninstall-hook: uninstall-links
# 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.
diff --git a/Build/source/utils/mtx/aclocal.m4 b/Build/source/utils/mtx/aclocal.m4
index 6524bc8cb05..a37c10f740d 100644
--- a/Build/source/utils/mtx/aclocal.m4
+++ b/Build/source/utils/mtx/aclocal.m4
@@ -1010,3 +1010,4 @@ AC_SUBST([am__untar])
]) # _AM_PROG_TAR
m4_include([../../m4/kpse-warnings.m4])
+m4_include([../../m4/kpse-win32.m4])
diff --git a/Build/source/utils/mtx/configure b/Build/source/utils/mtx/configure
index 30c0b2c95e5..a200ad19a2c 100755
--- a/Build/source/utils/mtx/configure
+++ b/Build/source/utils/mtx/configure
@@ -613,6 +613,10 @@ GREP
CPP
RANLIB
LN_S
+WIN32_WRAP_FALSE
+WIN32_WRAP_TRUE
+WIN32_FALSE
+WIN32_TRUE
WARNING_CFLAGS
am__fastdepCC_FALSE
am__fastdepCC_TRUE
@@ -3771,6 +3775,70 @@ WARNING_CFLAGS=$kpse_cv_warning_cflags
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for native WIN32 or MINGW32" >&5
+$as_echo_n "checking for native WIN32 or MINGW32... " >&6; }
+if ${kpse_cv_have_win32+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef WIN32
+ choke me
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __MINGW32__
+ choke me
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ kpse_cv_have_win32=mingw32
+else
+ kpse_cv_have_win32=native
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ kpse_cv_have_win32=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $kpse_cv_have_win32" >&5
+$as_echo "$kpse_cv_have_win32" >&6; }
+
+ if test "x$kpse_cv_have_win32" != xno; then
+ WIN32_TRUE=
+ WIN32_FALSE='#'
+else
+ WIN32_TRUE='#'
+ WIN32_FALSE=
+fi
+
+ if test -r $srcdir/../../texk/texlive/w32_wrapper/runscript.exe; then
+ WIN32_WRAP_TRUE=
+ WIN32_WRAP_FALSE='#'
+else
+ WIN32_WRAP_TRUE='#'
+ WIN32_WRAP_FALSE=
+fi
+
+
+
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
$as_echo_n "checking whether ln -s works... " >&6; }
LN_S=$as_ln_s
@@ -3909,7 +3977,6 @@ fi
# Checks for libraries.
# Checks for header files.
-
ac_ext=c
ac_cpp='$CPP $CPPFLAGS'
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
@@ -4758,6 +4825,14 @@ if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then
+ as_fn_error $? "conditional \"WIN32\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${WIN32_WRAP_TRUE}" && test -z "${WIN32_WRAP_FALSE}"; then
+ as_fn_error $? "conditional \"WIN32_WRAP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
diff --git a/Build/source/utils/mtx/configure.ac b/Build/source/utils/mtx/configure.ac
index 250c99789b1..8da2c4e44a0 100644
--- a/Build/source/utils/mtx/configure.ac
+++ b/Build/source/utils/mtx/configure.ac
@@ -21,6 +21,11 @@ AC_PROG_CC
KPSE_COMPILER_WARNINGS
+KPSE_CHECK_WIN32
+AM_CONDITIONAL([WIN32], [test "x$kpse_cv_have_win32" != xno])
+AM_CONDITIONAL([WIN32_WRAP],
+ [test -r $srcdir/../../texk/texlive/w32_wrapper/runscript.exe])
+
dnl Checks for programs.
AC_PROG_INSTALL
AC_PROG_LN_S
diff --git a/Build/source/utils/mtx/m-tx.1 b/Build/source/utils/mtx/m-tx.1
new file mode 100644
index 00000000000..c9552ab3937
--- /dev/null
+++ b/Build/source/utils/mtx/m-tx.1
@@ -0,0 +1,106 @@
+.\" This manpage is licensed under the GNU Public License
+.TH m-tx 1 2012-04-09 "m-tx script, version 0.3" ""
+
+.SH NAME
+m-tx \- This script processes mtx files then deletes intermediate files
+
+.SH SYNOPSIS
+[ texlua ]
+.B m-tx[.lua]
+{
+.IR option
+|
+.IR jobname
+[ .mtx ]
+} ...
+.TP
+The default effect is to process each file using
+.TP 12
+.BR prepmx (1)
+(pre-pre-processing pass)
+.TP
+.BR pmxab (1)
+(pre-processing pass)
+.TP
+.BR etex (1)
+(first pass)
+.TP
+.BR musixflx (1)
+(second pass)
+.TP
+.BR etex (1)
+(third pass)
+.TP
+.BR dvips (1)
+(dvi to Postscript)
+.TP
+.BR ps2pdf (1)
+(Postscript to Portable Document Format)
+.TP
+followed by removal of intermediate files.
+
+.SH OPTIONS
+.TP 8
+.B -v
+output program name and version number, and quit
+.TP
+.B -h
+output usage summary and quit
+.TP
+.B -l
+changes the TeX processor to
+.BR latex (1)
+or
+.BR pdflatex (1)
+.TP
+.B -p
+changes the TeX processor to
+.BR pdfetex (1)
+or
+.BR pdflatex (1)
+(and doesn't run
+.BR dvips (1)
+and
+.BR ps2pdf (1)
+or
+.BR dvipdfm (1)
+)
+.TP
+.B -d
+changes the dvi processor to
+.BR dvipdfm (1)
+.TP
+.B -s
+stops processing at the dvi file
+.TP
+.B -t
+stops processing at the tex (and midi) files
+.TP
+.B -m
+stops processing at the pmx file
+.TP
+.B -i
+retain intermediate files
+.TP
+.B -f
+default processing
+.TP 0
+Options affect processing of all succeeding mtx files unless changed by another option.
+
+.SH SEE ALSO
+.BR prepmx (1)
+.BR pmxab (1)
+.BR scor2prt (1)
+.BR etex (1),
+.BR latex (1),
+.BR pdfetex (1),
+.BR pdflatex (1),
+.BR musixflx (1),
+.BR dvipdfm (1),
+.BR dvips (1),
+.BR ps2pdf (1).
+.br
+mtx260.pdf
+
+.SH AUTHOR
+This manual page was written by Bob Tennent <rdt@cs.queensu.ca>.
diff --git a/Build/source/utils/mtx/m-tx.lua b/Build/source/utils/mtx/m-tx.lua
new file mode 100755
index 00000000000..3ed578563ed
--- /dev/null
+++ b/Build/source/utils/mtx/m-tx.lua
@@ -0,0 +1,174 @@
+#!/usr/bin/env texlua
+
+VERSION = "0.3"
+
+--[[
+ m-tx.lua: processes MusiXTeX files using prepmx and pmxab as pre-processors (and deletes intermediate files)
+
+ (c) Copyright 2011-2012 Bob Tennent rdt@cs.queensu.ca
+
+ This program 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 2 of the License, or (at your
+ option) any later version.
+
+ This program 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 this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+--]]
+
+--[[
+
+ ChangeLog:
+ version 0.3 2012-04-09 RDT
+ Change name to m-tx to avoid clash with another program.
+
+ version 0.2 2011-11-28 RDT
+ Added -i (retain intermediate files) option
+
+ version 0.1.1 2011-07-18 RDT
+
+ Removed a file check that caused it to fail (only on Windows!)
+
+ version 0.1 2011-07-15 RDT
+
+--]]
+
+function usage()
+ print("Usage: [texlua] m-tx.lua { option | basename[.mtx] } ... ")
+ print("options: -v version")
+ print(" -h help")
+ print(" -l latex (or pdflatex)")
+ print(" -p pdfetex (or pdflatex)")
+ print(" -d dvipdfm")
+ print(" -s stop at dvi")
+ print(" -t stop at tex/mid")
+ print(" -m stop at pmx")
+ print(" -i retain intermediate files")
+ print(" -f restore default processing")
+end
+
+function whoami ()
+ print("This is m-tx.lua version ".. VERSION .. ".")
+end
+
+whoami()
+if #arg == 0 then
+ usage()
+ os.exit(0)
+end
+
+-- defaults:
+prepmx = "prepmx"
+pmx = "pmxab"
+tex = "etex"
+musixflx = "musixflx"
+dvi = "dvips"
+ps2pdf = "ps2pdf"
+intermediate = 1
+
+exit_code = 0
+narg = 1
+repeat
+ this_arg = arg[narg]
+ if this_arg == "-v" then
+ os.exit(0)
+ elseif this_arg == "-h" then
+ usage()
+ os.exit(0)
+ elseif this_arg == "-l" then
+ if tex == "pdfetex" then
+ tex = "pdflatex"
+ else
+ tex = "latex"
+ end
+ elseif this_arg == "-p" then
+ if tex == "latex" then
+ tex = "pdflatex"
+ else
+ tex = "pdfetex"
+ end
+ dvi = ""; ps2pdf = ""
+ elseif this_arg == "-d" then
+ dvi = "dvipdfm"; ps2pdf = ""
+ elseif this_arg == "-s" then
+ dvi = ""; ps2pdf = ""
+ elseif this_arg == "-i" then
+ intermediate = 0
+ elseif this_arg == "-f" then
+ pmx = "pmxab"; tex = "etex"; dvi = "dvips"; ps2pdf = "ps2pdf"; intermediate = 1
+ elseif this_arg == "-t" then
+ tex = ""; dvi = ""; ps2pdf = ""
+ elseif this_arg == "-m" then
+ pmx = ""; tex = ""; dvi = ""; ps2pdf = ""
+ else
+ filename = this_arg
+ if filename ~= "" and string.sub(filename, -4, -1) == ".mtx" then
+ filename = string.sub(filename, 1, -5)
+ end
+ print("Processing ".. filename .. ".mtx.")
+ OK = true
+ if ( os.execute(prepmx .. " " .. filename ) ~= 0 ) then
+ OK = false
+ end
+ if (OK and pmx ~= "") then
+ os.execute(pmx .. " " .. filename) -- does pmx return an error code?
+ pmxaerr = io.open("pmxaerr.dat", "r")
+ if (not pmxaerr) then
+ print("No log file.")
+ OK = false
+ else
+ linebuf = pmxaerr:read()
+ err = tonumber(linebuf)
+ if (err ~= 0) then
+ OK = false
+ end
+ pmxaerr:close()
+ end
+ end
+ os.remove( filename .. ".mx2" )
+ if ( OK ) and
+ ((tex == "") or os.execute(tex .. " " .. filename) == 0) and
+ ((tex == "") or os.execute(musixflx .. " " .. filename) == 0) and
+ ((tex == "") or os.execute(tex .. " " .. filename) == 0) and
+ ((tex ~= "latex" and tex ~= "pdflatex")
+ or (os.execute(tex .. " " .. filename) == 0)) and
+ (dvi == "" or (os.execute(dvi .. " " .. filename) == 0)) and
+ (ps2pdf == "" or (os.execute(ps2pdf .. " " .. filename .. ".ps") == 0) )
+ then
+ if ps2pdf ~= "" then
+ print(filename .. ".pdf generated by " .. ps2pdf .. ".")
+ end
+ if intermediate == 1 then -- clean-up:
+ os.remove( "pmxaerr.dat" )
+ os.remove( filename .. ".mx1" )
+ os.remove( filename .. ".mx2" )
+ if pmx ~= "" then
+ os.remove( filename .. ".pmx" )
+ end
+ if dvi ~= "" then
+ os.remove( filename .. ".dvi" )
+ end
+ if ps2pdf ~= "" then
+ os.remove( filename .. ".ps" )
+ end
+ end
+ else
+ print("M-Tx/pmx/MusiXTeX processing of " .. filename .. ".mtx fails.\n")
+ exit_code = 2
+ --[[ uncomment for debugging
+ print("tex = ", tex)
+ print("dvi = ", dvi)
+ print("ps2pdf = ", ps2pdf)
+ --]]
+ end
+ end --if this_arg == ...
+ narg = narg+1
+until narg > #arg
+os.exit( exit_code )
diff --git a/Build/source/utils/mtx/mtx.test b/Build/source/utils/mtx/mtx.test
new file mode 100755
index 00000000000..e9f2e4259c5
--- /dev/null
+++ b/Build/source/utils/mtx/mtx.test
@@ -0,0 +1,16 @@
+#! /bin/sh
+
+# Copyright (C) 2012 Peter Breitenlohner <tex-live@tug.org>
+# You may freely use, modify and/or distribute this file.
+
+rm -f mozart*
+
+cp $srcdir/tests/mozart.mtx .
+
+set -x
+
+./prepmx mozart \
+ && diff mozart.pmx $srcdir/tests/mozart.pmx \
+ || exit 1
+
+exit 0
diff --git a/Build/source/utils/mtx/prepmx.1 b/Build/source/utils/mtx/prepmx.1
new file mode 100644
index 00000000000..299591e2e9d
--- /dev/null
+++ b/Build/source/utils/mtx/prepmx.1
@@ -0,0 +1,95 @@
+.TH prepmx 1 "01 September 2005" "M-Tx Version 0.60" "prepmx Manual Page"
+.SH NAME
+prepmx \- preprocessor for PMX, easy music typesetting program
+.SH SYNOPSIS
+.B prepmx
+.RI [ options ]
+.I jobname
+.RI [ outdir/ ]
+.RI [ stylefile ]
+.SH DESCRIPTION
+.B M-Tx
+is an easy to use preprocessor language for the
+.B PMX
+music typesetting program, aimed at people who are not experts. For an
+easy example, have a look at the following example:
+
+ c2+ e4 g | b4d- c1 d c2 |
+ c8 g+ e g c- g+ e g | d g f g c- g+ e g |
+
+For syntax reference, please look at the M-Tx manual written by Dirk
+Laurie, the creator of the M-Tx language and the author of prepmx, its
+command line utility.
+
+.B prepmx
+processes the file
+.IR jobname .mtx
+to generate
+.IR jobname .pmx.
+You can then process this file using the `pmx' command.
+.B PMX
+is a preprocessor for MusiXTeX.
+
+.I outdir/
+is the directory where `pmx' will put the final .tex file. Note that the
+trailing slash is mandatory. You can provide a
+.I stylefile
+for M-Tx. If omitted, the file `mtxstyle.txt' in the current
+directory is used, if there is one.
+.SH OPTIONS
+Options can also be specified in a `Options:' line in the preamble,
+which takes precedence over the command line.
+.TP
+.B \-b
+never unbeam eighth notes and shorter
+.TP
+.B \-c
+main music lines only \- ignore chords
+.TP
+.B \-D
+enable debug mode
+.TP
+.B \-f
+use tonic sol\-fa note names
+.TP
+.B \-i
+ignore errors
+.TP
+.B \-m
+music only \- ignore lyrics
+.TP
+.B \-n
+indent first system and print default instrument names
+.TP
+.B \-t
+ignore uptext lines
+.TP
+.B \-u
+uptext synchronizes with notes only, not rests
+.TP
+.B \-v
+verbose progress report
+.TP
+.B \-w
+enable pedantic warnings
+.TP
+.BI \- n
+select specified case of multiple score
+.SH EXIT STATUS
+If no error was found,
+.B prepmx
+exits with return code 0. In case of an error, the line number of the
+processed line is returned. This may not always be the line containing
+the actual error. A return status of 10000 means that the input file was
+empty or could not be opened.
+.SH SEE ALSO
+.B M-Tx
+User's Guide (mtx060.pdf)
+.br
+pmx(1), musixtex(1)
+.SH AUTHORS
+prepmx was written by Dirk Laurie <dpl@sun.ac.za>.
+This manual page was written by Roland Stigge <stigge@antcom.de> for the Debian
+project. It was revised and extended by Nis Martensen
+<nis.martensen@web.de>, mostly by copying text from Dirk Laurie's M-Tx
+User's Guide.
diff --git a/Build/source/utils/mtx/tests/mozart.mtx b/Build/source/utils/mtx/tests/mozart.mtx
new file mode 100644
index 00000000000..88a4123c24d
--- /dev/null
+++ b/Build/source/utils/mtx/tests/mozart.mtx
@@ -0,0 +1,7 @@
+Title: Riff in C
+Composer: W. A. Mozart (1756--1791)
+Style: piano
+
+%% w120m
+c2+ e4 g | b4d- c1 d c2 |
+c8 g+ e g c- g+ e g | d g f g c- g+ e g |
diff --git a/Build/source/utils/mtx/tests/mozart.pmx b/Build/source/utils/mtx/tests/mozart.pmx
new file mode 100644
index 00000000000..ae55c3f13d9
--- /dev/null
+++ b/Build/source/utils/mtx/tests/mozart.pmx
@@ -0,0 +1,26 @@
+---
+\def\mtxversion{0.60d}
+\def\mtxdate{<11 October 2008>}
+\input mtx
+\mtxComposerLine{}{W. A. Mozart (1756--1791)}
+\mtxTitleLine{Riff in C}
+---
+2 -1 2 4 4 0 6 0.00000 0 1 1 20 0
+
+60
+./
+Tt
+\mtxTitle
+Tc
+\mtxPoetComposer
+% Paragraph 2 line 5 bar 1
+ w120m
+c83 g8+ e8 g8 c8- g8+ e8 g8 | /
+c25 e4 g4 | /
+
+%Bar 2
+d8 g8 f8 g8 c8- g8+ e8 g8 | Rb
+ /
+b4-d c1 d1 c2 | /
+
+% Coded by M-Tx