depth = ../..
-STEPMAKE_TEMPLATES=documentation
+STEPMAKE_TEMPLATES=documentation install-out
SECTION=1
MANTXT = $(addprefix $(outdir)/, $(addsuffix .txt,$(basename $(TEXINFO_FILES) .texinfo)))
MANGROFF = $(addprefix $(outdir)/, $(addsuffix .$(SECTION),$(basename $(YO_FILES) .yo)))
INSTALLATION_OUT_FILES=$(MANGROFF)
INSTALLATION_OUT_DIR=$(mandir)/man$(SECTION)
-include $(stepdir)/install-outfiles.make
-
local-WWW: $(MANGROFF:.1=.html)
$(PYTHON) $(step-bindir)/ls-latex.py --package=$(topdir) --title 'Manual pages for LilyPond' $(YO_FILES) \
| sed "s!$(outdir)/!!g" > $(outdir)/index.html
Then, from the top of Lily's source tree, type
verb(
+ make dist
make diff
)
-which leaves your patch as file(./lilypond-0.1.73.jcn1.diff).
+which rolls the tarball file(../releases/lilypond-0.1.73.tar.gz)
+and leaves your patch as file(./lilypond-0.1.73.jcn1.diff).
+footnote('Make diff' generates a patch between two tarballs. For
+more info type 'make diff help=='. We assume that there is a tarball
+file(lilypond-0.1.73.tar.gz) in the directory file(../releases).
+
If you didn't configure Lily using --srcdir, you can do:
dnl WARNING WARNING WARNING WARNING
-dnl do not edit! this is aclocal.m4, generated from stepmake/stepmake/../aclocal.m4
+dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
dnl aclocal.m4 -*-shell-script-*-
dnl StepMake subroutines for configure.in
fi
])
+AC_DEFUN(AC_STEPMAKE_GUILE, [
+ # urg, must check for different functions in libguile
+ # to force new check iso reading from cache
+ AC_CHECK_LIB(guile, scm_shell, \
+ LIBS="-lguile $LIBS" AC_DEFINE(HAVE_LIBGUILE), \
+ AC_CHECK_LIB(readline, readline) \
+ AC_CHECK_LIB(dl, dlopen) \
+ AC_CHECK_LIB(guile, scm_boot_guile))
+])
+
AC_DEFUN(AC_STEPMAKE_INIT, [
. $srcdir/VERSION
package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
changequote([, ])dnl
+ # No versioning on directory names of sub-packages
+ # urg, urg
+ stepmake=${datadir}/stepmake
+ presome=${prefix}
+ if test "$prefix" = "NONE"; then
+ presome=${ac_default_prefix}
+ fi
+ stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
+
if test "x$PACKAGE" = "xSTEPMAKE"; then
echo Stepmake package!
(cd stepmake; rm -f stepmake; ln -s ../stepmake .)
(cd stepmake; rm -f bin; ln -s ../bin .)
AC_CONFIG_AUX_DIR(bin)
+ stepmake=stepmake
else
echo Package: $PACKAGE
- AC_CONFIG_AUX_DIR(stepmake/bin)
+ # Check for installed stepmake
+ if test -d $stepmake; then
+ echo Using installed stepmake: $stepmake
+ else
+ stepmake='$(depth)'/stepmake
+ echo Using local stepmake: $datadir/stepmake not found
+ fi
+ AC_CONFIG_AUX_DIR(\
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ )
fi
+ AC_SUBST(stepmake)
AC_SUBST(package)
AC_SUBST(PACKAGE)
AC_SUBST(PACKAGE_NAME)
absolute_builddir="`pwd`"
AC_SUBST(absolute_builddir)
- # No versioning on directory names of sub-packages
- stepmake=stepmake
- AC_SUBST(stepmake)
-
STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
if test "x$STATE_VECTOR" != "x"; then
STATE_VECTOR="\$(depth)/$STATE_VECTOR"
DOTEXE=.exe
DIRSEP='\\'
PATHSEP=';'
- INSTALL="\$(stepdir)/../bin/install-dot-exe.sh -c"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
else
DIRSEP='/'
PATHSEP=':'
LN=ln
LN_S='ln -s'
ZIP="zip -r -9"
- INSTALL="\$(stepdir)/../bin/install-sh -c"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
fi
AC_SUBST(DOTEXE)
AC_SUBST(ZIP)
AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
+ YODL2LESS_DIR='$(bindir)/'
else
AC_SUBST(STRIPROFF)
AC_SUBST(YODL)
AC_SUBST(YODL2HTML)
AC_SUBST(YODL2LATEX)
+ AC_SUBST(YODL2LESS_DIR)
AC_SUBST(YODL2MAN)
AC_SUBST(YODL2MSLESS)
AC_SUBST(YODL2TEXINFO)
YODL= @YODL@
YODL2HTML= @YODL2HTML@
YODL2LATEX= @YODL2LATEX@
+YODL2LESS_DIR= @YODL2LESS_DIR@
YODL2MAN= @YODL2MAN@
YODL2MSLESS= @YODL2MSLESS@
YODL2TEXINFO= @YODL2TEXINFO@
enable-mingw-prefix=DIR set the mingw32 directory (standalone windows32 exes)"
ac_help="$ac_help
enable-printing turn on debug printing. Default: off"
-ac_help="$ac_help
- enable-guile link in GUILE. Default: off"
ac_help="$ac_help
with-localedir=LOCALE use LOCALE as locale dir. Default: PREFIX/share/locale "
ac_help="$ac_help
PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
+ # No versioning on directory names of sub-packages
+ # urg, urg
+ stepmake=${datadir}/stepmake
+ presome=${prefix}
+ if test "$prefix" = "NONE"; then
+ presome=${ac_default_prefix}
+ fi
+ stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
+
if test "x$PACKAGE" = "xSTEPMAKE"; then
echo Stepmake package!
(cd stepmake; rm -f stepmake; ln -s ../stepmake .)
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ stepmake=stepmake
else
echo Package: $PACKAGE
+ # Check for installed stepmake
+ if test -d $stepmake; then
+ echo Using installed stepmake: $stepmake
+ else
+ stepmake='$(depth)'/stepmake
+ echo Using local stepmake: $datadir/stepmake not found
+ fi
ac_aux_dir=
-for ac_dir in stepmake/bin $srcdir/stepmake/bin; do
+for ac_dir in \
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ $srcdir/\
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ ; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in stepmake/bin $srcdir/stepmake/bin" 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in \
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ $srcdir/\
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ " 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
+
cat >> confdefs.h <<EOF
#define PACKAGE "${PACKAGE_NAME}"
EOF
absolute_builddir="`pwd`"
- # No versioning on directory names of sub-packages
- stepmake=stepmake
-
-
STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
if test "x$STATE_VECTOR" != "x"; then
STATE_VECTOR="\$(depth)/$STATE_VECTOR"
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:709: checking host system type" >&5
+echo "configure:761: checking host system type" >&5
host_alias=$host
case "$host_alias" in
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:734: checking for $ac_word" >&5
+echo "configure:786: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:768: checking for $ac_word" >&5
+echo "configure:820: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:805: checking for $ac_word" >&5
+echo "configure:857: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:839: checking for $ac_word" >&5
+echo "configure:891: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BASH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${PYTHON:-python}", so it can be a program name with args.
set dummy ${PYTHON:-python}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:872: checking for $ac_word" >&5
+echo "configure:924: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
DOTEXE=.exe
DIRSEP='\\'
PATHSEP=';'
- INSTALL="\$(stepdir)/../bin/install-dot-exe.sh -c"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
else
DIRSEP='/'
PATHSEP=':'
LN=ln
LN_S='ln -s'
ZIP="zip -r -9"
- INSTALL="\$(stepdir)/../bin/install-sh -c"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1088: checking for $ac_word" >&5
+echo "configure:1140: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1117: checking for $ac_word" >&5
+echo "configure:1169: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1165: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1217: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 1175 "configure"
+#line 1227 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1199: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1251: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1204: checking whether we are using GNU C" >&5
+echo "configure:1256: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1265: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1228: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1280: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
printing_b=no
-guile_b=no
# Check whether --enable-printing or --disable-printing was given.
if test "${enable_printing+set}" = set; then
enableval="$enable_printing"
printing_b=$enableval
fi
-# Check whether --enable-guile or --disable-guile was given.
-if test "${enable_guile+set}" = set; then
- enableval="$enable_guile"
- guile_b=$enableval
-fi
-
-
if test "$optimise_b" = yes; then
DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
fi
echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
-echo "configure:1293: checking how to run the C++ preprocessor" >&5
+echo "configure:1337: checking how to run the C++ preprocessor" >&5
if test -z "$CXXCPP"; then
if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
CXXCPP="${CXX-g++} -E"
cat > conftest.$ac_ext <<EOF
-#line 1306 "configure"
+#line 1350 "configure"
#include "confdefs.h"
#include <stdlib.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1355: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1342: checking for $ac_word" >&5
+echo "configure:1386: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1373: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1417: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext <<EOF
-#line 1383 "configure"
+#line 1427 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1407: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1451: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1412: checking whether we are using GNU C++" >&5
+echo "configure:1456: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1421: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1465: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1436: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1480: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_safe=`echo "FlexLexer.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for FlexLexer.h""... $ac_c" 1>&6
-echo "configure:1466: checking for FlexLexer.h" >&5
+echo "configure:1510: checking for FlexLexer.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1471 "configure"
+#line 1515 "configure"
#include "confdefs.h"
#include <FlexLexer.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1520: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
echo $ac_n "checking whether explicit instantiation is needed""... $ac_c" 1>&6
-echo "configure:1526: checking whether explicit instantiation is needed" >&5
+echo "configure:1570: checking whether explicit instantiation is needed" >&5
if eval "test \"`echo '$''{'lily_cv_need_explicit_instantiation'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1531 "configure"
+#line 1575 "configure"
#include "confdefs.h"
template <class T> struct foo { static int baz; };
return foo<int>::baz;
; return 0; }
EOF
-if { (eval echo configure:1541: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
lily_cv_need_explicit_instantiation=no
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1568: checking for $ac_word" >&5
+echo "configure:1612: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1610: checking for $ac_word" >&5
+echo "configure:1654: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BISON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1644: checking for $ac_word" >&5
+echo "configure:1688: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FLEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1711: checking for $ac_word" >&5
+echo "configure:1755: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1743: checking for $ac_word" >&5
+echo "configure:1787: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
echo $ac_n "checking language""... $ac_c" 1>&6
-echo "configure:1798: checking language" >&5
+echo "configure:1842: checking language" >&5
case "$language" in
En* | en* | Am* | am* | US* | us*)
lang=English;;
echo $ac_n "checking for gettext in -lintl""... $ac_c" 1>&6
-echo "configure:1834: checking for gettext in -lintl" >&5
+echo "configure:1878: checking for gettext in -lintl" >&5
ac_lib_var=`echo intl'_'gettext | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lintl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 1842 "configure"
+#line 1886 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
gettext()
; return 0; }
EOF
-if { (eval echo configure:1856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
for ac_func in gettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1886: checking for $ac_func" >&5
+echo "configure:1930: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1891 "configure"
+#line 1935 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:1917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1949: checking for $ac_word" >&5
+echo "configure:1993: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MSGFMT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
test -n "$MSGFMT" || MSGFMT="\$(SHELL) \$(step-bindir)/fake-msgfmt.sh "
echo $ac_n "checking whether msgfmt accepts -o""... $ac_c" 1>&6
-echo "configure:1979: checking whether msgfmt accepts -o" >&5
+echo "configure:2023: checking whether msgfmt accepts -o" >&5
msgfmt_output="`msgfmt -o bla 2>&1 | grep usage`"
if test "$msgfmt_output" = ""; then
echo "$ac_t""yes" 1>&6
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2006: checking for $ac_word" >&5
+echo "configure:2050: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_METAFONT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2041: checking for $ac_word" >&5
+echo "configure:2085: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MFONT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2078: checking for $ac_word" >&5
+echo "configure:2122: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_METAPOST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2113: checking for $ac_word" >&5
+echo "configure:2157: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MPOST'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2156: checking for $ac_word" >&5
+echo "configure:2200: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIPROFF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2190: checking for $ac_word" >&5
+echo "configure:2234: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2224: checking for $ac_word" >&5
+echo "configure:2268: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2HTML'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2258: checking for $ac_word" >&5
+echo "configure:2302: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2LATEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2291: checking for $ac_word" >&5
+echo "configure:2335: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2MAN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2325: checking for $ac_word" >&5
+echo "configure:2369: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2MSLESS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2359: checking for $ac_word" >&5
+echo "configure:2403: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2TEXINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2393: checking for $ac_word" >&5
+echo "configure:2437: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2TXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
done
test -n "$YODL2TXT" || YODL2TXT="-echo no yodl"
+ YODL2LESS_DIR='$(bindir)/'
else
+
export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
fi
if test "x$YODL" = "-echo no yodl"; then
fi
-
-
-case $guile_b in
- yes)
+ # urg, must check for different functions in libguile
+ # to force new check iso reading from cache
echo $ac_n "checking for scm_shell in -lguile""... $ac_c" 1>&6
-echo "configure:2446: checking for scm_shell in -lguile" >&5
+echo "configure:2490: checking for scm_shell in -lguile" >&5
ac_lib_var=`echo guile'_'scm_shell | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
ac_save_LIBS="$LIBS"
LIBS="-lguile $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 2454 "configure"
+#line 2498 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
#ifdef __cplusplus
scm_shell()
; return 0; }
EOF
-if { (eval echo configure:2468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ \
+ LIBS="-lguile $LIBS" cat >> confdefs.h <<\EOF
+#define HAVE_LIBGUILE 1
+EOF
+
+else
+ echo "$ac_t""no" 1>&6
+\
+ echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
+echo "configure:2536: checking for readline in -lreadline" >&5
+ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lreadline $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2544 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char readline();
+
+int main() {
+readline()
+; return 0; }
+EOF
+if { (eval echo configure:2558: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/^a-zA-Z0-9_/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-lreadline $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+ \
+ echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
+echo "configure:2586: checking for dlopen in -ldl" >&5
+ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-ldl $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2594 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char dlopen();
+
+int main() {
+dlopen()
+; return 0; }
+EOF
+if { (eval echo configure:2608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
fi
if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo guile | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+ ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/^a-zA-Z0-9_/_/g' \
+ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+ cat >> confdefs.h <<EOF
+#define $ac_tr_lib 1
+EOF
+
+ LIBS="-ldl $LIBS"
+
+else
+ echo "$ac_t""no" 1>&6
+fi
+ \
+ echo $ac_n "checking for scm_boot_guile in -lguile""... $ac_c" 1>&6
+echo "configure:2636: checking for scm_boot_guile in -lguile" >&5
+ac_lib_var=`echo guile'_'scm_boot_guile | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+ echo $ac_n "(cached) $ac_c" 1>&6
+else
+ ac_save_LIBS="$LIBS"
+LIBS="-lguile $LIBS"
+cat > conftest.$ac_ext <<EOF
+#line 2644 "configure"
+#include "confdefs.h"
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char scm_boot_guile();
+
+int main() {
+scm_boot_guile()
+; return 0; }
+EOF
+if { (eval echo configure:2658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=yes"
+else
+ echo "configure: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ rm -rf conftest*
+ eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+ echo "$ac_t""yes" 1>&6
+ ac_tr_lib=HAVE_LIB`echo guile | sed -e 's/^a-zA-Z0-9_/_/g' \
-e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
cat >> confdefs.h <<EOF
#define $ac_tr_lib 1
echo "$ac_t""no" 1>&6
fi
+fi
+
+
+
- ;;
-esac
-
echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
-echo "configure:2500: checking for 8-bit clean memcmp" >&5
+echo "configure:2691: checking for 8-bit clean memcmp" >&5
if eval "test \"`echo '$''{'ac_cv_func_memcmp_clean'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_func_memcmp_clean=no
else
cat > conftest.$ac_ext <<EOF
-#line 2508 "configure"
+#line 2699 "configure"
#include "confdefs.h"
#ifdef __cplusplus
extern "C" void exit(int);
}
EOF
-if { (eval echo configure:2521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
+if { (eval echo configure:2712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
then
ac_cv_func_memcmp_clean=yes
else
test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o"
echo $ac_n "checking for vprintf""... $ac_c" 1>&6
-echo "configure:2539: checking for vprintf" >&5
+echo "configure:2730: checking for vprintf" >&5
if eval "test \"`echo '$''{'ac_cv_func_vprintf'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2544 "configure"
+#line 2735 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char vprintf(); below. */
; return 0; }
EOF
-if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2761: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_vprintf=yes"
else
if test "$ac_cv_func_vprintf" != yes; then
echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
-echo "configure:2594: checking for _doprnt" >&5
+echo "configure:2785: checking for _doprnt" >&5
if eval "test \"`echo '$''{'ac_cv_func__doprnt'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2599 "configure"
+#line 2790 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char _doprnt(); below. */
; return 0; }
EOF
-if { (eval echo configure:2625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func__doprnt=yes"
else
for ac_func in memmem snprintf vsnprintf gettext
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:2652: checking for $ac_func" >&5
+echo "configure:2843: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2657 "configure"
+#line 2848 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
; return 0; }
EOF
-if { (eval echo configure:2683: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:2874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2722: checking for $ac_word" >&5
+echo "configure:2913: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
+s%@stepmake@%$stepmake%g
s%@package@%$package%g
s%@PACKAGE@%$PACKAGE%g
s%@PACKAGE_NAME@%$PACKAGE_NAME%g
s%@package_depth@%$package_depth%g
s%@AUTOGENERATE@%$AUTOGENERATE%g
s%@absolute_builddir@%$absolute_builddir%g
-s%@stepmake@%$stepmake%g
s%@STATE_VECTOR@%$STATE_VECTOR%g
s%@CONFIGSUFFIX@%$CONFIGSUFFIX%g
s%@host@%$host%g
s%@YODL2MSLESS@%$YODL2MSLESS%g
s%@YODL2TEXINFO@%$YODL2TEXINFO%g
s%@YODL2TXT@%$YODL2TXT%g
+s%@YODL2LESS_DIR@%$YODL2LESS_DIR%g
s%@LIBOBJS@%$LIBOBJS%g
s%@MAKEINFO@%$MAKEINFO%g
# AC_HAVE_HEADERS(limits.h malloc.h string.h unistd.h values.h)
printing_b=no
-guile_b=no
AC_ARG_ENABLE(printing,
[ enable-printing turn on debug printing. Default: off],
[printing_b=$enableval])
-AC_ARG_ENABLE(guile,
- [ enable-guile link in GUILE. Default: off],
- [guile_b=$enableval])
-
if test "$optimise_b" = yes; then
DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
AC_STEPMAKE_TEXMF
# AC_STEPMAKE_TEXMF_DIRS
AC_STEPMAKE_YODL
-
+AC_STEPMAKE_GUILE
dnl should check out -print
dnl huh?
dnl AC_CHECK_SEARCH_RESULT($FIND, find, Please use --enable-tex-dir)
-case $guile_b in
- yes)
- AC_CHECK_LIB(guile, scm_shell)
-
- ;;
-esac
-
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF
AC_CHECK_FUNCS(memmem snprintf vsnprintf gettext)
Bow 1
Bezier_bow 1
Change_iterator 1
+Change_translator 1
Chord 1
Chord_iterator 1
Clef_item 1
General_script_def 1
Graphical_element 1
Group_change_req 1
+Guile 1
Head_column 0
Horizontal_align_item 1
+Horizontal_group_item 1
Idealspacing 1
Identifier 1
Ineq_constrained_qp 1
Symtables 1
Text_def 1
+Text_item 1
Text_req 1
Time_description 1
Translation_property 0
INSTALLATION_DIR=$(datadir)/ly/
INSTALLATION_FILES=$(INI_FILES)
+STEPMAKE_TEMPLATES=install
LOCALSTEPMAKE_TEMPLATES=mutopia
include $(depth)/make/stepmake.make
-
-include $(stepdir)/installfiles.make
-
\include "property.ly"
+\include "scm.ly"
+
% music = "\melodic\relative c"
--- /dev/null
+% scm.ly -- implement Scheme output routines for TeX and PostScript
+%
+% source file of the GNU LilyPond music typesetter
+%
+% (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+
+\scm "
+
+;;; graphical lisp element
+(define (add-column p) (display \"adding column (in guile): \") (display p) (newline))
+
+;;; library funtions
+(define
+ (numbers->string l)
+ (apply string-append
+ (map (lambda (n) (string-append (number->string n) \" \")) l)))
+
+(define (number->octal-string x)
+ (let* ((n (inexact->exact x))
+ (n64 (quotient n 64))
+ (n8 (quotient (- n (* n64 64)) 8)))
+ (string-append
+ (number->string n64)
+ (number->string n8)
+ (number->string (remainder (- n (+ (* n64 64) (* n8 8))) 8)))))
+
+(define (inexact->string x radix)
+ (let ((n (inexact->exact x)))
+ (number->string n radix)))
+
+(define
+ (number->dim-tex x)
+ (string-append
+ (number->string x) \"pt \"))
+
+(define
+ (control->string c)
+ (string-append
+ (string-append (number->string (car c)) \" \")
+ (string-append (number->string (cadr c)) \" \")))
+
+(define
+ (invoke-output o s)
+ (eval-string (string-append s \"-\" o)))
+
+;;; output definitions
+(define
+ (char o n)
+ ((invoke-output o \"char\") n))
+
+(define
+ (char-ps n)
+ (string-append
+ \"(\\\\\" (inexact->string n 8) \") show\"))
+
+(define
+ (char-tex n)
+ (string-append
+ \"\\\\char\" (inexact->string n 10)))
+
+(define
+ (dashed-slur o thick dash l)
+ ((invoke-output o \"dashed-slur\") thick dash l))
+
+(define
+ (dashed-slur-ps thick dash l)
+ (string-append
+ (apply string-append (map control->string l))
+ (number->string thick)
+ \" [ \"
+ (if (> 1 dash) (number->string (- (* thick dash) thick)) \"0\") \" \"
+ (number->string (* 2 thick))
+ \" ] 0 draw_dashed_slur\"))
+
+(define
+ (dashed-slur-tex thick dash l)
+ (string-append
+ \"\\\\embeddedps{\"
+ (dashed-slur-ps thick dash l)
+ \"}\"))
+
+(define
+ (empty o)
+ ((invoke-output o \"empty\")))
+
+(define
+ (empty-ps)
+ \"\n empty\n\")
+
+(define
+ (empty-tex)
+ \"%\n\\\\empty%\n\")
+
+(define
+ (end-output o)
+ ((invoke-output o \"end-output\")))
+
+(define
+ (end-output-ps)
+ \"\nshowpage\n\")
+
+(define
+ (end-output-tex)
+ \"\n\\\\EndLilyPondOutput\")
+
+(define
+ (experimental-on o)
+ ((invoke-output o \"experimental-on\")))
+
+(define
+ (experimental-on-ps) \"\")
+
+(define
+ (experimental-on-tex) \"\\\\turnOnExperimentalFeatures\")
+
+(define
+ (finishbar o h) (empty o))
+
+(define
+ (font i)
+ (string-append
+ \"font\"
+ (make-string 1 (integer->char (+ (char->integer #\\A) i)))
+ ))
+
+(define
+ (font-def o i s)
+ (empty o))
+; ((invoke-output o \"font-def\") i s))
+
+(define
+ (font-def-ps i s)
+ (string-append
+ \"\n/\" (font i) \" {/\"
+ (substring s 0 (- (string-length s) 3))
+ \" findfont 12 scalefont setfont} bind def\n\"))
+
+(define
+ (font-def-tex i s)
+ (string-append
+ \"\\\\font\" (font-switch-tex i) \"=\" s \"\n\"))
+
+(define
+ (font-switch o i)
+ ((invoke-output o \"font-switch\") i))
+
+(define
+ (font-switch-ps i)
+ (string-append (font i) \" \"))
+
+(define
+ (font-switch-tex i)
+ (string-append
+ \"\\\\\" (font i) \"\n\"))
+
+(define
+ (generalmeter o num den)
+ ((invoke-output o \"generalmeter\") num den))
+
+(define
+ (generalmeter-ps num den)
+ (string-append num \" \" den \" generalmeter \"))
+
+(define
+ (generalmeter-tex num den)
+ (string-append
+ \"\\\\generalmeter{\" num \"}{\" den \"}\"))
+
+(define
+ (header o creator generate)
+ ((invoke-output o \"header\") creator generate))
+
+(define
+ (header-ps creator generate)
+ (string-append
+ \"%!PS-Adobe-3.0\n\"
+ \"%%Creator: \" creator generate \"\n\"))
+
+(define
+ (header-tex creator generate)
+ (string-append
+ \"%created by: \" creator generate \"\n\"))
+
+(define
+ (header-end o)
+ ((invoke-output o \"header-end\")))
+
+(define
+ (header-end-ps) \"\")
+
+(define
+ (header-end-tex) \"\\\\turnOnPostScript\")
+
+(define
+ (lily-def o key val)
+ ((invoke-output o \"lily-def\") key val))
+
+(define
+ (lily-def-ps key val)
+ (string-append
+ \"/\" key \" {\" val \"} bind def\n\"))
+
+(define
+ (lily-def-tex key val)
+ (string-append
+ \"\\\\def\\\\\" key \"{\" val \"}\n\"))
+
+(define
+ (maatstreep o h)
+ ((invoke-output o \"maatstreep\") h))
+
+(define
+ (maatstreep-ps h)
+ (string-append
+ (number->string h) \" maatstreep \" ))
+
+(define
+ (maatstreep-tex h)
+ (string-append
+ \"\n\\\\maatstreep{\" (number->dim-tex h) \"}\"))
+
+(define
+ (pianobrace o h) (empty o))
+
+(define
+ (placebox o x y b)
+ ((invoke-output o \"placebox\") x y (b o)))
+
+(define
+ (placebox-ps x y s)
+ (string-append
+ (number->string x) \" \" (number->string y) \" {\" s \"} placebox \"))
+
+(define
+ (placebox-tex x y s)
+ (string-append
+ \"\\\\placebox{\"
+ (number->dim-tex y) \"}{\" (number->dim-tex x) \"}{\" s \"}\"))
+
+(define
+ (repeatbar o h) (empty o))
+
+(define
+ (rulesym o x y)
+ ((invoke-output o \"rulesym\") x y))
+
+(define
+ (rulesym-ps x y)
+ (string-append
+ (number->string x) \" \"
+ (number->string y) \" \"
+ \"rulesym\"))
+
+(define
+ (rulesym-tex x y)
+ (string-append
+ \"\\\\rulesym{\" (number->dim-tex x) \"}{\" (number->dim-tex y) \"}\"))
+
+(define
+ (setitalic o s) (empty o))
+
+(define
+ (settext o s) (empty o))
+
+(define
+ (slur o l)
+ ((invoke-output o \"slur\") l))
+
+(define
+ (slur-ps l)
+ (string-append
+ (apply string-append (map control->string l))
+ \" draw_slur\"))
+
+(define
+ (slur-tex l)
+ (string-append
+ \"\\\\embeddedps{\"
+ (slur-ps l)
+ \"}\"))
+
+(define
+ (stem o kern width height depth)
+ ((invoke-output o \"stem\") kern width height depth))
+
+(define
+ (stem-ps kern width height depth)
+ (string-append (numbers->string (list kern width height depth))
+ \"draw_stem\" ))
+
+(define
+ (stem-tex kern width height depth)
+ (string-append
+ \"\\\\kern\" (number->dim-tex kern)
+ \"\\\\vrule width \" (number->dim-tex width)
+ \"depth \" (number->dim-tex depth)
+ \"height \" (number->dim-tex height) \" \"))
+
+(define
+ (start-line o)
+ ((invoke-output o \"start-line\")))
+
+(define
+ (start-line-ps)
+ (string-append
+ (urg-fix-font-ps)
+ \"\nstart_line {\n\"))
+
+(define
+ (start-line-tex)
+ (string-append
+ (urg-fix-font-tex)
+ \"\\\\hbox{%\n\"))
+
+(define
+ (stop-line o)
+ ((invoke-output o \"stop-line\")))
+
+(define
+ (stop-line-ps)
+ \"}\nstop_line\n\")
+
+(define
+ (stop-line-tex)
+ \"}\\\\interscoreline\")
+
+(define
+ (urg-fix-font-ps)
+ \"/fontA { /feta20 findfont 12 scalefont setfont} bind def fontA\n\")
+
+(define
+ (urg-fix-font-tex)
+ \"\\\\font\\\\fontA=feta20.afm\\\\fontA\n\")
+
+(define
+ (urg-font-switch-ps i)
+ \"\n/feta20 findfont 12 scalefont setfont \n\")
+
+";
+
+
% indexstring follow_into_staff same_dir_as_stem above_below_staff symbol_can_beinverted priority }
%
+thumb = \script { "thumb" 0 0 1 0 0 }
accent = \script { "sforzato" 0 -1 0 0 0 }
marcato = \script { "marcato" 0 -1 0 1 0 }
staccatissimo = \script { "staccatissimo" 0 -1 0 1 0 }
SUBDIRS=test bugs
examples=example-3 twinkle-pop praeludium-fuga-E twinkle
-flexamples=example-1 example-2
+flexamples=example-1 example-2
LOCALSTEPMAKE_TEMPLATES=mutopia
--- /dev/null
+\header{
+ title="CELLO-THUMBS";
+ enteredby="Maarten Storm";
+}
+
+
+% the thumb-script is used in cello music to indicate a note that should
+% be played with your thumb.
+
+\version "1.0.7";
+
+\score { \notes \relative c'' {
+ <[ a8_\thumb a'8-3(> <)b_\thumb b'-3>
+ <c_\thumb c'-3(> <)d_\thumb d'-3]>
+ }
+ \paper{
+ linewidth = 80.\mm;
+ castingalgorithm = \Wordwrap;
+ }
+}
+
+
if (abs (off_[ax]) >= 100 CM)
{
warning (_f ("ridiculous dimension: %s, %s", axis_name_str (ax),
- global_lookup_l->print_dimen (off_[ax])));
+ print_dimen (off_[ax])));
if (experimental_features_global_b)
assert (false);
But Atom is used as a simple type *everywhere*,
and we don't have virtual contructors.
*/
- str_ = global_lookup_l->unknown_str ();
+ lambda_ = 0;
+ str_ = "unknown\n";
}
Atom::Atom (String s, Box b)
: dim_ (b)
{
+ lambda_ = 0;
str_ = s;
}
--- /dev/null
+// dimensions.cc
+
+#include "dimensions.hh"
+#include "debug.hh"
+#include "string.hh"
+
+String
+print_dimen (Real r)
+{
+ String s = to_str (r, "%.3f");
+ if (s.index_i ("NaN") != -1)
+ {
+ warning (_ ("NaN"));
+ s = "0.0";
+ }
+ s += "pt";
+ return s;
+}
+
#ifndef ATOM_HH
#define ATOM_HH
+#include "lily-guile.hh"
#include "string.hh"
#include "box.hh"
#include "lily-proto.hh"
-
/// a symbol which can be translated, and freely copied
class Atom {
Offset off_;
public:
+ // urg, only used as a temp buffer
String str_;
String font_;
+ SCM lambda_;
Box dim_;
Offset offset () const;
#define CM *CM_TO_PT
#define INCH *INCH_TO_PT
+String print_dimen (Real);
+
#endif // DIMENSIONS_HH
#include "config.hh"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifdef HAVE_LIBGUILE
extern "C" {
#include <guile/gh.h>
#else
typedef long SCM;
#endif
+
+SCM ly_append (SCM a, SCM b);
+SCM ly_eval (SCM a);
+SCM ly_func_o (char const* name);
+SCM ly_lambda_o ();
+SCM ly_list1 (SCM a);
+SCM ly_list2(SCM a, SCM b);
+SCM ly_quote ();
+
+#ifdef __cplusplus
+}
+#endif
+
+#include "array.hh"
+#include "scalar.hh"
+SCM lambda_scm (String str, Array<Real> args_arr);
+SCM lambda_scm (String str, Array<Scalar> args_arr);
+
#endif // LILY_GUILE_HH
Lookup ();
Lookup (Lookup const&);
Lookup (Symtables const&);
- virtual ~Lookup ();
+ ~Lookup ();
Atom accidental (int) const;
void add (String, Symtable*);
- virtual Atom afm_find (String s) const = 0;
- Atom afm_find (String, String) const;
- virtual Atom* atom_p (String, int, Box) const = 0;
+ Atom afm_find (String) const;
Atom ball (int) const;
Atom bar (String, Real height) const;
- String base_output_str () const;
Atom beam (Real,Real, Real) const;
- virtual String character_str (int i) const;
Atom clef (String) const;
- virtual Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const = 0;
+ Atom dashed_slur (Array<Offset> controls, Real thick, Real dash) const;
Atom dots () const;
Atom dynamic (String) const;
Atom fill (Box b) const;
Atom flag (int, Direction) const;
- virtual Atom hairpin (Real width, bool decresc, bool continued) const = 0;
- virtual Lookup* lookup_p (Lookup const&) const = 0;
- virtual Lookup* lookup_p (Symtables const&) const = 0;
- virtual Paper_outputter* paper_outputter_p (Paper_stream*, Paper_def*, Scope*, String) const = 0;
- virtual Paper_stream* paper_stream_p () const = 0;
- virtual Atom plet (Real dy, Real dx, Direction dir) const = 0;
+ Atom hairpin (Real width, bool decresc, bool continued) const;
+ Atom plet (Real dy, Real dx, Direction dir) const;
void print () const;
- virtual Atom ps_beam (Real slope, Real width, Real thick) const = 0;
- virtual String print_dimen (Real) const;
+ Atom ps_beam (Real slope, Real width, Real thick) const;
Atom rest (int, bool outside) const;
Atom rule_symbol (Real height, Real width) const;
Atom script (String idx) const;
- /** paratime_signature substitution in lookup strings.
- this function provides a simple macro mechanism:
-
- if source == "tex%bla%", then
- substitute_args (source, {"X","Y"}) == "texXblaY"
- */
- String substitute_args (String source, Array<String> args) const;
- /// paratime_signature substitution in lookup strings
- String substitute_args (String source, Array<Scalar> args) const;
- virtual Atom stem (Real y1_pos, Real y2_pos) const = 0;
- Atom stem (Real y1_pos, Real y2_pos, String) const;
- virtual Atom slur (Array<Offset> controls) const = 0;
+ Atom stem (Real y1_pos, Real y2_pos) const;
+ Atom slur (Array<Offset> controls) const;
Atom streepje (int type) const;
- virtual Atom text (String style, String text) const;
- virtual String unknown_str () const = 0;
+ Atom text (String style, String text) const;
Atom vbrace (Real &dy) const;
- virtual Atom vbracket (Real &dy) const = 0;
+ Atom vbracket (Real &dy) const;
Atom special_time_signature (String, Array<Scalar>) const;
Atom time_signature (Array<Scalar>) const;
extern bool find_quarts_global_b;
extern int exit_status_i_;
extern bool experimental_features_global_b;
-extern Lookup* global_lookup_l;
+extern char const* output_global_ch;
extern bool dependency_global_b;
extern bool version_ignore_global_b;
{
Assoc<int, Lookup *> *lookup_p_assoc_p_;
static int default_count_i_;
- bool ps_b_;
protected:
VIRTUAL_COPY_CONS(Paper_def,Music_output_def);
Real arithmetic_constant (Moment minimal_mom) const;
Real arithmetic_spacing (Moment mom,Real constant) const;
virtual int get_next_default_count () const;
- //urg
- String tex_output_settings_str () const;
- String ps_output_settings_str () const;
+
+ void output_settings (Paper_outputter*) const;
+ Paper_outputter* paper_outputter_p (Paper_stream*, Scope*, String) const;
+ Paper_stream* paper_stream_p () const;
+ String base_output_str () const;
+
// urg
friend int yyparse (void*);
};
#include "lily-proto.hh"
#include "array.hh"
#include "string.hh"
+#include "lily-guile.hh"
/**
Abstract interface for a Score_element to output itself.
{
public:
Paper_outputter (Paper_stream *);
- virtual ~Paper_outputter ();
-
- virtual void output_molecule (Molecule const *, Offset, char const *)=0;
- void output_molecule (Molecule const *, Offset, char const *, String);
- virtual void start_line ()=0;
- virtual void stop_line ()=0;
- virtual void switch_to_font (String fontname)=0;
+ ~Paper_outputter ();
+
+ void output_font_def (int i, String str);
+ void output_font_switch (int i);
+ void output_header ();
+ void output_molecule (Molecule const *, Offset, char const *);
+ void output_comment (String s);
+ void output_scheme (SCM scm);
+ void output_string (String s);
+ void start_line ();
+ void stop_line ();
+ void switch_to_font (String fontname);
Array<String> font_arr_;
String current_font_;
/// open a file for writing
Paper_stream (String filename);
- virtual void header () = 0;
/// delegate conversion to scalar class
- virtual Paper_stream &operator <<(Scalar);
+ Paper_stream &operator <<(Scalar);
/// close the file
- virtual ~Paper_stream();
+ ~Paper_stream();
private:
Paper_stream (Paper_stream const&);
--- /dev/null
+/*
+ lily-guile.cc -- implement assorted guile functions
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1998 Jan Nieuwenhuizen <janneke@gnu.org>
+*/
+
+#include <stdio.h>
+#include "libc-extension.hh"
+#include "lily-guile.hh"
+#include "main.hh"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+SCM
+ly_append (SCM a, SCM b)
+{
+ return gh_call2 (gh_eval_str ("append"), a, b);
+}
+
+SCM
+ly_list1 (SCM a)
+{
+ return gh_call1 (gh_eval_str ("list"), a);
+}
+
+SCM
+ly_list2(SCM a, SCM b)
+{
+ return gh_call2 (gh_eval_str ("list"), a, b);
+}
+
+SCM
+ly_quote ()
+{
+ return gh_eval_str ("'quote");
+}
+
+SCM
+ly_eval (SCM a)
+{
+ return gh_call1 (gh_eval_str ("eval"), a);
+}
+
+SCM
+ly_lambda_o ()
+{
+ return gh_eval_str ("'(lambda (o))");
+}
+
+SCM
+ly_func_o (char const* name)
+{
+ char buf[200];
+ snprintf (buf, 200, "'(%s o)", name);
+ return gh_eval_str (buf);
+}
+
+#ifdef __cplusplus
+}
+#endif
+
+SCM
+lambda_scm (String str, Array<Scalar> args_arr)
+{
+ if (str.empty_b ())
+ {
+ str = "empty";
+ args_arr.clear ();
+ }
+ SCM args_scm = SCM_EOL;
+ for (int i = args_arr.size () - 1; i >= 0; i--)
+ args_scm = gh_cons (gh_str02scm (args_arr[i].ch_l ()), args_scm);
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o (str.ch_l ()), args_scm)));
+ return scm;
+}
+
+SCM
+lambda_scm (String str, Array<Real> args_arr)
+{
+ if (str.empty_b ())
+ {
+ str = "empty";
+ args_arr.clear ();
+ }
+ SCM args_scm = SCM_EOL;
+ for (int i = args_arr.size () - 1; i >= 0; i--)
+ args_scm = gh_cons (gh_double2scm (args_arr[i]), args_scm);
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o (str.ch_l ()), args_scm)));
+ return scm;
+}
+
#include "paper-def.hh"
#include "string-convert.hh"
#include "main.hh"
+#include "lily-guile.hh"
Lookup::Lookup ()
{
}
Atom
-Lookup::afm_find (String s, String str) const
+Lookup::afm_find (String s) const
{
if (!afm_p_)
{
a.dim_ = m.B_;
a.dim_[X_AXIS] *= 1 / 1000.0;
a.dim_[Y_AXIS] *= 1 / 1000.0;
- a.str_ = String_convert::form_str (str.ch_C (), m.code ());
+ Array<Real> arr;
+ arr.push (m.code ());
+ a.lambda_ = lambda_scm ("char", arr);
a.font_ = font_;
return a;
}
Atom
Lookup::bar (String str, Real h) const
{
- Array<String> a;
- a.push (print_dimen (h));
- Atom s = (*symtables_p_) ("bars")->lookup (str);
- s.str_ = substitute_args (s.str_, a);
- s.dim_.y () = Interval (-h/2, h/2);
- s.font_ = font_;
- return s;
-}
-
-String
-Lookup::base_output_str () const
-{
- assert (paper_l_);
- String str = paper_l_->get_default_output ();
-
- if (str.empty_b ())
- {
- str = default_outname_base_global;
- int def = paper_l_->get_next_default_count ();
- if (def)
- str += "-" + to_str (def);
- }
- return str;
+ Array<Real> arr;
+ arr.push (h);
+ Atom a = (*symtables_p_) ("bars")->lookup (str);
+ a.lambda_ = lambda_scm (a.str_, arr);
+ a.dim_.y () = Interval (-h/2, h/2);
+ a.font_ = font_;
+ return a;
}
Atom
return a;
}
-String
-Lookup::character_str (int i) const
+Atom
+Lookup::clef (String st) const
{
- return to_str (i);
+ return afm_find (String ("clefs") + String ("-") + st);
}
Atom
-Lookup::clef (String st) const
+Lookup::dashed_slur (Array<Offset> controls, Real thick, Real dash) const
{
- return afm_find (String ("clefs") + String ("-") + st);
+ assert (controls.size () == 8);
+
+ Real dx = controls[3].x () - controls[0].x ();
+ Real dy = controls[3].y () - controls[0].y ();
+
+ Atom a;
+ a.font_ = font_;
+ a.dim_[X_AXIS] = Interval (0, dx);
+ a.dim_[Y_AXIS] = Interval (0 <? dy, 0 >? dy);
+
+ // (lambda (o) (dashed-slur o '((0.1 0.2) (1.1 1.2) (2.1 2.2) (3.1 3.2))))
+ a.lambda_ =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("dashed-slur"),
+ gh_cons (gh_double2scm (thick), gh_cons (gh_double2scm (dash),
+ ly_list1 (ly_list2 (ly_quote (),
+ gh_cons (ly_list2 (gh_double2scm (controls[1].x ()), gh_double2scm (controls[1].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[2].x ()), gh_double2scm (controls[2].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[3].x ()), gh_double2scm (controls[3].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[0].x ()), gh_double2scm (controls[0].y ())),
+ SCM_EOL)))))))))));
+
+ return a;
}
Atom
#endif
}
-String
-Lookup::print_dimen (Real r) const
-{
- String s = to_str (r, "%.3f");
- if (s.index_i ("NaN") != -1)
- {
- warning (_ ("NaN"));
- s = "0.0";
- }
- return s;
-}
-
Atom
Lookup::rest (int j, bool o) const
{
Lookup::rule_symbol (Real height, Real width) const
{
Atom bs= (*symtables_p_) ("param")->lookup ("rule");
- Array<String> args;
- args.push (print_dimen (height));
- args.push (print_dimen (width));
- bs.str_ = substitute_args (bs.str_, args);
+ Array<Real> args;
+ args.push (height);
+ args.push (width);
+ bs.lambda_ = lambda_scm (bs.str_, args);
bs.dim_.x () = Interval (0, width);
bs.dim_.y () = Interval (0, height);
return bs;
Atom
Lookup::special_time_signature (String s, Array<Scalar> arr) const
{
+#if 0
String symbolname = "timesig-"+s+"%/%";
- Atom a (afm_find (substitute_args (symbolname, arr)));
+ Atom a (afm_find (lambda_scm (symbolname, arr)));
if (!a.empty ())
return a;
// Try if the full name was given
if (!a.empty ())
return a;
// Resort to default layout with numbers
+#endif
return time_signature (arr);
}
-static void
-substitute_arg (String& r, String arg)
-{
- int p = r.index_i ('%');
- if (p < 0)
- return ;
-
- r = r.left_str (p) + arg + r.right_str (r.length_i () - p - 1);
-}
-
-String
-Lookup::substitute_args (String source, Array<String> args) const
-{
- String str (source);
- for (int i = 0 ; i < args.size (); i++)
- substitute_arg (str, args[i]);
- return str;
-}
-
-String
-Lookup::substitute_args (String source, Array<Scalar> args) const
-{
- Array<String> sv;
- for (int i = 0 ; i < args.size (); i++)
- sv.push (args[i]);
- return substitute_args (source, sv);
-}
-
Atom
-Lookup::stem (Real y1, Real y2, String str) const
+Lookup::stem (Real y1, Real y2) const
{
if (y1 > y2)
{
s.dim_.x () = Interval (0,0);
s.dim_.y () = Interval (y1,y2);
- Array<String> a;
+ Array<Real> a;
Real stem_width = paper_l_->get_var ("stemthickness");
- a.push (print_dimen (-stem_width /2));
- a.push (print_dimen (stem_width));
- a.push (print_dimen (y2));
- a.push (print_dimen (-y1));
+ a.push (-stem_width /2);
+ a.push (stem_width);
+ a.push (y2);
+ a.push (-y1);
- s.str_ = substitute_args (str, a);
+ s.lambda_ = lambda_scm ("stem", a);
s.font_ = font_;
return s;
}
Atom
Lookup::text (String style, String text) const
{
- Array<String> a;
+ Array<Scalar> a;
a.push (text);
Atom s = (*symtables_p_) ("style")->lookup (style);
- s.str_ = substitute_args (s.str_,a);
+ s.lambda_ = lambda_scm (s.str_, a);
s.font_ = font_;
return s;
Lookup::time_signature (Array<Scalar> a) const
{
Atom s ((*symtables_p_) ("param")->lookup ("time_signature"));
- s.str_ = substitute_args (s.str_, a);
+ s.lambda_ = lambda_scm (s.str_, a);
return s;
}
int idx = int (rint ( (y- min_y)/step)) + 1;
- {
- Array<String> a;
- a.push (character_str (idx));
- brace.str_ = substitute_args (brace.str_,a);
- brace.dim_[Y_AXIS] = Interval (-y/2,y/2);
- }
+ Array<Real> a;
+ a.push (idx);
+ brace.lambda_ = lambda_scm (brace.str_, a);
+ brace.dim_[Y_AXIS] = Interval (-y/2,y/2);
brace.font_ = font_;
return brace;
}
+Atom
+Lookup::hairpin (Real width, bool decresc, bool continued) const
+{
+ Atom a;
+ Real height = paper_l_->staffheight_f () / 6;
+ String ps;
+ ps += to_str (width) + " "
+ + to_str (height) + " "
+ + to_str (continued ? height/2 : 0) +
+ + " draw_" + String (decresc ? "de" : "") + "cresc\n";
+ a.str_ = ps;
+
+
+ a.dim_.x () = Interval (0, width);
+ a.dim_.y () = Interval (-2*height, 2*height);
+ a.font_ = font_;
+ return a;
+}
+
+Atom
+Lookup::plet (Real dy , Real dx, Direction dir) const
+{
+ String ps;
+
+
+ ps += String_convert::double_str (dx) + " "
+ + String_convert::double_str (dy) + " "
+ + String_convert::int_str ( (int)dir) +
+ " draw_plet ";
+
+ Atom s;
+ s.str_ = ps;
+ return s;
+}
+
+Atom
+Lookup::ps_beam (Real slope, Real width, Real thick) const
+{
+ String ps;
+ ps += to_str (width) + " "+ to_str (slope) + " " + to_str (thick)
+ + " draw_beam ";
+
+ Atom s;
+ s.str_ = ps;
+ return s;
+}
+
+Atom
+Lookup::slur (Array<Offset> controls) const
+{
+ assert (controls.size () == 8);
+
+ String ps;
+
+ Real dx = controls[3].x () - controls[0].x ();
+ Real dy = controls[3].y () - controls[0].y ();
+ Atom a;
+
+ // (lambda (o) (slur o '((0.1 0.2) (1.1 1.2) (2.1 2.2) (3.1 3.2) .. )))
+ a.lambda_ =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("slur"),
+ ly_list1 (ly_list2 (ly_quote (),
+ gh_cons (ly_list2 (gh_double2scm (controls[5].x ()), gh_double2scm (controls[5].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[6].x ()), gh_double2scm (controls[6].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[7].x ()), gh_double2scm (controls[7].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[4].x ()), gh_double2scm (controls[4].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[1].x ()), gh_double2scm (controls[1].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[2].x ()), gh_double2scm (controls[2].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[3].x ()), gh_double2scm (controls[3].y ())),
+ gh_cons (ly_list2 (gh_double2scm (controls[0].x ()), gh_double2scm (controls[0].y ())),
+ SCM_EOL)))))))))))));
+
+ a.dim_[X_AXIS] = Interval (0, dx);
+ a.dim_[Y_AXIS] = Interval (0 <? dy, 0 >? dy);
+ a.font_ = font_;
+ return a;
+}
+
+Atom
+Lookup::vbracket (Real &y) const
+{
+ Atom a;
+ Real min_y = paper_l_->staffheight_f ();
+ if (y < min_y)
+ {
+ warning (_ ("bracket")
+ + " " + _ ("too small") + " (" + print_dimen (y) + ")");
+// y = min_y;
+ }
+ Array<Real> arr;
+ arr.push (y);
+ a.lambda_ = lambda_scm ("bracket", arr);
+ a.dim_[Y_AXIS] = Interval (-y/2,y/2);
+ a.dim_[X_AXIS] = Interval (0,4 PT);
+ return a;
+}
+
#include <iostream.h>
#include <assert.h>
#include <locale.h>
+#include "lily-guile.hh"
+
#include "proto.hh"
#include "dimensions.hh"
#include "plist.hh"
#include "config.hh"
#include "file-results.hh"
#include "debug.hh"
-#include "ps-lookup.hh"
-#include "tex-lookup.hh"
#include "lily-guile.hh"
#if HAVE_GETTEXT
bool no_paper_global_b = false;
bool no_timestamps_global_b = false;
bool find_quarts_global_b = false;
+
+char const* output_global_ch = "tex";
+// temporarily default to ps, because tex is even more broken
+//char const* output_global_ch = "ps";
+
String default_outname_base_global = "lelie";
int default_count_global;
File_path global_path;
-Ps_lookup ps_lookup;
-Tex_lookup tex_lookup;
-Lookup* global_lookup_l = &tex_lookup;
-
bool experimental_features_global_b = false;
bool dependency_global_b = false;
{0, "no-timestamps", 'T'},
{0, "find-fourths", 'Q'},
{0, "ignore-version", 'V'},
+ {1, "output-format", 'f'},
{0,0,0}
};
" -d, --dependencies write Makefile dependencies for every input file\n"
);
cout << _ (
- " -I, --include=DIR add DIR to search path\n"
+ " -h, --help this help\n"
);
cout << _ (
- " -i, --init=FILE use FILE as init file\n"
+ " -f, --output-format=X use output format X\n"
);
cout << _ (
- " -h, --help this help\n"
+ " -I, --include=DIR add DIR to search path\n"
+ );
+ cout << _ (
+ " -i, --init=FILE use FILE as init file\n"
);
cout << _ (
" -M, --no-paper produce midi output only\n"
*mlog << get_version_str () << endl;
}
-void
-guile_init ()
-{
-#ifdef HAVE_LIBGUILE
- gh_eval_str ("(define (add-column p) (display \"adding column (in guile): \") (display p) (newline))");
-#endif
-}
-
-
void
setup_paths ()
{
}
-
-int
+void
main_prog (int argc, char **argv)
{
- guile_init ();
identify ();
call_constructors ();
debug_init (); // should be first
{
case 't':
experimental_features_global_b = true;
- global_lookup_l = &ps_lookup;
+ *mlog << "*** enabling experimental features, you're on your own now ***\n";
break;
case 'o':
outname_str = oparser.optional_argument_ch_C_;
notice ();
exit (0);
break;
+ case 'f':
+ output_global_ch = oparser.optional_argument_ch_C_;
+ break;
case 'Q':
find_quarts_global_b = true;
break;
default_outname_base_global = outname_str;
do_one_file (i, default_outname_base_global);
}
+}
+int
+main (int argc, char **argv)
+{
+#ifdef HAVE_LIBGUILE
+ gh_enter (argc, argv, (void(*)())main_prog);
return exit_status_i_;
+#else
+ main_prog (argc, argv);
+ return exit_status_i_;
+#endif
}
/*
return str;
}
-
-#ifdef HAVE_LIBGUILE
-int
-main (int argc, char **argv)
-{
- gh_enter (argc, argv, (void(*)())main_prog);
- return exit_status_i_;
-}
-
-#else
-int main (int argc, char **argv)
-{
- return main_prog (argc, argv);
-}
-
-#endif
{"pt", PT_T},
{"relative", RELATIVE},
{"remove", REMOVE},
+ {"scm", SCHEME},
{"score", SCORE},
{"script", SCRIPT},
{"shape", SHAPE},
#include "paper-def.hh"
#include "debug.hh"
#include "lookup.hh"
-#include "ps-lookup.hh"
-#include "tex-lookup.hh"
#include "assoc-iter.hh"
#include "score-engraver.hh"
#include "p-score.hh"
#include "main.hh"
#include "scope.hh"
#include "dictionary-iter.hh"
+#include "file-results.hh" // urg? header_global_p
+#include "paper-outputter.hh"
+#include "paper-stream.hh"
Paper_def::Paper_def ()
{
lookup_p_assoc_p_ = new Assoc<int, Lookup*>;
for (Assoc_iter<int, Lookup*> ai(*s.lookup_p_assoc_p_); ai.ok (); ai++)
{
- Lookup * l = global_lookup_l->lookup_p (*ai.val ());
+ Lookup * l = new Lookup (*ai.val ());
l->paper_l_ = this;
set_lookup (ai.key(), l);
}
IMPLEMENT_IS_TYPE_B1 (Paper_def, Music_output_def);
-String
-Paper_def::ps_output_settings_str () const
+int Paper_def::default_count_i_ = 0;
+
+int
+Paper_def::get_next_default_count () const
{
- String s ("\n ");
- for (Dictionary_iter<Identifier*> i (*scope_p_); i.ok (); i++)
- s += String ("/mudelapaper") + i.key ()
- + "{" + i.val ()->str () + "} bind def\n";
- s += *scope_p_->elem ("pssetting")->access_String ();
- return s;
+ return default_count_i_ ++;
}
-String
-Paper_def::tex_output_settings_str () const
+//urg
+extern char const* lily_version_number_sz ();
+
+void
+output_def (Paper_outputter* p, String key, String val)
+{
+ SCM args_scm =
+ gh_cons (gh_str02scm (key.ch_l ()), gh_cons (gh_str02scm (val.ch_l ()), SCM_EOL));
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("lily-def"), args_scm)));
+ p->output_scheme (scm);
+}
+
+void
+output_header (Paper_outputter* p, Scope *head)
+{
+ if (!head)
+ return;
+
+ String id_str = "Lily was here";
+ if (no_timestamps_global_b)
+ id_str += ".";
+ else
+ id_str += String (", ") + lily_version_number_sz ();
+ output_def (p, "lily_id_string", id_str);
+
+ for (Dictionary_iter<Identifier*> i (*head); i.ok (); i++)
+ {
+ if (!i.val ()->access_String_identifier ())
+ continue;
+
+ String val = *i.val()->access_String_identifier ()->data_p_;
+ output_def (p, i.key (), val);
+ }
+}
+
+void
+Paper_def::output_settings (Paper_outputter* p) const
{
- String s ("\n ");
for (Dictionary_iter<Identifier*> i (*scope_p_); i.ok (); i++)
- s += String ("\\def\\mudelapaper") + i.key ()
- + "{" + i.val ()->str () + "}\n";
- s += *scope_p_->elem ("texsetting")->access_String ();
- return s;
+ output_def (p, String ("mudelapaper") + i.key (), i.val ()->str ());
+ p->output_string (*scope_p_->elem (String (output_global_ch) + "setting")->access_String ());
}
-int Paper_def::default_count_i_ = 0;
+Paper_outputter*
+Paper_def::paper_outputter_p (Paper_stream* os_p, Header* header_l, String origin_str) const
+{
+ Paper_outputter* p = new Paper_outputter (os_p);
-int
-Paper_def::get_next_default_count () const
+ output_header (p, header_global_p);
+ p->output_comment (_ ("outputting Score, defined at: "));
+ p->output_comment (origin_str);
+
+ output_header (p, header_l);
+
+ output_settings (p);
+
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("experimental-on"), SCM_EOL)));
+
+ p->output_scheme (scm);
+
+ scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("header-end"), SCM_EOL)));
+
+ p->output_scheme (scm);
+
+ return p;
+}
+
+Paper_stream*
+Paper_def::paper_stream_p () const
{
- return default_count_i_ ++;
+ String outname = base_output_str ();
+
+ if (outname != "-")
+ outname += String (".") + output_global_ch;
+ *mlog << _f ("Paper output to %s...",
+ outname == "-" ? String ("<stdout>") : outname ) << endl;
+ target_str_global_array.push (outname);
+ return new Paper_stream (outname);
}
+String
+Paper_def::base_output_str () const
+{
+ String str = get_default_output ();
+
+ if (str.empty_b ())
+ {
+ str = default_outname_base_global;
+ int def = get_next_default_count ();
+ if (def)
+ str += "-" + to_str (def);
+ }
+ return str;
+}
Jan Nieuwenhuizen <janneke@gnu.org>
*/
+#include <time.h>
#include "paper-outputter.hh"
#include "paper-stream.hh"
#include "molecule.hh"
Paper_outputter::Paper_outputter (Paper_stream *s)
{
outstream_l_ = s;
+ output_header ();
}
Paper_outputter::~Paper_outputter ()
{
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("end-output"), SCM_EOL)));
+
+ output_scheme (scm);
}
void
-Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm, String s)
+Paper_outputter::output_header ()
+{
+ String creator;
+ if (no_timestamps_global_b)
+ creator = "GNU LilyPond\n";
+ else
+ creator = get_version_str ();
+ String generate;
+ if (no_timestamps_global_b)
+ generate = ".";
+ else
+ {
+ generate = _ (", at ");
+ time_t t (time (0));
+ generate += ctime (&t);
+ //urg
+ }
+
+ SCM args_scm =
+ gh_cons (gh_str02scm (creator.ch_l ()),
+ gh_cons (gh_str02scm (generate.ch_l ()), SCM_EOL));
+
+#ifndef NPRINT
+ DOUT << "output_header\n";
+ if (check_debug && !monitor->silent_b ("Guile"))
+ {
+ gh_display (args_scm); gh_newline ();
+ }
+#endif
+
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("header"), args_scm)));
+
+ output_scheme (scm);
+}
+
+void
+Paper_outputter::output_molecule (Molecule const*m, Offset o, char const *nm)
{
if (check_debug)
*outstream_l_ << String ("\n%start: ") << nm << "\n";
Offset a_off = i->offset ();
a_off += o;
+ if (!i->lambda_)
+ {
+ // urg
+ i->lambda_ =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_func_o ("empty")));
+ }
+
switch_to_font (i->font_);
- Array<String> a;
- String r;
-
- a.push (global_lookup_l->print_dimen (a_off.y()));
- a.push (global_lookup_l->print_dimen (a_off.x()));
- a.push (i->str_);
- r += global_lookup_l->substitute_args (s, a);
- *outstream_l_ << r;
+#ifndef NPRINT
+ if (check_debug && !monitor->silent_b ("Guile"))
+ {
+ gh_display (i->lambda_); gh_newline ();
+ }
+#endif
+
+ SCM args_scm =
+ gh_cons (gh_double2scm (a_off.x ()),
+ gh_cons (gh_double2scm (a_off.y ()),
+ gh_cons (i->lambda_, SCM_EOL)));
+
+#ifndef NPRINT
+ if (check_debug && !monitor->silent_b ("Guile"))
+ {
+ gh_display (args_scm); gh_newline ();
+ }
+#endif
+
+ SCM box_scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("placebox"), args_scm)));
+
+ output_scheme (box_scm);
+ }
+}
+
+void
+Paper_outputter::output_comment (String str)
+{
+ // urg
+ *outstream_l_ << "% " << str << "\n";
+}
+
+
+void
+Paper_outputter::output_scheme (SCM scm)
+{
+ String o = String ("\'") + output_global_ch;
+#ifndef NPRINT
+ if (check_debug && !monitor->silent_b ("Guile"))
+ {
+ gh_display (scm); gh_newline ();
}
+#endif
+ SCM str_scm = gh_call1 (ly_eval (scm), gh_eval_str (o.ch_l ()));
+ char* c = gh_scm2newstr (str_scm, NULL);
+#ifndef NPRINT
+ if (check_debug && !monitor->silent_b ("Guile"))
+ {
+ gh_display (str_scm); gh_newline ();
+ }
+#endif
+ *outstream_l_ << c;
+ free (c);
+}
+
+void
+Paper_outputter::output_string (String str)
+{
+ // urg
+ *outstream_l_ << str;
+}
+
+void
+Paper_outputter::switch_to_font (String fontname)
+{
+ if (fontname.length_i () && (fontname != current_font_))
+ {
+ current_font_ = fontname;
+ int i=0;
+ bool new_b = false;
+ for (; i< font_arr_.size (); i++)
+ if (font_arr_[i] == fontname)
+ {
+ new_b = true;
+ break;
+ }
+
+ if (new_b)
+ {
+ font_arr_.push (fontname);
+ output_font_def (i, fontname);
+ }
+ output_font_switch (i);
+ }
+ return;
+}
+
+void
+Paper_outputter::start_line ()
+{
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("start-line"), SCM_EOL)));
+
+ output_scheme (scm);
+}
+
+/*
+ 26 fonts ought to be enough for anyone.
+*/
+void
+Paper_outputter::output_font_def (int i, String str)
+{
+ //urg, broken with guile-1.3
+ //return;
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("font-def"),
+ gh_cons (gh_int2scm (i), gh_cons (gh_str02scm (str.ch_l ()), SCM_EOL)))));
+
+ output_scheme (scm);
+}
+
+void
+Paper_outputter::output_font_switch (int i)
+{
+ //urg, broken with guile-1.2, 1.3
+ //return;
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("font-switch"),
+ gh_cons (gh_int2scm (i), SCM_EOL))));
+
+ output_scheme (scm);
+}
+
+void
+Paper_outputter::stop_line ()
+{
+ SCM scm =
+ ly_append (ly_lambda_o (),
+ ly_list1 (ly_append (ly_func_o ("stop-line"), SCM_EOL)));
+
+ output_scheme (scm);
+
+ current_font_ = "";
+ font_arr_.clear ();
}
*/
#include <fstream.h>
-#include <time.h>
#include "main.hh"
#include "paper-stream.hh"
nest_level = 0;
line_len_i_ = 0;
outputting_comment=false;
- // header ();
}
Paper_stream::~Paper_stream ()
break;
}
}
+ //urg, for debugging only!!
+ *os << flush;
return *this;
}
*/
#include <iostream.h>
+#include "lily-guile.hh"
#include "notename-table.hh"
#include "scalar.hh"
#include "translation-property.hh"
#include "script-def.hh"
#include "symtable.hh"
#include "lookup.hh"
-#include "ps-lookup.hh"
-#include "tex-lookup.hh"
#include "misc.hh"
#include "my-lily-lexer.hh"
#include "paper-def.hh"
#define yyerror THIS->parser_error
#define ARRAY_SIZE(a,s) if (a.size () != s) THIS->parser_error (_f("expecting %d arguments", s))
-
%}
%token PT_T
%token RELATIVE
%token REMOVE
+%token SCHEME /* token vs typedef; can't be named SCM */
%token SCORE
%token SCRIPT
%token SHAPE
Midi_def_identifier ($1, MIDI_IDENTIFIER);
THIS->lexer_p_->set_identifier ("$defaultmidi", id)
}
+ | embedded_scm {
+ }
;
+embedded_scm:
+ SCHEME STRING ';' {
+ #ifdef HAVE_LIBGUILE
+ gh_eval_str ($2->ch_l ());
+ #endif
+ delete $2;
+ };
+
check_version:
VERSION STRING ';' {
Mudela_version ver (*$2);
$$ = p;
}
| paper_def_body int '=' symtables { // ugh, what a syntax
- Lookup * l = global_lookup_l->lookup_p (*$4);
+ Lookup * l = new Lookup (*$4);
$$->set_lookup ($2, l);
}
| paper_def_body assignment ';' {
symboldef:
STRING unsigned box {
- $$ = global_lookup_l->atom_p (*$1, $2, *$3);
+ // ignore #args
+ $$ = new Atom (*$1, *$3);
delete $1;
delete $3;
}
| STRING unsigned {
Box b (Interval (0,0), Interval (0,0));
- $$ = global_lookup_l->atom_p (*$1, $2, b);
+ // ignore #args
+ $$ = new Atom (*$1, b);
delete $1;
}
;
#include "file-results.hh"
#include "my-lily-parser.hh"
#include "source.hh"
-#include "lookup.hh"
Sources* source_global_l = 0;
Array<String> inclusion_global_array;
parser.set_version_check (version_ignore_global_b);
parser.parse_file (init_str, file_str);
- /*
- urg
- when calling {Ps,Tex}_lookup::paper_stream_p (),
- it *appears* (aaargh, latest gdb on ppc is gdb 4.16.97)
- that (global_lookup_l's)
- paper_l_ is invalid but not NULL
- (deleted without being reset maybe?)
- */
- global_lookup_l->paper_l_ = parser.default_paper_p ();
-
if (parser.error_level_i_)
{
exit_status_i_ = 1;
#include "line-of-score.hh"
#include "p-score.hh"
#include "string.hh"
-#include "tex-outputter.hh"
+#include "paper-outputter.hh"
Super_element::Super_element()
outdir=out
endif
-stepdir = $(depth)/$(stepmake)/stepmake
+stepdir = $(stepmake)/stepmake
STEPMAKE_TEMPLATES := generic $(STEPMAKE_TEMPLATES)
LOCALSTEPMAKE_TEMPLATES:= generic $(LOCALSTEPMAKE_TEMPLATES)
depth = ..
-STEPMAKE_TEMPLATES=metafont metapost
+STEPMAKE_TEMPLATES=metafont metapost install install-out
-EXTRA_DIST_FILES += TODO README feta.mp mfmp.ini
+EXTRA_DIST_FILES += TODO README feta.mp mfplain.ini
FET_FILES = $(wildcard feta[0-9]*.mf)
OUT_DIST_FILES += $(AFM_FILES)
-include $(depth)/make/stepmake.make
-
-default: $(ALL_GEN_FILES)
-
-
-$(outdir)/%.afm $(outdir)/%.ly $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
- $(PYTHON) $(buildscripts)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --ly $(outdir)/$(<F:.log=.ly) --afm $(outdir)/$(<F:.log=.afm) --tex $(outdir)/$(<F:.log=.tex) $<
-
-
-
-TEXINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(datadir)/tex/ depth=.. INSTALLATION_OUT_FILES="$(TEXTABLES)" -f $(stepdir)/install-outfiles.sub.make $@
+#PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
+INSTALLATION_DIR=$(datadir)/mf/
+INSTALLATION_FILES=$(MF_FILES)
-AFMINSTALL=$(MAKE) depth=.. INSTALLATION_OUT_DIR=$(datadir)/afm/ INSTALLATION_OUT_FILES="$(AFM_FILES)" -f $(stepdir)/install-outfiles.sub.make $@
+INSTALLATION_OUT_DIR=$(datadir)/tex
+INSTALLATION_OUT_FILES=$(TEXTABLES)
-LYINSTALL=$(MAKE) depth=.. INSTALLATION_OUT_DIR=$(datadir)/ly/ INSTALLATION_OUT_FILES="$(LYTABLES)" -f $(stepdir)/install-outfiles.sub.make $@
+INSTALLATION_OUT_DIR1=$(datadir)/afm
+INSTALLATION_OUT_FILES1=$(AFM_FILES)
-localinstall: $(ALL_GEN_FILES)
- $(TEXINSTALL)
- $(LYINSTALL)
- $(AFMINSTALL)
+INSTALLATION_OUT_DIR2=$(datadir)/ly
+INSTALLATION_OUT_FILES2=$(LYTABLES)
-localuninstall:
- $(TEXINSTALL)
- $(LYINSTALL)
- $(AFMINSTALL)
+include $(depth)/make/stepmake.make
-INSTALLATION_DIR=$(datadir)/mf/
-INSTALLATION_FILES=$(MF_FILES)
+default: $(ALL_GEN_FILES)
-include $(stepdir)/installfiles.make
+$(outdir)/%.afm $(outdir)/%.ly $(outdir)/%.tex $(outdir)/%.dep: $(outdir)/%.log
+ $(PYTHON) $(buildscripts)/mf-to-table.py --package=$(topdir) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep) --ly $(outdir)/$(<F:.log=.ly) --afm $(outdir)/$(<F:.log=.afm) --tex $(outdir)/$(<F:.log=.tex) $<
%
% source file of the Feta (Font-En-Tja) pretty-but-neat music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+% (c) 1997, 1998 Han-Wen Nienhuys <hanwen@stack.nl>
% Jan Nieuwenhuizen <janneke@gnu.org>
%
% these macros help create ascii logging output
%
% source file of LilyPond's pretty-but-neat music font
%
-% (c) 1997 Jan Nieuwenhuizen <janneke@gnu.org>
+% (c) 1997, 1998 Jan Nieuwenhuizen <janneke@gnu.org>
%
mode_setup;
%
% source file of LilyPond's pretty-but-neat music font
%
-% (c) 1997 Jan Nieuwenhuizen <janneke@gnu.org>
+% (c) 1997, 1998 Jan Nieuwenhuizen <janneke@gnu.org>
% & Han-Wen Nienhuys <hanwen@stack.nl>
%
%
% source file of the Feta (Font-En-Tja) music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+% (c) 1997, 1998 Han-Wen Nienhuys <hanwen@stack.nl>
%
font_identifier:="feta-braces16";
%
% source file of the Feta (Font-En-Tja) music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+% (c) 1997, 1998 Han-Wen Nienhuys <hanwen@stack.nl>
%
font_identifier:="feta-braces20";
-% eindelijk.mf
-% LilyPond's own rest(s)
-
+% feta-eindelijk.mf -- implement rest symbols
+%
+% part of LilyPond's pretty-but-neat music font
+%
+% source file of the Feta (not the Font-En-Tja) music font
+%
+% (c) 1997, 1998 Jan Nieuwenhuizen <janneke@gnu.org>
fet_begingroup("rests");
% source file of the Feta (defintively not an abbreviation for Font-En-Tja)
% music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+% (c) 1997, 1998 Han-Wen Nienhuys <hanwen@stack.nl>
%
-%
% feta-klef.mf -- implement Clefs
%
-% source file of the Feta (Font-En-Tja) music font
+% part of LilyPond's pretty-but-neat music font
+%
+% source file of the Feta (not the Font-En-Tja) music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>,
+% (c) 1997, 1998 Han-Wen Nienhuys <hanwen@stack.nl>,
% Jan Nieuwenhuizen <janneke@gnu.org>
-
-
fet_begingroup("clefs");
%
-% feta-nummer.mf
+% feta-nummer.mf -- implement bold Orator numerals
+%
% part of LilyPond's pretty-but-neat music font
+%
+% source file of the Feta (not the Font-En-Tja) music font
+%
+% (c) 1997, 1998 Jan Nieuwenhuizen <janneke@gnu.org>
fet_begingroup("nummer")
code := 47;
% source file of the Feta (defintively not an abbreviation for Font-En-Tja)
% music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+% (c) 1997, 1998 Han-Wen Nienhuys <hanwen@stack.nl>
% Jan Nieuwenhuizen <janneke@gnu.org>
%
y_mirror_char;
fet_endchar;
+%
+% Thumbs are used in cello music.
+% TODO : thumbs should look like the finger-font and should be placed in
+% the same way in the score.
+%
+
+fet_beginchar("Thumb", "thumb", "thumb")
+ save thin, height, width, thick;
+ height# = 5/4 width#;
+ height# = interline#;
+ thin = 1.2 stafflinethickness;
+ thick = 1.4 thin;
+ set_char_box(width#/2, width#/2, height#/2, height#/2);
+
+ penpos1(thick, 0);
+ penpos2(thin, 90);
+ z1r = (w, 0);
+ z2r = (0, h);
+ penlabels(1,2);
+ penstroke z1e{up} .. {left}z2e;
+ addto currentpicture also currentpicture xscaled -1;
+ addto currentpicture also currentpicture yscaled -1;
+
+ pickup pencircle scaled thin;
+ save x,y;
+ z3r = (0, -h);
+ z4 = (0, -2h);
+ penlabels(3,4);
+ draw z3r -- z4;
+fet_endchar;
+
%
% FIXME: rounded endings
xy_mirror_char;
fet_endchar;
+
%
% used in french horn music todo
%
%
% source file of LilyPond's pretty-but-neat music font
%
-% (c) 1997 Jan Nieuwenhuizen <janneke@gnu.org>
+% (c) 1997, 1998 Jan Nieuwenhuizen <janneke@gnu.org>
% & Han-Wen Nienhuys <hanwen@stack.nl>
%
% see Documentation/fonts.tex
%
% source file of the Feta (Font-En-Tja) music font
%
-% (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+% (c) 1997, 1998 Han-Wen Nienhuys <hanwen@stack.nl>
%
--- /dev/null
+\input plain.mf
+\input modes.mf
+\dump mfplain
depth = ..
-
PS_FILES = $(wildcard *.ps)
+STEPMAKE_TEMPLATES=install
EXTRA_DIST_FILES = $(PS_FILES)
INSTALLATION_DIR=$(datadir)/ps/
INSTALLATION_FILES=$(PS_FILES)
include $(depth)/make/stepmake.make
-include $(stepdir)/installfiles.make
-
#!@PYTHON@
-
-# TODO: center option
-
+# All non-english comments are NOT in swedish, they are norwegian!
+
+# TODO: center option (??)
+# * clean up handling of filename of inputfile
+# * steal Props class from ly2dvi?
+# * \onecolumn, \twocolumn
+# * fontsize change with commandline parameters
+# * the verbatim option should not be visible in the created latex file
+# * what the h.. does castingalgorithm do/mean???
+# * compile all regular expressions
+# * the following fails because mudelabook doesn't care that the
+# last } after \end{mudela} finishes the marginpar:
+# \marginpar{
+# \begin{mudela}[fragment]
+# c d e f g
+# \end{mudela}}
+# * Command line parameter that force all inline mudela to be verbatim, and
+# one that forces all to be printed
# log:
# 0.3:
# rewrite in Python.
+# 0.4:
+# much rewritten by new author. I think the work has been split more
+# logical between different classes.
+#
import os
import string
import re
import getopt
import sys
+import regsub
-outdir = 'out/'
-program_version = '0.3'
-
-
+outdir = 'out'
+program_version = '0.4'
+default_paper_size_global = 'a4'
+default_mudela_fontsize = '16pt'
+force_mudela_fontsize_b = 0
+fontsize_i2a = {11:'eleven', 13:'thirteen', 16:'sixteen', 20:'twenty', 26:'twentysix'}
+fontsize_pt2i = {'11pt':11, '13pt':13, '16pt':16, '20pt':20, '26pt':26}
def file_exist_b(name):
try:
f.close ()
return 1
+def ps_dimention(fname):
+ fd = open(fname)
+ lines = fd.readlines()
+ reg = re.compile('%%BoundingBox: ([0-9]*) ([0-9]*) ([0-9]*) ([0-9]*)')
+ for line in lines:
+ s = reg.search(line)
+ if s:
+ break
+ return (int(s.groups()[2])-int(s.groups()[0]),
+ int(s.groups()[3])-int(s.groups()[1]))
+
+
class CompileStatus:
- pass
+ pass
def file_mtime (name):
return os.stat (name)[8] #mod time
-
-def compile (command, infile, outfile):
- indate = file_mtime (infile)
- try:
- outdate = file_mtime (outfile)
- recompile = indate > outdate
-
- except os.error:
- recompile = 1
-
- if recompile:
- sys.stderr.write ('invoking `%s\'\n' % command)
-
- status = os.system (command)
- if status:
- raise CompileStatus
+#
+# executes os.system(command) if infile is newer than
+# outfile or outfile don't exist
+#
+def compile (command, workingdir, infile, outfile):
+ indate = file_mtime (workingdir+infile)
+ try:
+ outdate = file_mtime (outfile)
+ recompile = indate > outdate
+
+ except os.error:
+ recompile = 1
+
+ if recompile:
+ sys.stderr.write ('invoking `%s\'\n' % command)
+ if workingdir == '':
+ status = os.system (command)
+ else:
+ status = os.system ('cd %s; %s' %(workingdir, command))
+ if status:
+ raise CompileStatus
+
+
+class PaperDef:
+ __onecolumn_linewidth = {
+ 'a4':{'10pt': 345, '11pt': 360, '12pt':390},
+ 'a5':{'10pt': 276, '11pt': 276, '12pt':276},
+ 'b5':{'10pt': 345, '11pt': 356, '12pt':356},
+ 'letter':{'10pt': 345, '11pt': 360, '12pt':390},
+ 'legal':{'10pt': 345, '11pt': 360, '12pt':390},
+ 'executive':{'10pt': 345, '11pt': 360, '12pt':379}
+ }
+ __twocolumn_linewidth = {
+ 'a4':{'10pt': 167, '11pt': 175, '12pt':190},
+ 'a5':{'10pt': 133, '11pt': 133, '12pt':133},
+ 'b5':{'10pt': 167, '11pt': 173, '12pt':173},
+ 'letter':{'10pt': 167, '11pt': 175, '12pt':190},
+ 'legal':{'10pt': 167, '11pt': 175, '12pt':190},
+ 'executive':{'10pt': 167, '11pt': 175, '12pt':184}
+ }
+ __numcolumn = 1
+ __fontsize = '11pt'
+ #
+ # init
+ #
+ def __init__(self):
+ self.__papersize = default_paper_size_global
+ def set_papersize (self, p):
+ if not self.__onecolumn_linewidth.has_key(p):
+ print "warning:unsupported papersize", p, \
+ "will use", default_paper_size_global
+ self.__papersize = default_paper_size_global
+ else:
+ self.__papersize = p
+ def set_fontsize(self, pt):
+ self.__fontsize = pt
+ def get_linewidth (self):
+ if self.__numcolumn == 1:
+ return self.__onecolumn_linewidth[self.__papersize][self.__fontsize]
+ else:
+ return self.__twocolumn_linewidth[self.__papersize][self.__fontsize]
+ def onecolumn (slef):
+ self.__numcolumn = 1
+ def twocolumn (self):
+ self.__numcolumn = 2
class Mudela_output:
- def __init__ (self):
- self.basename = ''
- self.fragment = 0
- self.size = 16
-
- def open (self, basename):
- self.basename = basename
- self.temp_file = "%s/%s" %(outdir, 'mudela-temp.ly')
- self.file = open (self.temp_file, 'w')
- self.file.write ('\\include \"paper%d.ly\"\n' % self.size)
- if self.size == 16:
- s = 'sixteen'
- else:
- s = 'twenty'
-
- self.file.write ('default_paper = \\paper { \\paper_%s\n linewidth = -15.\\cm; }\n' % s)
-
- if self.fragment:
- self.file.write ('\\score { \\notes { ')
-
- def write (self,s):
- self.file.write (s)
-
- def close (self):
- if self.fragment:
- self.file.write (
- '}\n \\paper { linewidth = -1.0\\cm;\n' +
- 'castingalgorithm = \\Wordwrap; } }\n')
-
-
- self.file.close ()
-
- inf=self.basename + '.ly'
- outf = self.basename + '.tex'
- if not file_exist_b (inf):
- status = 1
- else:
-# print 'invoking %s' %('diff %s %s' % (self.temp_file, inf))
- status = os.system ('diff -q %s %s' % (self.temp_file, inf))
-# print 'status %d' % status
-
- if status:
- os.rename (self.temp_file, inf)
-
- compile ('lilypond -o %s %s'% (self.basename, inf), inf, outf)
-# os.rename (self.basename + '.tex', outdir +)
-
-
+ def __init__ (self, basename):
+ self.basename = basename
+ # it's an integer!
+ self.feta_pt_size = fontsize_pt2i[default_mudela_fontsize]
+ self.temp_filename = "%s/%s" %(outdir, 'mudela-temp.ly')
+ self.file = open (self.temp_filename, 'w')
+ # 'tex' or 'eps'
+ self.graphic_type = 'tex'
+ self.fragment = 0
+ def write (self, line):
+ # match only if there is nothing but whitespace before \begin
+ if re.search('^\s*\\\\begin{mudela}', line):
+ self.scan_begin_statement(line)
+ self.write_red_tape()
+ else:
+ self.file.write (line)
+ def scan_begin_statement(self, line):
+ r = begin_mudela_opts_re.search(line)
+ if r:
+ o = r.group()[1:][:-1]
+ optlist = re.compile('[ ,]*').split(o)
+ else:
+ optlist = []
+ if 'floating' in optlist:
+ self.graphic_type = 'eps'
+ else:
+ self.graphic_type = 'tex'
+ if 'fragment' in optlist:
+ self.fragment = 1
+ else:
+ self.fragment = 0
+ for pt in fontsize_pt2i.keys():
+ if pt in optlist:
+ self.feta_pt_size = fontsize_pt2i[pt]
+ def write_red_tape(self):
+ self.file.write ('\\include \"paper%d.ly\"\n' % self.feta_pt_size)
+ s = fontsize_i2a[self.feta_pt_size]
+ if self.fragment:
+ self.file.write("default_paper = \\paper {"
+ + "\\paper_%s\n linewidth = -1.\\pt;" % s
+ + "castingalgorithm = \Wordwrap; indent = 2.\cm; \n}")
+ self.file.write("\\score{\n\\notes") #HACK
+ else:
+ self.file.write ("default_paper = \\paper {"
+ + "\\paper_%s\n linewidth = %i.\\pt;" % \
+ (s, Paper.get_linewidth()) \
+ + "castingalgorithm = \Wordwrap; indent = 2.\cm;\n}")
+ def close (self):
+ if self.fragment:
+ self.file.write ('\\paper { \\default_paper; } }\n')
+ self.file.close ()
+
+ inf = self.basename + '.ly'
+ outf = self.basename + '.tex'
+ if not file_exist_b (inf):
+ status = 1
+ else:
+ status = os.system ('diff -q %s %s' % (self.temp_filename, inf))
+
+ if status:
+ os.rename (self.temp_filename, inf)
+ compile ('lilypond -o %s %s;'% (self.basename, inf), '', inf, outf)
+ if self.graphic_type == 'eps':
+ bname = self.basename[string.rfind(self.basename, '/')+1:]
+ tex_name = bname+'.tex'
+ dvi_name = bname+'.dvi'
+ eps_name = bname+'.eps'
+ compile ('tex %s' % tex_name, outdir, tex_name, dvi_name)
+ compile ('dvips -E -o %s %s' % (eps_name, dvi_name), outdir, dvi_name, eps_name)
+ def insert_me_string(self):
+ "Returns a string that can be used directly in latex."
+ if self.graphic_type == 'tex':
+ return '\\preMudelaExample\\input %s\n\postMudelaExample\n' % self.basename
+ elif self.graphic_type == 'eps':
+ ps_dim = ps_dimention('%s.eps' % self.basename)
+ return '\\parbox{%ipt}{\includegraphics{%s.eps}}' % (ps_dim[0], self.basename)
+ else:
+ print "Unsupported graphic type '%s'" % self.graphic_type
+ sys.exit(1)
class Tex_output:
- def __init__ (self, name):
- self.output_fn = '%s/%s' % (outdir, name)
- self.mudela = 0
- self.file = open (self.output_fn , 'w')
- self.verbatim = 0
- def open_mudela (self, basename):
- self.mudela_basename =basename
- if self.verbatim:
- self.file.write ('\\begin{verbatim}\n')
- self.mudela = 1
-
- def write (self, s):
- self.file.write (s)
-
- def write_mudela (self, s):
- if self.verbatim:
- self.file.write (s)
-
- def close_mudela (self):
- if self.verbatim:
- self.file.write ('\\end{verbatim}\n')
- self.verbatim = 0
-
- self.file.write (
- '\\preMudelaExample\\input %s\n\postMudelaExample' %(self.mudela_basename))
- self.mudela = 0
-
-
-
-
+ def __init__ (self, name):
+ self.output_fn = '%s/%s' % (outdir, name)
+ self.file = open (self.output_fn , 'w')
+ def open_mudela (self, basename):
+ self.mudela_basename = basename
+ def open_verbatim (self):
+ self.file.write ('\\begin{verbatim}\n')
+ def close_verbatim (self):
+ self.file.write ('\\end{verbatim}\n')
+ def write (self, s):
+ self.file.write (s)
begin_mudela_re = re.compile ('^ *\\\\begin{mudela}')
-begin_mudela_opts_re = re.compile ('^ *\\\\begin{mudela}\[(.*)\]')
+begin_mudela_opts_re = re.compile('\[[^\]]*\]')
end_mudela_re = re.compile ('^ *\\\\end{mudela}')
section_re = re.compile ('\\\\section')
chapter_re = re.compile ('\\\\chapter')
-input_re = re.compile ('^\\\\input[ \t\n]+(.*)$')
+input_re = re.compile ('^\\\\input{([^}]*)')
+include_re = re.compile ('^\\\\include{([^}]*)')
+begin_document_re = re.compile ('^ *\\\\begin{document}')
+documentclass_re = re.compile('\\\\documentclass')
+twocolumn_re = re.compile('\\\\twocolumn')
+onecolumn_re = re.compile('\\\\onecolumn')
class Tex_input:
- def __init__ (self,name):
- if not re.search ('\\.[^/\\\\]+',name):
- name = name + '.tex'
- print 'opening %s' % name
- self.filename = name
- self.infile = open (name)
+ def __init__ (self,name):
+ # HACK
+ if (name[-4:] != '.tex') and (name[-4:] != '.doc'):
+ name = name + '.tex'
+ self.filename = name
+ self.infile = open (name)
- def get_lines (self):
- lines = self.infile.readlines ()
- (retlines, retdeps) = ([],[self.filename])
- for line in lines:
- m = input_re.search (line)
- if m:
- t = Tex_input (m.group (1))
- ls =t.get_lines ()
- retlines = retlines + ls[0]
- retdeps = retdeps + ls[1]
- else:
- retlines.append (line)
-
- return (retlines, retdeps)
+ def get_lines (self):
+ lines = self.infile.readlines ()
+ (retlines, retdeps) = ([],[self.filename])
+ for line in lines:
+ r = input_re.search (line)
+ ri = include_re.search (line)
+ if r:
+ t = Tex_input (r.groups()[0])
+ ls =t.get_lines ()
+ retlines = retlines + ls[0]
+ retdeps = retdeps + ls[1]
+ elif ri:
+ t = Tex_input (ri.groups()[0])
+ ls =t.get_lines ()
+ ls[0].insert(0, '\\newpage')
+ ls[0].append('\\newpage')
+ retlines = retlines + ls[0]
+ retdeps = retdeps + ls[1]
+ else:
+ retlines.append (line)
+ return (retlines, retdeps)
+
class Main_tex_input(Tex_input):
- def __init__ (self, name, outname):
+ def __init__ (self, name, outname):
- Tex_input.__init__ (self, name) # ugh
-
- self.outname = outname
- self.chapter = 0
- self.section = 0
- self.fine_count =0
- self.mudtex = Tex_output (self.outname)
- self.mudela = None
- self.deps = []
- def set_sections (self, l):
- if section_re.search (l):
- self.section = self.section + 1
- if chapter_re.search (l):
- self.section = 0
- self.chapter = self.chapter + 1
-
-
- def gulp_mudela (self):
- pass
-
- def gen_basename (self):
- return '%s/%s-%d.%d.%d' % (outdir, self.outname,self.chapter,self.section,self.fine_count)
-
- def do_it(self):
- (lines, self.deps) = self.get_lines ()
- for line in lines:
- if begin_mudela_re.search (line):
- m =begin_mudela_opts_re.search (line)
- if m:
- opts = m.group (1)
- else:
- opts = ''
- optlist = string.split (opts, ',')
- self.mudela = Mudela_output ()
- if 'fragment' in optlist:
- self.mudela.fragment = 1
- if '16pt' in optlist:
- self.mudela.size = 16
- if '20pt' in optlist:
- self.mudela.size = 20
-
- if 'verbatim' in optlist:
- self.mudtex.verbatim = 1
-
- b = self.gen_basename ()
- self.mudtex.open_mudela (b)
- self.mudela.open (b)
-
-
- continue
- elif end_mudela_re.search (line):
- self.mudela.close ()
- self.mudtex.close_mudela ()
- self.mudela = None
- self.fine_count = self.fine_count + 1
- continue
-
- if self.mudela:
- self.mudela.write (line)
- self.mudtex.write_mudela (line)
- else:
- self.mudtex.write (line)
- self.set_sections(line)
- del self.mudtex
+ Tex_input.__init__ (self, name) # ugh
+
+ self.outname = outname
+ self.chapter = 0
+ self.section = 0
+ self.fine_count =0
+ self.mudtex = Tex_output (self.outname)
+ self.mudela = None
+ self.deps = []
+ self.verbatim = 0
+ # set to 'mudela' when we are processing mudela code,
+ # both verbatim and graphic-to-be
+ self.mode = 'latex'
+ def set_sections (self, l):
+ if section_re.search (l):
+ self.section = self.section + 1
+ if chapter_re.search (l):
+ self.section = 0
+ self.chapter = self.chapter + 1
+
+ def gen_basename (self):
+ return '%s/%s-%d.%d.%d' % (outdir, self.outname,self.chapter,self.section,self.fine_count)
+
+ def extract_papersize_from_documentclass(self, line):
+ pre = re.search('\\\\documentclass[\[, ]*(\w*)paper[\w ,]*\]\{\w*\}', line)
+ if not pre:
+ return default_paper_size_global
+ return pre.groups()[0]
+ def extract_fontsize_from_documentclass(self, line):
+ if re.search('\\\\documentclass\[[^\]]*\]\{[^\}]*\}', line):
+ r = re.search('[ ,\[]*([0-9]*pt)', line)
+ if r:
+ return r.groups()[0]
+ return '10pt'
+ def do_it(self):
+ (lines, self.deps) = self.get_lines ()
+ for line in lines:
+ if documentclass_re.search (line):
+ Paper.set_papersize (self.extract_papersize_from_documentclass (line) )
+ Paper.set_fontsize (self.extract_fontsize_from_documentclass (line) )
+ elif twocolumn_re.search (line):
+ Paper.twocolumn ()
+ elif onecolumn_re.search (line):
+ Paper.onecolumn ()
+ elif begin_document_re.search (line):
+ self.mudtex.write ('\\def\\preMudelaExample{}\n')
+ self.mudtex.write ('\\def\\postMudelaExample{}\n')
+ elif begin_mudela_re.search (line):
+ if __debug__:
+ if self.mode == 'mudela':
+ raise AssertionError
+ self.mode = 'mudela'
+ r = begin_mudela_opts_re.search (line)
+ if r:
+ o = r.group()[1:][:-1]
+ optlist = re.compile('[ ,]*').split(o)
+ else:
+ optlist = []
+ if 'verbatim' in optlist:
+ self.verbatim = 1
+ self.mudtex.open_verbatim ()
+ else:
+ self.verbatim = 0
+ self.mudela = Mudela_output (self.gen_basename ())
+
+ elif end_mudela_re.search (line):
+ if __debug__:
+ if self.mode != 'mudela':
+ raise AssertionError
+ if self.mudela:
+ self.mudela.close ()
+ self.mudtex.write (self.mudela.insert_me_string())
+ del self.mudela
+ self.mudela = None
+ self.fine_count = self.fine_count + 1
+ else:
+ self.mudtex.write (line)
+ self.mudtex.close_verbatim ()
+ self.mode = 'latex'
+ continue
+
+ if self.mode == 'mudela' and not self.verbatim:
+ self.mudela.write (line)
+ else:
+ self.mudtex.write (line)
+ self.set_sections(line)
+ del self.mudtex
def help():
+ "Generate hybrid LaTeX input from Latex + mudela"
+ "Options:\n"
+ " -h, --help print this help\n"
- + " -d, --outdir=DIR prefix directory\n"
+ + " -d, --outdir=DIR directory to put generated files\n"
+ " -o, --outname=FILE prefix for filenames\n"
+ + " --mudela-fontsize=??pt default fontsize when no parameter for \\begin{mudela}\n"
+ + " --force-mudela-fontsize=??pt force fontsize for all inline mudela\n"
)
sys.exit (0)
-
-sys.stderr.write ('This is %s version %s\n' % ('mudela-book', program_version))
-
-outname = ''
-(options, files) = getopt.getopt(
- sys.argv[1:], 'hd:o:', [ 'outdir=', 'outname=', 'help', 'dependencies'])
-
-do_deps = 0
-for opt in options:
- o = opt[0]
- a = opt[1]
- if o == '--outname' or o == '-o':
- outname = a
- if o == '--outdir' or o == '-d':
- outdir = a
- if o == '--help' or o == '-h':
- help ()
- if o == '--dependencies':
- do_deps = 1
-
def write_deps (fn, out, deps):
out_fn = outdir + '/' + fn
print '\`writing \`%s\'\n\'' % out_fn
reduce (lambda x,y: x + ' '+ y, deps)))
f.close ()
-
-for f in files:
- my_outname = outname
- if not my_outname:
- my_outname = regsub.sub ('\\(.*\\)\\.doc', '\\1', f)
-
- my_depname = my_outname + '.dep'
-
- inp = Main_tex_input (f, my_outname)
- inp.do_it ()
-
- if do_deps:
+def identify():
+ sys.stderr.write('*** Lokal versjon av mudela-book ***\n')
+ sys.stderr.write ('This is %s version %s\n' % ('mudela-book', program_version))
+
+def main():
+ global default_mudela_fontsize, outdir
+ outname = ''
+ try:
+ (options, files) = getopt.getopt(
+ sys.argv[1:], 'hd:o:', ['outdir=', 'outname=', 'mudela-fontsize=',
+ 'force-mudela-fontsize=', 'help', 'dependencies'])
+ except getopt.error, msg:
+ print "error:", msg
+ sys.exit(1)
+
+ do_deps = 0
+ for opt in options:
+ o = opt[0]
+ a = opt[1]
+ if o == '--outname' or o == '-o':
+ outname = a
+ if o == '--outdir' or o == '-d':
+ outdir = a
+ if o == '--help' or o == '-h':
+ help ()
+ if o == '--dependencies':
+ do_deps = 1
+ if o == '--mudela-fontsize':
+ default_mudela_fontsize = a
+ if o == '--force-mudela-fontsize':
+ default_mudela_fontsize = a
+ force_mudela_fontsize_b = 1
+
+ if outdir[-1:] != '/':
+ outdir = outdir + '/'
+
+ if not file_exist_b(outdir):
+ os.system('mkdir %s' % outdir)
+
+ if not fontsize_pt2i.has_key(default_mudela_fontsize):
+ print "warning: fontsize %s is not supported using 16pt" % default_mudela_fontsize
+ default_mudela_fontsize = '16pt'
+
+ for f in files:
+ my_outname = outname
+ if not my_outname:
+ my_outname = regsub.sub ('\\(.*\\)\\.doc', '\\1', f)
+
+ my_depname = my_outname + '.dep'
+
+ inp = Main_tex_input (f, my_outname)
+ inp.do_it ()
+
+ if do_deps:
write_deps (my_depname, my_outname, inp.deps)
+
+identify()
+Paper = PaperDef()
+main()
OUTTXT_FILES = $(OUTYO_FILES:.yo=.txt) $(OUTIN_FILES:.yo=.txt)
EXTRA_DIST_FILES =
-SUBDIRS=topdocs
+OUT_DIST_FILES=$(OUTTXT_FILES)
+SUBDIRS=topdocs
-STEPMAKE_TEMPLATES=documentation
+STEPMAKE_TEMPLATES=documentation install install-out
include $(depth)/make/stepmake.make
doc: do-doc
+INSTALLATION_DIR=$(datadir)/Documentation
+INSTALLATION_FILES=$(DIST_FILES)
+
+INSTALLATION_OUT_DIR=$(datadir)/Documentation/out
+INSTALLATION_OUT_FILES=$(OUTTXT_FILES)
+
at-dir = $(doc-dir)/
at-ext = .in
BLURBS=BLURB COPERTINA FLAPTEKST
+OUT_DIST_FILES=$(OUTTXT_FILES)
-STEPMAKE_TEMPLATES=documentation yolily-topdoc
+STEPMAKE_TEMPLATES=documentation yolily-topdoc install install-out
include $(depth)/make/stepmake.make
+INSTALLATION_DIR=$(datadir)/Documentation/topdocs
+INSTALLATION_FILES=$(DIST_FILES)
+POST_INSTALL=-mkdir $(INSTALLATION_DIR)/out
+
+INSTALLATION_OUT_DIR=$(datadir)/Documentation/topdocs/out
+INSTALLATION_OUT_FILES=$(OUTTXT_FILES)
+
+pl 59
+ - bf: package-diff (remove missing automatic)
+ - install templates, (urg) INSTALL*1,2 INSTALL_OUT*1,2
+
+pl 58
+ - distribute formatted txt files: no yodl needed for operation!
+ - guile 1.2 and 1.3 support
+
+pl 57
+ - yodl first build script fixes
+ - uninstall fixes, but, urg, still have to uninstall twice
+ to get rid of all subdirs
+ - installed stepmake
+ * install not required
+ * only installs on explicit make install from toplevel stepdir
+ * rather urg, 'make dist' needs absolute distdir!
+
pl 56
- crude metapost stuff
PACKAGE_NAME=StepMake
MAJOR_VERSION=0
MINOR_VERSION=1
-PATCH_LEVEL=56
+PATCH_LEVEL=59
MY_PATCH_LEVEL=
# use the above to send patches, always empty for released version:
fi
])
+AC_DEFUN(AC_STEPMAKE_GUILE, [
+ # urg, must check for different functions in libguile
+ # to force new check iso reading from cache
+ AC_CHECK_LIB(guile, scm_shell, \
+ LIBS="-lguile $LIBS" AC_DEFINE(HAVE_LIBGUILE), \
+ AC_CHECK_LIB(readline, readline) \
+ AC_CHECK_LIB(dl, dlopen) \
+ AC_CHECK_LIB(guile, scm_boot_guile))
+])
+
AC_DEFUN(AC_STEPMAKE_INIT, [
. $srcdir/VERSION
package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
changequote([, ])dnl
+ # No versioning on directory names of sub-packages
+ # urg, urg
+ stepmake=${datadir}/stepmake
+ presome=${prefix}
+ if test "$prefix" = "NONE"; then
+ presome=${ac_default_prefix}
+ fi
+ stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
+
if test "x$PACKAGE" = "xSTEPMAKE"; then
echo Stepmake package!
(cd stepmake; rm -f stepmake; ln -s ../stepmake .)
(cd stepmake; rm -f bin; ln -s ../bin .)
AC_CONFIG_AUX_DIR(bin)
+ stepmake=stepmake
else
echo Package: $PACKAGE
- AC_CONFIG_AUX_DIR(stepmake/bin)
+ # Check for installed stepmake
+ if test -d $stepmake; then
+ echo Using installed stepmake: $stepmake
+ else
+ stepmake='$(depth)'/stepmake
+ echo Using local stepmake: $datadir/stepmake not found
+ fi
+ AC_CONFIG_AUX_DIR(\
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ )
fi
+ AC_SUBST(stepmake)
AC_SUBST(package)
AC_SUBST(PACKAGE)
AC_SUBST(PACKAGE_NAME)
absolute_builddir="`pwd`"
AC_SUBST(absolute_builddir)
- # No versioning on directory names of sub-packages
- stepmake=stepmake
- AC_SUBST(stepmake)
-
STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
if test "x$STATE_VECTOR" != "x"; then
STATE_VECTOR="\$(depth)/$STATE_VECTOR"
DOTEXE=.exe
DIRSEP='\\'
PATHSEP=';'
- INSTALL="\$(stepdir)/../bin/install-dot-exe.sh -c"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
else
DIRSEP='/'
PATHSEP=':'
LN=ln
LN_S='ln -s'
ZIP="zip -r -9"
- INSTALL="\$(stepdir)/../bin/install-sh -c"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
fi
AC_SUBST(DOTEXE)
AC_SUBST(ZIP)
AC_CHECK_PROGS(YODL2MSLESS, yodl2msless, -echo no yodl)
AC_CHECK_PROGS(YODL2TEXINFO, yodl2texinfo, -echo no yodl)
AC_CHECK_PROGS(YODL2TXT, yodl2txt, -echo no yodl)
+ YODL2LESS_DIR='$(bindir)/'
else
AC_SUBST(STRIPROFF)
AC_SUBST(YODL)
AC_SUBST(YODL2HTML)
AC_SUBST(YODL2LATEX)
+ AC_SUBST(YODL2LESS_DIR)
AC_SUBST(YODL2MAN)
AC_SUBST(YODL2MSLESS)
AC_SUBST(YODL2TEXINFO)
# bin/Makefile
depth = ..
-
EXTRA_DIST_FILES = install-sh config.sub config.guess
-STEPMAKE_TEMPLATES=script
+STEPMAKE_TEMPLATES=script install
include $(depth)/make/stepmake.make
-
+POST_INSTALL=chmod 755 $(datadir)/bin/*
+INSTALLATION_DIR=$(datadir)/bin
+INSTALLATION_FILES=$(DIST_FILES)
sys.stdout.write (
'Generate a patch to go to current version\n'
' -f, --from=FROM old is FROM\n'
- ' -h, --help print this help\n'
+ ' -h, --help print this help\n'
' -p, --package=DIR specify package\n'
' -r, --release diff against latest release\n'
' -t, --to=TO to version TO\n'
for d in dirs:
files = files + multiple_find (['*'], [d])
for f in files:
- os.remove (f)
+ try:
+ os.remove (f)
+ except:
+ sys.stderr.write ("can't remove: `" + f + "'\n'")
def dirname (v):
# urg, again?
YODL= @YODL@
YODL2HTML= @YODL2HTML@
YODL2LATEX= @YODL2LATEX@
+YODL2LESS_DIR= @YODL2LESS_DIR@
YODL2MAN= @YODL2MAN@
YODL2MSLESS= @YODL2MSLESS@
YODL2TEXINFO= @YODL2TEXINFO@
PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
+ # No versioning on directory names of sub-packages
+ # urg, urg
+ stepmake=${datadir}/stepmake
+ presome=${prefix}
+ if test "$prefix" = "NONE"; then
+ presome=${ac_default_prefix}
+ fi
+ stepmake=`echo ${stepmake} | sed "s!\\\${prefix}!$presome!"`
+
if test "x$PACKAGE" = "xSTEPMAKE"; then
echo Stepmake package!
(cd stepmake; rm -f stepmake; ln -s ../stepmake .)
ac_config_sub=$ac_aux_dir/config.sub
ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+ stepmake=stepmake
else
echo Package: $PACKAGE
+ # Check for installed stepmake
+ if test -d $stepmake; then
+ echo Using installed stepmake: $stepmake
+ else
+ stepmake='$(depth)'/stepmake
+ echo Using local stepmake: $datadir/stepmake not found
+ fi
ac_aux_dir=
-for ac_dir in stepmake/bin $srcdir/stepmake/bin; do
+for ac_dir in \
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ $srcdir/\
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ ; do
if test -f $ac_dir/install-sh; then
ac_aux_dir=$ac_dir
ac_install_sh="$ac_aux_dir/install-sh -c"
fi
done
if test -z "$ac_aux_dir"; then
- { echo "configure: error: can not find install-sh or install.sh in stepmake/bin $srcdir/stepmake/bin" 1>&2; exit 1; }
+ { echo "configure: error: can not find install-sh or install.sh in \
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ $srcdir/\
+ $HOME/usr/local/share/stepmake/bin\
+ $HOME/usr/local/lib/stepmake/bin\
+ $HOME/usr/share/stepmake/bin\
+ $HOME/usr/lib/stepmake/bin\
+ /usr/local/share/stepmake/bin\
+ /usr/local/lib/stepmake/bin\
+ /usr/share/stepmake/bin\
+ /usr/lib/stepmake/bin\
+ stepmake/bin\
+ " 1>&2; exit 1; }
fi
ac_config_guess=$ac_aux_dir/config.guess
ac_config_sub=$ac_aux_dir/config.sub
+
cat >> confdefs.h <<EOF
#define PACKAGE "${PACKAGE_NAME}"
EOF
absolute_builddir="`pwd`"
- # No versioning on directory names of sub-packages
- stepmake=stepmake
-
-
STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
if test "x$STATE_VECTOR" != "x"; then
STATE_VECTOR="\$(depth)/$STATE_VECTOR"
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:695: checking host system type" >&5
+echo "configure:749: checking host system type" >&5
host_alias=$host
case "$host_alias" in
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:720: checking for $ac_word" >&5
+echo "configure:774: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKE'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:754: checking for $ac_word" >&5
+echo "configure:808: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_FIND'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:791: checking for $ac_word" >&5
+echo "configure:845: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_TAR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:825: checking for $ac_word" >&5
+echo "configure:879: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_BASH'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "${PYTHON:-python}", so it can be a program name with args.
set dummy ${PYTHON:-python}; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:858: checking for $ac_word" >&5
+echo "configure:912: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PYTHON'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
DOTEXE=.exe
DIRSEP='\\'
PATHSEP=';'
- INSTALL="\$(stepdir)/../bin/install-dot-exe.sh -c"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
else
DIRSEP='/'
PATHSEP=':'
LN=ln
LN_S='ln -s'
ZIP="zip -r -9"
- INSTALL="\$(stepdir)/../bin/install-sh -c"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
fi
echo $ac_n "checking language""... $ac_c" 1>&6
-echo "configure:1008: checking language" >&5
+echo "configure:1062: checking language" >&5
case "$language" in
En* | en* | Am* | am* | US* | us*)
lang=English;;
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1041: checking for $ac_word" >&5
+echo "configure:1095: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIPROFF'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1075: checking for $ac_word" >&5
+echo "configure:1129: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1109: checking for $ac_word" >&5
+echo "configure:1163: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2HTML'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1143: checking for $ac_word" >&5
+echo "configure:1197: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2LATEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1176: checking for $ac_word" >&5
+echo "configure:1230: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2MAN'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1210: checking for $ac_word" >&5
+echo "configure:1264: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2MSLESS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1244: checking for $ac_word" >&5
+echo "configure:1298: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2TEXINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1278: checking for $ac_word" >&5
+echo "configure:1332: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_YODL2TXT'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
done
test -n "$YODL2TXT" || YODL2TXT="-echo no yodl"
+ YODL2LESS_DIR='$(bindir)/'
else
+
export STRIPROFF YODL YODL2HTML YODL2LATEX YODL2MAN YODL2MSLESS YODL2TEXINFO YODL2TXT
fi
if test "x$YODL" = "-echo no yodl"; then
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1334: checking for $ac_word" >&5
+echo "configure:1390: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_MAKEINFO'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
s%@oldincludedir@%$oldincludedir%g
s%@infodir@%$infodir%g
s%@mandir@%$mandir%g
+s%@stepmake@%$stepmake%g
s%@package@%$package%g
s%@PACKAGE@%$PACKAGE%g
s%@PACKAGE_NAME@%$PACKAGE_NAME%g
s%@package_depth@%$package_depth%g
s%@AUTOGENERATE@%$AUTOGENERATE%g
s%@absolute_builddir@%$absolute_builddir%g
-s%@stepmake@%$stepmake%g
s%@STATE_VECTOR@%$STATE_VECTOR%g
s%@CONFIGSUFFIX@%$CONFIGSUFFIX%g
s%@host@%$host%g
s%@YODL2MSLESS@%$YODL2MSLESS%g
s%@YODL2TEXINFO@%$YODL2TEXINFO%g
s%@YODL2TXT@%$YODL2TXT%g
+s%@YODL2LESS_DIR@%$YODL2LESS_DIR%g
s%@MAKEINFO@%$MAKEINFO%g
CEOF
# file make/Makefile
depth = ..
-STEPMAKE_TEMPLATES=makedir
+STEPMAKE_TEMPLATES=makedir install
BLURBS=BLURB # COPERTINA FLAPTEKST
ifneq ($(strip $(state-vector)),)
include $(depth)/make/stepmake.make
-
+INSTALLATION_DIR=$(datadir)/make
+INSTALLATION_FILES=$(DIST_FILES)
# descent order into subdirectories:
#
+ifeq ($(PACKAGE),STEPMAKE)
SUBDIRS = bin make stepmake Documentation
-#
-
-# bootstrap stepmake:
-#
+else
+SUBDIRS =
+endif
#
# list of distribution files:
README_TXT_FILES = AUTHORS.txt INSTALL.txt
EXTRA_DIST_FILES = $(IN_FILES) VERSION $(README_FILES) $(SCRIPTS)
NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
-
#
# bootstrap stepmake:
include $(depth)/make/stepmake.make
#
+# descent order into subdirectories:
+#
+ifeq ($(PACKAGE),STEPMAKE)
+SUBDIRS = bin make stepmake Documentation
+else
+SUBDIRS =
+endif
+#
+
+#urg urg
+stepmake/aclocal.m4:
+ -$(LN) aclocal.m4 $@
+
+ifeq ($(PACKAGE),STEPMAKE)
+INSTALLATION_DIR=$(datadir)
+INSTALLATION_FILES=$(DIST_FILES) $(NON_ESSENTIAL_DIST_FILES) GNUmakefile config.make config.status
+include $(stepdir)/install-targets.make
+endif
SUBDIRS =
#
-STEPMAKE_TEMPLATES=makedir
-
+STEPMAKE_TEMPLATES=makedir install
# bootstrap stepmake:
#
-include $(depth)/make/stepmake.make
+
+INSTALLATION_DIR=$(datadir)/stepmake
+INSTALLATION_FILES=GNUmakefile $(MAKE_FILES)
+
# what to do here?
ifneq ($(strip $(INFO_FILES)),)
-INFOINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(infodir) depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_FILES)" -f $(stepdir)/install-outfiles.sub.make $@
+INFOINSTALL=$(MAKE) INSTALLATION_OUT_DIR=$(infodir) depth=$(depth) INSTALLATION_OUT_FILES="$(INFO_FILES)" -f $(stepdir)/install-out.sub.make $@
localinstall: # $(INFO_FILES)
-$(INSTALL) -d $(infodir)
local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
+# echo topdir=$(topdir)
+# echo distdir=$(distdir)
+# echo locladir=$(localdir)
mkdir -p $(distdir)/$(localdir)
$(LN) $(DIST_FILES) $(distdir)/$(localdir)
mkdir $(distdir)/$(localdir)/out; \
$(LN) $(OUT_DIST_FILES) $(distdir)/$(localdir)/out;; \
esac
- $(foreach i, $(SUBDIRS), $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) local-dist &&) true
+# $(foreach i, $(SUBDIRS), $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) local-dist &&) true
+# absolute for installed stepmake
+ $(foreach i, $(SUBDIRS), $(MAKE) topdir=$(topdir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
cp $< $@
$(outdir)/version.hh: $(outdir)/VERSION
- sh ./$(step-bindir)/make-version.sh $< > $@
+ sh $(step-bindir)/make-version.sh $< > $@
# should this be in Rules?
configure: configure.in aclocal.m4
--- /dev/null
+# install-out-targets.make
+
+localinstall: localinstall-files localinstall-outfiles
+
+localinstall-files:
+
+# urg, parameterise
+localinstall-outfiles: $(INSTALLATION_OUT_FILES) $(INSTALLATION_OUT_FILES1) $(INSTALLATION_OUT_FILES2)
+ -$(INSTALL) -d $(INSTALLATION_OUT_DIR)
+ $(foreach i, $(INSTALLATION_OUT_FILES), \
+ $(INSTALL) -m 644 $(i) $(INSTALLATION_OUT_DIR) && )true
+ifneq ($(strip $(INSTALLATION_OUT_FILES1)),)
+ -$(INSTALL) -d $(INSTALLATION_OUT_DIR1)
+ $(foreach i, $(INSTALLATION_OUT_FILES1), \
+ $(INSTALL) -m 644 $(i) $(INSTALLATION_OUT_DIR1) && )true
+endif
+ifneq ($(strip $(INSTALLATION_OUT_FILES2)),)
+ -$(INSTALL) -d $(INSTALLATION_OUT_DIR2)
+ $(foreach i, $(INSTALLATION_OUT_FILES2), \
+ $(INSTALL) -m 644 $(i) $(INSTALLATION_OUT_DIR2) && )true
+endif
+
+localuninstall: localuninstall-outfiles localuninstall-files
+
+localuninstall-files:
+
+localuninstall-outfiles:
+ $(foreach i, $(notdir $(INSTALLATION_OUT_FILES)), \
+ rm -f $(INSTALLATION_OUT_DIR)/$(i) && ) true
+ -rmdir $(INSTALLATION_OUT_DIR)
+ifneq ($(strip $(INSTALLATION_OUT_FILES1)),)
+ $(foreach i, $(notdir $(INSTALLATION_OUT_FILES1)), \
+ rm -f $(INSTALLATION_OUT_DIR1)/$(i) && ) true
+ -rmdir $(INSTALLATION_OUT_DIR1)
+endif
+ifneq ($(strip $(INSTALLATION_OUT_FILES2)),)
+ $(foreach i, $(notdir $(INSTALLATION_OUT_FILES2)), \
+ rm -f $(INSTALLATION_OUT_DIR2)/$(i) && ) true
+ -rmdir $(INSTALLATION_OUT_DIR2)
+endif
+# -(cd $(INSTALLATION_OUT_DIR)/..; dir=`dirname \`pwd\`` cd ..; rmdir $$dir)
--- /dev/null
+# install-out.sub.make
+
+include $(depth)/make/stepmake.make
+include $(stepdir)/install-out-targets.make
+
--- /dev/null
+# install-targets.make
+
+localinstall: localinstall-files localinstall-outfiles
+
+localinstall-outfiles:
+
+# urg, parameterise
+localinstall-files:
+ $(PRE_INSTALL)
+ -$(INSTALL) -d $(INSTALLATION_DIR)
+ $(foreach i, $(INSTALLATION_FILES),\
+ $(INSTALL) -m 644 $(i) $(INSTALLATION_DIR) &&)true
+ $(POST_INSTALL)
+ifneq ($(strip $(INSTALLATION_FILES1)),)
+ $(PRE_INSTALL1)
+ -$(INSTALL) -d $(INSTALLATION_DIR1)
+ $(foreach i, $(INSTALLATION_FILES1),\
+ $(INSTALL) -m 644 $(i) $(INSTALLATION_DIR1) &&)true
+ $(POST_INSTALL1)
+endif
+ifneq ($(strip $(INSTALLATION_FILES2)),)
+ $(PRE_INSTALL2)
+ -$(INSTALL) -d $(INSTALLATION_DIR2)
+ $(foreach i, $(INSTALLATION_FILES2),\
+ $(INSTALL) -m 644 $(i) $(INSTALLATION_DIR2) &&)true
+ $(POST_INSTALL2)
+endif
+
+localuninstall: localuninstall-outfiles localuninstall-files
+
+localuninstall-outfiles:
+
+localuninstall-files:
+ $(foreach i, $(INSTALLATION_FILES),\
+ rm -f $(INSTALLATION_DIR)/$(i) && ) true
+ -$(foreach i, $(SUBDIRS), rmdir $(INSTALLATION_DIR)/$(i); )
+ -rmdir $(INSTALLATION_DIR)
+ifneq ($(strip $(INSTALLATION_FILES1)),)
+ $(foreach i, $(INSTALLATION_FILES1),\
+ rm -f $(INSTALLATION_DIR1)/$(i) && ) true
+ -$(foreach i, $(SUBDIRS), rmdir $(INSTALLATION_DIR1)/$(i); )
+ -rmdir $(INSTALLATION_DIR1)
+endif
+ifneq ($(strip $(INSTALLATION_FILES2)),)
+ $(foreach i, $(INSTALLATION_FILES2),\
+ rm -f $(INSTALLATION_DIR2)/$(i) && ) true
+ -$(foreach i, $(SUBDIRS), rmdir $(INSTALLATION_DIR2)/$(i); )
+ -rmdir $(INSTALLATION_DIR2)
+endif
--- /dev/null
+# install.sub.make
+
+include $(depth)/make/stepmake.make
+include $(stepdir)/install-targets.make
+
# i've got no idea what this scaling could be for, on both sides...
# it seems that 'low_res', which should be all we ever need according
# to the metapost mfplain guru, really does 200dpi, iso 600dpi (minimun)
- $(METAPOST) "&mfplain \mode=lowres; \mag=100.0; batchmode; input $<"
+ -$(METAPOST) "&mfplain \mode=lowres; \mag=100.0; batchmode; input $<"
# -$(METAPOST) "&mfmp \mode=ljfour; \mag=100.0; batchmode; input $<"
$(PYTHON) $(depth)/buildscripts/ps-to-pfa.py $<
rm -f $(basename $(@F)).[0-9]*
GNUmakefile: make/toplevel.make.in
$(MAKE) INFILE=$< OUTFILE=$@ -f $(stepdir)/automatically-generated.sub.make
-aclocal.m4: $(stepdir)/../aclocal.m4
+ifneq ($(PACKAGE),STEPMAKE)
+aclocal.m4: $(stepmake)/aclocal.m4
$(MAKE) INFILE=$< OUTFILE=$@ LINECOMMENT=dnl -f $(stepdir)/automatically-generated.sub.make
-
+endif
local-WWW: #index.html
# ugh.
# Can't compare "stage1" dist with "stage2" dist in this way?
-ln -f $(depth)/$(outdir)/$(distname).tar.gz $(release-dir)
- rm -rf ./$(distdir)/
+ rm -rf $(distdir)/
local-help:
@echo -e "\
TEX_FILES = $(wildcard *.tex)
EXTRA_DIST_FILES = $(TEX_FILES) lilyponddefs.ps
+STEPMAKE_TEMPLATES=install
INSTALLATION_DIR=$(datadir)/tex/
INSTALLATION_FILES=$(TEX_FILES)
include $(depth)/make/stepmake.make
-include $(stepdir)/installfiles.make
{
/object exch def
gsave
- exch translate
+ %exch translate
+ translate
0 0 moveto
object
grestore
stafflinethickness 1.6 mul widthbar
} bind def
-/maatstreep
+/maatstreep % height
{
thinbar
} bind def
thickbar
} bind def
-/generalmeter
+/generalmeter % num den
{
+ pop pop
} bind def
/pianobrace
yoffset staffheight 8 mul sub /yoffset exch def
} bind def
-/unknown {} bind def
+/unknown { (U) show} bind def
+/empty {(E) show} bind def
/turnOnExperimentalFeatures { } bind def