characters. Update callers.
* flower/file-name.cc (File_name): Slashify.
* scm/lily.scm: Use gui-main iso lilypond-main on MINGW.
* scripts/GNUmakefile (SEXECUTABLES): Add lilypond-invoke-editor.
* stepmake/aclocal.m4 (STEPMAKE_WINDOWS): New function.
* configure.in (gui_b): Use it.
* lily/lilypond.rc.in: New file.
* lily/GNUmakefile[PLATFROM_WINDOWS]: Compile it into executable.
+2005-05-12 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * flower/string.cc (substitute): Take two strings or two
+ characters. Update callers.
+
+2005-05-11 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * flower/file-name.cc (File_name): Slashify.
+
+ * scm/lily.scm: Use gui-main iso lilypond-main on MINGW.
+
+ * scripts/GNUmakefile (SEXECUTABLES): Add lilypond-invoke-editor.
+
+ * stepmake/aclocal.m4 (STEPMAKE_WINDOWS): New function.
+
+ * configure.in (gui_b): Use it.
+
+ * lily/lilypond.rc.in: New file.
+
+ * lily/GNUmakefile[PLATFROM_WINDOWS]: Compile it into executable.
+
2005-05-12 Graham Percival <gperlist@shaw.ca>
* Documentation/user/advanced-notation.itely: edit of Text
* input/test/volta-chord-names.ly: Bring the explanation up to
date.
+>>>>>>> 1.3600
2005-05-11 Heikki Junes <hjunes@cc.hut.fi>
* Documentation/topdocs/{AUTHORS.texi,INSTALL.texi,README.texi}:
file is found in your home-directory under
@file{.mozilla/firefox/default.trn/prefs.js}.}
+@ignore
+mozilla wants us do store this in user.js:
+http://www.mozilla.org/support/firefox/edit#user
+
+location on different systems:
+http://www.mozilla.org/support/firefox/edit#profile
+
+@end ignore
+
@example
user_pref("network.protocol-handler.app.textedit", "lilypond-pdfpc-helper");
user_pref("network.protocol-handler.warn-external.textedit", false);
#define DIRSEP '@DIRSEP@'
#define PATHSEP '@PATHSEP@'
+/* define if you have some kind of windows platform */
+#define PLATFORM_WINDOWS 0
+
/* define if you have assert.h */
#define HAVE_ASSERT_H 0
PAPERSIZE=a4
PATHSEP = @PATHSEP@
PERL = @PERL@
+PLATFORM_WINDOWS = @PLATFORM_WINDOWS@
PYTHON = @PYTHON@
RANLIB = @RANLIB@
ROOTSEP = @ROOTSEP@
SPLITTING_MAKEINFO = @SPLITTING_MAKEINFO@
TAR = @TAR@
TTFTOOL_ENDIAN = @TTFTOOL_ENDIAN@
+WINDRES = @WINDRES@
YACC = @YACC@
ZIP = @ZIP@
TTFTOOL_ENDIAN="-DSMALLENDIAN")
AC_SUBST(TTFTOOL_ENDIAN)
+STEPMAKE_WINDOWS
+
## Optional tools for building documentation, website, extra fonts.
# guile executable for some scripts
File_name::File_name (String file_name)
{
#ifdef __CYGWIN__
- /* All system functions would work, even if we don't convert to
- posix file_name, but we'd think that \foe\bar\baz.ly is in the cwd.
- On by default. */
+ /* All system functions would work, even if we do not convert to
+ posix file_name, but we would think that \foe\bar\baz.ly is in
+ the cwd. */
file_name = dos_to_posix (file_name);
#endif
+#ifdef __MINGW32__
+ file_name.substitute ('\\', '/');
+#endif
int i = file_name.index (ROOTSEP);
if (i >= 0)
/// convert to a double
double to_double () const;
- void substitute_char (char text, String sub);
+ void substitute (String find, String replace);
+ void substitute (char find, char replace);
};
/*
#endif
void
-String::substitute_char (char chr, String sub)
+String::substitute (String find, String replace)
{
- for (int i = index (chr); i > -1; i = index (chr))
- *this = left_string (i) + sub + right_string (length () - i - 1);
+ int n = replace.length ();
+ for (int i = index (find); i > - 1; i = index (find))
+ *this = left_string (i) + find + right_string (length () - i - n);
+}
+
+void
+String::substitute (char find, char replace)
+{
+ for (int i = index (find); i > - 1; i = index (find))
+ (*this)[i] = replace;
}
MODULE_CXXFLAGS=
HELP2MAN_EXECS = lilypond
-STEPMAKE_TEMPLATES= c++ executable po help2man
+STEPMAKE_TEMPLATES=c c++ executable po help2man
OUT_DIST_FILES=$(addprefix $(outdir)/,parser.cc parser.hh)
# USER_LDFLAGS += -static -lltdl -ldl
#
+ifeq ($(PLATFORM_WINDOWS),yes)
+WINDRES_FLAGS += -DLilyPond=1
+O_FILES += $(outdir)/lilypond.rc.o
+$(outdir)/lilypond: $(outdir)/lilypond.rc.o
+
+$(outdir)/lilypond.rc.o: $(outdir)/lilypond.ico
+$(outdir)/lilypond.ico: $(abs-srcdir)/Documentation/pictures/lelie-logo.xpm
+ convert $< $@
+endif
+
ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *(\([^,]+\)/\1/'
ETAGS_FLAGS += --regex='{c++}/^LY_DEFINE *([^"]*"\([^"]+\)"/\1/'
ifneq ($(srcdir), .)
.PRECIOUS: $(outdir)/lexer.cc $(outdir)/parser.cc
endif
+
Stencil
Font_metric::find_by_name (String s) const
{
- s.substitute_char ('-', "M");
+ s.substitute ('-', 'M');
int idx = name_to_index (s);
Box b;
setup_localisation ();
setup_paths ();
parse_argv (argc, argv);
+ /* FIXME: this still needs a terminal even when using gui-main after
+ booting guile. Maybe use a --quiet command line switch? */
identify (stderr);
scm_boot_guile (argc, argv, main_with_guile, 0);
- /*
- If we get here, GUILE exited. This is an error.
- */
+ /* Only reachable if GUILE exits. That is an error. */
return 1;
}
endif
include $(depth)/make/toplevel-version.make
+MICRO_VERSION=$(PATCH_LEVEL)
+BUILD_VERSION=1
# Use alternate configurations alongside eachother:
#
ATVARIABLES = \
BASH\
+ BUILD_VERSION\
DATE\
FONTFORGE\
GUILE\
+ MICRO_VERSION\
+ MAJOR_VERSION\
+ MINOR_VERSION\
PACKAGE\
+ PATCH_LEVEL\
PATHSEP\
PERL\
PYTHON\
local_lilypond_datadir\
local_lilypond_libdir\
localedir\
+ outdir\
package\
prefix\
program_prefix\
program_suffix\
sharedstatedir\
+ srcdir\
step-bindir\
(ice-9 safe)
(ice-9 optargs)
(oop goops)
- (srfi srfi-1) ;; lists
- (srfi srfi-13)) ;; strings
+ (srfi srfi-1)
+ (srfi srfi-13)
+ (srfi srfi-14))
;; my display
(log-file (open-file log-name "w")))
(display "# -*-compilation-*-" log-file)
(newline log-file)
+ ;; Ugh, this opens a terminal
(ly:message (_ "Redirecting output to ~a...") log-name)
(ly:port-move (fileno (current-error-port)) log-file)
(if (null? (lilypond-all files))
(cmd (get-editor-command ly 0 0)))
(system cmd)))
-;; FIXME
-;; (define lilypond-main gui-main)
+
+;; Mingw
+;; #(Windows XP HOSTNAME build 2600 5.01 Service Pack 1 i686)
+
+;; Cygwin
+;; #(CYGWIN_NT-5.1 Hostname 1.5.12(0.116/4/2) 2004-11-10 08:34 i686)
+
+;; Debian
+;; #(Linux hostname 2.4.27-1-686 #1 Fri Sep 3 06:28:00 UTC 2004 i686)
+
+(case (string->symbol
+ (string-downcase
+ (car (string-tokenize (vector-ref (uname) 0) char-set:letter))))
+ ((linux) #t)
+ ;; On mingw, use gui-main
+ ((windows) (define lilypond-main gui-main)))
+
+;;(if (ly:get-option 'quiet)
+;; (define lilypond-main gui-main))
depth = ..
-SEXECUTABLES=convert-ly lilypond-book abc2ly etf2ly mup2ly midi2ly lilypond-ps2png lilypond-pdfpc-helper
+SEXECUTABLES=convert-ly lilypond-book abc2ly etf2ly mup2ly midi2ly lilypond-ps2png lilypond-pdfpc-helper lilypond-invoke-editor
STEPMAKE_TEMPLATES=script help2man po
LOCALSTEPMAKE_TEMPLATES = lilypond
##
## -V: Workaround for python
- changequote(<<, >>)dnl
- ##set -x
+ changequote(<<, >>)#dnl
## Assume and hunt for dotted version multiplet.
## use eval trickery, because we cannot use multi-level $() instead of ``
## for compatibility reasons.
| sed -e 's/^[^.0-9]*//' -e 's/[^.0-9]*$//'\`\"
fi
echo "$_ver"
- ##set +x
- changequote([, ])dnl
+ changequote([, ])#dnl
])
# Calculate simplistic numeric version from version string ($1)
AC_SUBST(GUILE_CONFIG)
guile_version="$ver"
- changequote(<<, >>)dnl
+ changequote(<<, >>)#dnl
GUILE_MAJOR_VERSION=`expr $guile_version : '\([0-9]*\)'`
GUILE_MINOR_VERSION=`expr $guile_version : '[0-9]*\.\([0-9]*\)'`
GUILE_PATCH_LEVEL=`expr $guile_version : '[0-9]*\.[0-9]*\.\([0-9]*\)'`
- changequote([, ])dnl
+ changequote([, ])#dnl
STEPMAKE_GUILE_FLAGS
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
fi
export MAJOR_VERSION MINOR_VERSION PATCH_LEVEL
# urg: don't "fix" this: irix doesn't know about [:lower:] and [:upper:]
- changequote(<<, >>)dnl
+ changequote(<<, >>)#dnl
PACKAGE=`echo $PACKAGE_NAME | tr '[a-z]' '[A-Z]'`
package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
- changequote([, ])dnl
+ changequote([, ])#dnl
# No versioning on directory names of sub-packages
# urg, urg
# STEPMAKE_WARN($warn)
STEPMAKE_ADD_ENTRY(REQUIRED, $warn)
fi
- fi
-
- if test "$OSTYPE" = "cygwin" -o "$OSTYPE" = "cygwin32" -o "$OSTYPE" = "Windows_NT"; then
- LN=cp # hard link does not work under cygnus-nt
- LN_S='cp -r' # symbolic link does not work for native nt
- ZIP="zip -r -9" #
- program_suffix=.exe
- ROOTSEP=':'
- DIRSEP='/'
- PATHSEP=':'
- INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
- else
- ROOTSEP=':'
- DIRSEP='/'
- PATHSEP=':'
- LN=ln
- LN_S='ln -s'
- ZIP="zip -r -9"
- INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
fi
+
+ ROOTSEP=':'
+ DIRSEP='/'
+ PATHSEP=':'
+ LN=ln
+ LN_S='ln -s'
+ ZIP="zip -r -9"
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-sh -c"
+
AC_SUBST(program_prefix)
AC_SUBST(program_suffix)
AC_SUBST(ZIP)
AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [
unset PYTHON_HEADER PYTHON_INCLUDE
if test -n "$PYTHON"; then
- changequote(<<, >>)dnl
+ changequote(<<, >>)#dnl
# alternatively, for python >= 2.0
# 'import sys, distutils.sysconfig; sys.stdout.write (distutils.sysconfig.get_python_inc ())'
PYTHON_INCLUDE=`$PYTHON -c 'import sys; sys.stdout.write ("%s/include/python%s" % (sys.prefix, sys.version[:3]))'`
- changequote([, ])dnl
+ changequote([, ])#dnl
fi
##AC_CHECK_HEADERS([Python.h],[PYTHON_HEADER=yes])
STEPMAKE_ADD_ENTRY($2, ["$r >= $3 (installed: $ver)"])
fi
])
+
+AC_DEFUN(STEPMAKE_WINDOWS, [
+ AC_CYGWIN
+ AC_MINGW32
+
+ if test "$CYGWIN" == "yes"; then
+ LN_S='cp -r' # Cygwin symbolic links do not work for native apps.
+ program_suffix=.exe
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
+ elif test "$MINGW" == "yes"; then
+ LN='cp -r'
+ LN_S='cp -r'
+ program_suffix=.exe
+ INSTALL="\$(SHELL) \$(stepdir)/../bin/install-dot-exe.sh -c"
+ PATHSEP=';'
+ fi
+
+ AC_MSG_CHECKING([for some flavor of Windows])
+ if test "$CYGWIN$MINGW32" == "nono"; then
+ PLATFORM_WINDOWS=no
+ else
+ PLATFORM_WINDOWS=yes
+ fi
+ AC_MSG_RESULT([$PLATFORM_WINDOWS])
+ AC_SUBST(PLATFORM_WINDOWS)
+ STEPMAKE_PROGS(WINDRES, $target-windres windres, x)
+ AC_SUBST(WINDRES)
+])
$(outdir)/%.cc: %.ll
$(FLEX) -Cfe -p -p -o$@ $<
+
+$(outdir)/%-rc.o: $(outdir)/%.rc
+ $(WINDRES) $(WINDRES_FLAGS) -o$@ $<
# could be faster:
# $(FLEX) -8 -Cf -o$@ $<
+$(outdir)/%.rc.o: $(outdir)/%.rc
+ $(WINDRES) $(WINDRES_FLAGS) -o$@ $<