From 1ca7a2c01e48a2585ab7b43aa18c9c276d4a05d0 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Thu, 3 Apr 1997 14:06:07 +0200 Subject: [PATCH] release: 0.0.47 --- .version | 4 +- Documentation/CodingStyle.pod | 12 +- Documentation/INSTALL.pod | 2 + Documentation/Makefile | 9 +- Documentation/examples.pod | 5 +- Documentation/faq.pod | 47 +++-- INSTALL.text | 16 +- NEWS | 12 +- TODO | 8 +- bin/make_website | 50 ++--- configure | 2 - configure.in | 5 +- flower/Flower-flags.make.in | 3 + flower/Makefile | 16 +- flower/configure | 317 ++++++++++++++++++++++--------- flower/configure.in | 32 +++- flower/include/string-data.hh | 2 +- flower/include/string-handle.hh | 2 +- flower/test/Makefile | 6 +- flower/test/stringtest.cc | 2 - init/table_sixteen.ini | 1 + input/maartje.ly | 4 +- input/martien.ly | 18 +- input/rhythm.ly | 20 +- input/scales.ly | 11 +- lib/Makefile | 6 +- lib/duration-convert.cc | 2 +- lib/includable-lexer.cc | 8 +- lib/include/debug.hh | 5 - lib/include/includable-lexer.hh | 1 + lib/include/input.hh | 14 +- {lily => lib}/input.cc | 31 +-- lib/source-file.cc | 4 +- lily/.version | 4 +- lily/Makefile | 8 +- lily/crescendo.cc | 4 +- lily/include/input.hh | 32 ---- lily/include/time-description.hh | 3 +- lily/lexer.l | 3 +- lily/local-key-reg.cc | 2 +- lily/my-lily-lexer.cc | 14 +- lily/my-lily-parser.cc | 5 +- lily/staff-walker.cc | 7 +- lily/text-item.cc | 8 +- lily/time-description.cc | 26 ++- lily/warn.cc | 42 +--- make/Configure_variables.make.in | 2 +- make/Files.make | 20 +- make/Rules.make | 12 +- make/Targets.make | 20 +- make/User.make | 21 -- make/Variables.make | 37 +++- mi2mu/Makefile | 7 +- 53 files changed, 534 insertions(+), 420 deletions(-) create mode 100644 flower/Flower-flags.make.in rename {lily => lib}/input.cc (56%) delete mode 100644 lily/include/input.hh diff --git a/.version b/.version index 0aa685e95d..d10f3583e1 100644 --- a/.version +++ b/.version @@ -1,7 +1,7 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 0 -TOPLEVEL_PATCH_LEVEL = 46 +TOPLEVEL_PATCH_LEVEL = 47 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -TOPLEVEL_MY_PATCH_LEVEL = .jcn1 +TOPLEVEL_MY_PATCH_LEVEL = diff --git a/Documentation/CodingStyle.pod b/Documentation/CodingStyle.pod index 4661560af1..5ce7a20e04 100644 --- a/Documentation/CodingStyle.pod +++ b/Documentation/CodingStyle.pod @@ -45,8 +45,6 @@ extension ".cc". Inline definition files always have the file name extension ".icc". -Template include files always have the file name extension ".tcc". - =head2 INDENTATION @@ -191,7 +189,7 @@ existed. I feel so stupid and ashamed! =head2 Disadvantages -=over 4 +=over 5 =item * @@ -231,7 +229,7 @@ remains an issue. =head2 Proposal -=over 4 +=over 5 =item * @@ -256,7 +254,7 @@ with the parts of the names separated by underscores. =head2 Types -=over 4 +=over 5 =item C @@ -312,7 +310,7 @@ unsigned integer The following types modify the meaning of the prefix. These are precede the prefixes: -=over 4 +=over 5 =item C @@ -346,7 +344,7 @@ reference =back -=over 4 +=over 5 =item C diff --git a/Documentation/INSTALL.pod b/Documentation/INSTALL.pod index 3c1b07819b..4a0701b8b0 100644 --- a/Documentation/INSTALL.pod +++ b/Documentation/INSTALL.pod @@ -74,6 +74,7 @@ to install LilyPond, simply type: This will install the following files: /usr/local/man/man1/lilypond.1 + /usr/local/lib/libflower.{so,a} /usr/local/bin/lilypond /usr/local/bin/mi2mu /usr/local/share/lilypond/* @@ -102,6 +103,7 @@ Since LilyPond currently is beta, You are advised to also use other options include: + --enable-shared --enable-printing --enable-optimise --enable-profiling diff --git a/Documentation/Makefile b/Documentation/Makefile index 817fbeb423..dc87ae02d9 100644 --- a/Documentation/Makefile +++ b/Documentation/Makefile @@ -20,7 +20,7 @@ include ./$(depth)/make/Files.make # -OUTPODFILES = $(patsubst %,$(outdir)/%,$(PODFILES)) +OUTPODFILES = $(addprefix $(outdir)/,$(PODFILES)) TEXTFILES = $(OUTPODFILES:.pod=.text) GROFFFILES = $(OUTPODFILES:.pod=.1) HTMLFILES = $(OUTPODFILES:.pod=.html) @@ -32,11 +32,10 @@ EXTRA_DISTFILES = lelie_icon.gif lelie_logo.gif # default: do-doc - + echo $(TEXTFILES) $(OUTPODFILES) $(PODFILES) do-doc: $(TEXTFILES) -html: $(pod) - pod2html +html: $(HTMLFILES) htmldist: html ./$(lily_bindir)/make_website @@ -49,7 +48,7 @@ include ./$(depth)/make/Rules.make # localclean: - rm -f $(TEXTFILES) $(HTMLFILES) $(GROFFFILES) + rm -f $(TEXTFILES) $(HTMLFILES) $(GROFFFILES) $(HTMLFILES) localinstall: $(outdir)/lilypond.1 $(outdir)/mudela.5 $(INSTALL) -d $(mandir)/man5 diff --git a/Documentation/examples.pod b/Documentation/examples.pod index cd76ca11b4..580ab8c809 100644 --- a/Documentation/examples.pod +++ b/Documentation/examples.pod @@ -12,6 +12,9 @@ each file: tested LilyPond features. copyright info +Most music distributed with LilyPond was composed a long time ago, and +do not have copyrights. Any exceptions are mentioned here. + =head2 F A cadenza to Mozart Horn concerto no. 3. @@ -31,7 +34,7 @@ Features: pushgroup, popgroup. =head2 F -Error messages, context errors. +Features: Error messages, context errors. =head2 F diff --git a/Documentation/faq.pod b/Documentation/faq.pod index 6fc58b2f26..930ad89345 100644 --- a/Documentation/faq.pod +++ b/Documentation/faq.pod @@ -6,6 +6,8 @@ FAQ - LilyPond FAQs Some questions that have been answered before. +=head2 language + Q: I can type @@ -21,7 +23,7 @@ instead of to generate slurs between the chords? -A L1: When you type +A: When you type @@ -40,38 +42,38 @@ formatting: > -Q L2: Why are [] around the notes, and () inbetween? +Q: Why are [] around the notes, and () inbetween? -A L2: [] designate beams, a note can only be in one beam at the same +A: [] designate beams, a note can only be in one beam at the same time. () is a slur, which connects notes. You need to be able to specify a()a()a -Q L3: Why shouldn't I put all commands (\clef, \meter) inside the music? +Q: Why shouldn't I put all commands (\clef, \meter) inside the music? -A L3: You should do what you like, but at some time we will enable +A: You should do what you like, but at some time we will enable quoting of music ("Stichnoten"). Besides if you are going to type an orchestral score, then you'd probably want to enter most of the meter, repeat commands only once. -=head2 MISCELLANEOUS +=head2 Miscellaneous -Q M1: Why GPL? +Q: Why GPL? -A M1: Yes. +A: Yes. -Q M2: Could you implement feature XXXX? It is really easy, just extend +Q: Could you implement feature XXXX? It is really easy, just extend the syntax to allow YYYY! -A M2: If it is reasonable, I'll add XXXX to the TODO list. In general +A: If it is reasonable, I'll add XXXX to the TODO list. In general finding a cute syntax (such as YYYY) isn't very hard. The complicated issue how to adapt the internals to do XXXX. The parser is really a simple front end to the complicated internals. -Q M3: Why do I need g++ >= 2.7? +Q: Why do I need g++ >= 2.7? -A M3: By using g++ LilyPond is portable to all platforms which support +A: By using g++ LilyPond is portable to all platforms which support g++ (there are quite a few). Not having to support other compilers saves us a I of trouble. LilyPond and FlowerLib use: @@ -100,27 +102,36 @@ named return values =back +=head2 Running + +Q: I get + + can't load library 'libflower.so' + +A: You are using the dynamically compiled Flower library. Please set +LD_LIBRARY_PATH to a directory containing F + =head2 DOZE -Q D1: I want a DOS/NT/W95 port. +Q: I want a DOS/NT/W95 port. -A D1.0: Reconsider. Try Linux. It's fun! +A.0: Reconsider. Try Linux. It's fun! -A D1.1: Currently (patchlevel 27), LilyPond (and flowerLib) compiles, links +A.1: Currently (patchlevel 27), LilyPond (and flowerLib) compiles, links and runs on windhoos-nt, using the cygnus gnu port (release b17.1). I (JCN) only had to make a minor workaround for missing library calls. Have a look at http://www.cygnus.com/gnu-win32. To make LilyPond type C. (I am not promising to maintain this platform, it is just that when having to use doze, i-m sometimes too lazy to reboot.) -A D1.2: I haven't had time to find a GCC crosscompiler (I g++ and +A.2: I haven't had time to find a GCC crosscompiler (I g++ and libg++, mind you) to DOS/win (in rpm, please :). -Q D2: I-m dozed enough to run the (sometimes bit stale) .exe-s you distribute. +Q: I-m dozed enough to run the (sometimes bit stale) .exe-s you distribute. Why do i need cygwin.dll? -A D2: It-s all in this cut-n-paste: +A: It-s all in this cut-n-paste: Minimalist GNU-Win32 Readme version 0.1.3 diff --git a/INSTALL.text b/INSTALL.text index 72bd01f9a1..8f4e22a3c7 100644 --- a/INSTALL.text +++ b/INSTALL.text @@ -61,7 +61,7 @@ CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG a -25/Mar/97 LilyPond 0.0.46 1 +3/Apr/97 LilyPond 0.0.47 1 @@ -71,6 +71,7 @@ INSTALL(1) LilyPond documentation INSTALL(1) /usr/local/man/man1/lilypond.1 + /usr/local/lib/libflower.{so,a} /usr/local/bin/lilypond /usr/local/bin/mi2mu /usr/local/share/lilypond/* @@ -101,6 +102,7 @@ INSTALL(1) LilyPond documentation INSTALL(1) other options include: + --enable-shared --enable-printing --enable-optimise --enable-profiling @@ -122,12 +124,10 @@ RRRRUUUUNNNNNNNNIIIINNNNGGGG +o A fast computer (a full page of music typically takes 1 minute on my 486/66, using the --------eeeennnnaaaabbbblllleeee----cccchhhheeeecccckkkkiiiinnnngggg - compile. It's lot slower than most MusiXTeX - preprocessors) -25/Mar/97 LilyPond 0.0.46 2 +3/Apr/97 LilyPond 0.0.47 2 @@ -136,6 +136,9 @@ RRRRUUUUNNNNNNNNIIIINNNNGGGG INSTALL(1) LilyPond documentation INSTALL(1) + compile. It's lot slower than most MusiXTeX + preprocessors) + +o TeX +o The MusixTeX fonts. (I use those found in MusixTeX T.59) @@ -190,9 +193,6 @@ AAAAUUUUTTTTHHHHOOOORRRRSSSS - - - -25/Mar/97 LilyPond 0.0.46 3 +3/Apr/97 LilyPond 0.0.47 3 diff --git a/NEWS b/NEWS index 239dd52b9a..e456d8d44e 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,8 @@ -pl 46.jcn1 -Bugfix - - reincluded {interval,pcursor,plist}.tcc - - renamed Interval::elt_q to elt_b, invoking of empty to empty_b - - readded second (0) arg to warning function (only lily exports - a warning(String) function) - - fixed dist make/Files.make +pl 47 + - dynamic flowerlib + - Input mods: now use Source_file iso Sources + - makefile lib deps restructured + - make_website now produces in out/ pl 46 - examples.pod diff --git a/TODO b/TODO index 522f9cafbe..6e3d3f5c93 100644 --- a/TODO +++ b/TODO @@ -1,9 +1,7 @@ before 0.1 - * update 20 pt table - - * remove spurious/outdated comments in .ly, debug .ly + * fix mi2mu - * pushgroup, popgroup. + * update 20 pt table * decent TeX page layout @@ -75,6 +73,8 @@ SMALLISH PROJECTS * bugreport to doc++ devel: struct not in class hier; public virtual baseclasses + * rpm package buildroot + * indentable stream for TeX stream, lily stream, Dstream. * key transposition diff --git a/bin/make_website b/bin/make_website index e728bf9d27..086d84fa8f 100755 --- a/bin/make_website +++ b/bin/make_website @@ -24,45 +24,40 @@ sub all_refs } local $base="lilypond/"; -local @examples=("wohltemperirt" ,"standchen", "scsii-menuetto"); +local @examples=("wohltemperirt" ,"standchen", "scsii-menuetto", "rhythm", "martien"); #mkdir "lilypond"; sub gen_html { - print "generating HTML"; - foreach $a (<*.pod>) { - $f = $a; - $f =~ s/.pod/.html/; - - system "pod2html $a" if ( ! -f $f ) ; - } + print "generating HTML\n"; + system "make -kC .. html"; } sub gen_examples { - print "generating examples: "; + print "generating examples: \n"; foreach $a (@examples) { - print "$a\n"; $texfile="test"; $tex = "tex $texfile"; - if ($a eq "standchen" || $a eq "scsii-menuetto") { - $tex = "latex input/$a"; + if ($a eq "standchen" || $a eq "scsii-menuetto" || $a eq "martien") { + $tex = "latex $a"; $texfile = "$a"; } + if ( ! -f "$a.ly.txt" ) { - system "ln ../input/$a.ly ./$a.ly.txt"; + system "ln $depth/input/$a.ly ./$a.ly.txt"; } if ( ! -f "$a.ps.gz" ) { - system "cd ..; lilypond input/$a;$tex;". + system "lilypond $a;$tex;". "dvips -o $a.ps $texfile;"; + } # generate the pixmap at twice the size, then rescale (for antialiasing) if ( ! -f "$a.gif" ) { - system "mv ../$a.ps $a.ps; ". - "mv ../lelie.midi ../$a.midi $a.midi; ". - "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif"; + system "mv lelie.midi $a.midi; "; + system "gs -q -sDEVICE=ppmraw -sOutputFile=- -r200 -dNOPAUSE $a.ps -c quit |pnmscale 0.5| ppmtogif > $a.gif"; system "gzip $a.ps"; } } @@ -72,12 +67,13 @@ sub sub gen_list { + print "generating HTML list\n"; open HTMLLIST, ">example_output.html"; print HTMLLIST "LilyPond examples\n"; foreach $a (@examples) { $name=$a; print HTMLLIST "

example file: $name

\n\n"; - $cmd= "head ../input/$a.ly | grep \^% \| sed \"s/^%/ /\""; + $cmd= "head $depth/input/$a.ly | grep \^% \| sed \"s/^%/ /\""; $desc = `$cmd`; print HTMLLIST "$desc\n"; @@ -93,22 +89,30 @@ sub
  • The output (MIDI) "; } + close HTMLLIST; } sub copy_files { - print `ln -s ../out ./docxx` if ( ! -x "docxx" ) ; - system "cp ../TODO ./TODO.txt"; - system "cp ../NEWS ./NEWS.txt"; + print "copying files\n"; + print `ln -s $depth/out ./docxx` if ( ! -x "docxx" ) ; + system "cp $depth/TODO ./TODO.txt"; + system "cp $depth/NEWS ./NEWS.txt"; + system "cp ../lelie*gif ."; } sub do_tar { - system " tar hcf website.tar *.html *.gif lelie_logo.png *.ps.gz *.ly.txt *.midi docxx/*;" . - "gzip -f9 website.tar;" if ( ! -f "website.tar" ) ; + print "tarring.\n"; + system " tar vhcf website.tar *.html *.gif *.ps.gz *.ly.txt *.midi docxx/*;"; +system "gzip -f9 website.tar;"; } +$depth = "../../"; +$ENV{"TEXINPUTS"} .= ":$depth/input/:"; +$ENV{"LILYINCLUDE"} = "$depth/input/"; +chdir ("out"); gen_html; gen_examples; gen_list; diff --git a/configure b/configure index 51d256534b..c90815475e 100755 --- a/configure +++ b/configure @@ -1573,8 +1573,6 @@ touch make/out/Site.make # rgu sed 's/TOPLEVEL_//g' < .version > lily/.version (cd lily; CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh -) - (cd flower; ) cat << END diff --git a/configure.in b/configure.in index 5d74dab46e..ac091d7d15 100644 --- a/configure.in +++ b/configure.in @@ -1,4 +1,5 @@ -dnl Process this file with autoconf to produce a configure script. -*-shell-script-*- +dnl -*-shell-script-*- +dnl Process this file with autoconf to produce a configure script. dnl should cache result. dnl should look in $prefix first. @@ -191,8 +192,6 @@ dnl echo 0 > out/.build # rgu sed 's/TOPLEVEL_//g' < .version > lily/.version (cd lily; CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh -) - (cd flower; ) cat << END diff --git a/flower/Flower-flags.make.in b/flower/Flower-flags.make.in new file mode 100644 index 0000000000..adf1536750 --- /dev/null +++ b/flower/Flower-flags.make.in @@ -0,0 +1,3 @@ +MODULE_CXXFLAGS = @MODULE_CXXFLAGS@ +MODULE_LDFLAGS = @MODULE_LDFLAGS@ +LIB_SUFFIX = @LIB_SUFFIX@ diff --git a/flower/Makefile b/flower/Makefile index 7de4c58459..6272c5f509 100644 --- a/flower/Makefile +++ b/flower/Makefile @@ -17,6 +17,7 @@ depth = .. # NAME = flower MODULE_NAME = flower +include out/Flower-flags.make # # edit .version only include ./$(depth)/.version @@ -27,8 +28,8 @@ include ./$(depth)/flower/.version include ./$(depth)/make/Variables.make include ./$(depth)/make/Files.make + # -CXXFLAGS+=-O2 # descent order into subdirectories: # SUBDIRS = include test @@ -38,7 +39,7 @@ SUBDIRS = include test # SCRIPTS = README_FILES = NEWS README TODO -EXTRA_DISTFILES= configure config.hh.in configure.in .version $(README_FILES) $(SCRIPTS) +EXTRA_DISTFILES= configure config.hh.in configure.in .version $(README_FILES) $(SCRIPTS) Flower-flags.make.in # @@ -47,6 +48,9 @@ EXTRA_DISTFILES= configure config.hh.in configure.in .version $(README_FILES) $( include ./$(depth)/make/Targets.make include ./$(depth)/make/Rules.make # +default: shared-lib + +shared-lib: $(SHAREDLIBRARY) # version: # @@ -58,3 +62,11 @@ localdist: configure localdistclean: rm -f config.cache config.status + +localinstall: $(LIBFLOWER) + $(INSTALL) -d $(libdir) + $(INSTALL) $(LIBFLOWER) $(libdir) +# ln -s $(libdir)/libflower.so.$(VERSION) $(libdir + +localuninstall: + rm -f $(libdir)/libflower.{so,a} diff --git a/flower/configure b/flower/configure index 8d4e1acd7e..cba7a2f206 100755 --- a/flower/configure +++ b/flower/configure @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.10 +# Generated automatically using autoconf version 2.12 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -11,6 +11,10 @@ ac_help= ac_default_prefix=/usr/local # Any additions from configure.in: +ac_help="$ac_help + enable-shared shared flower library" +ac_help="$ac_help + disable-optimise optimisations off" # Initialize some variables set by options. # The variables have the same names as the options, with @@ -49,6 +53,8 @@ mandir='${prefix}/man' # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +# Maximum number of lines to put in a shell here document. +ac_max_here_lines=12 ac_prev= for ac_option @@ -330,7 +336,7 @@ EOF verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.10" + echo "configure generated by autoconf version 2.12" exit 0 ;; -with-* | --with-*) @@ -432,11 +438,14 @@ do done # NLS nuisances. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). -if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +# Only set these to C if already set. These must not be set unconditionally +# because not all systems understand e.g. LANG=C (notably SCO). +# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'! +# Non-C LC_CTYPE values break the ctype check. if test "${LANG+set}" = set; then LANG=C; export LANG; fi +if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi +if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi +if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h @@ -498,6 +507,7 @@ ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. @@ -517,14 +527,47 @@ ac_ext=C ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + + +optimise_b=yes +shared_b=yes +LIB_SUFFIX=.a + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + shared_b=$enableval +fi + + +# Check whether --enable-optimise or --disable-optimise was given. +if test "${enable_optimise+set}" = set; then + enableval="$enable_optimise" + optimise_b=$enableval +fi + + +if test $shared_b = yes; then + MODULE_CXXFLAGS="$MODULE_CXXFLAGS -fPIC" + MODULE_LDFLAGS="-shared -Wl,-soname,libflower.so " + LIB_SUFFIX=.so +fi + +if test $optimise_b = yes; then + MODULE_CXXFLAGS="$MODULE_CXXFLAGS -O2 -DSTRING_UTILS_INLINED" +fi + -for ac_prog in $CCC c++ g++ gcc CC cxx + +for ac_prog in $CCC c++ g++ gcc CC cxx cc++ do # 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:571: 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 @@ -554,7 +597,47 @@ done test -n "$CXX" || CXX="gcc" +echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6 +echo "configure:602: 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. +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CXX-g++} -o conftest $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cxx_cross + +cat > conftest.$ac_ext <&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 + ac_cv_prog_cxx_cross=no + else + ac_cv_prog_cxx_cross=yes + fi +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + ac_cv_prog_cxx_works=no +fi +rm -fr conftest* + +echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6 +if test $ac_cv_prog_cxx_works = no; 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:636: 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:641: 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 @@ -563,7 +646,7 @@ else yes; #endif EOF -if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:567: \"$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:650: \"$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 @@ -571,73 +654,50 @@ fi fi echo "$ac_t""$ac_cv_prog_gxx" 1>&6 + if test $ac_cv_prog_gxx = yes; then GXX=yes - if test "${CXXFLAGS+set}" != set; then - echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_prog_gxx_g'+set}'`\" = set"; then + ac_test_CXXFLAGS="${CXXFLAGS+set}" + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS= + echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6 +echo "configure:665: 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 echo 'void f(){}' > conftest.cc if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then - ac_cv_prog_gxx_g=yes + ac_cv_prog_cxx_g=yes else - ac_cv_prog_gxx_g=no + ac_cv_prog_cxx_g=no fi rm -f conftest* fi -echo "$ac_t""$ac_cv_prog_gxx_g" 1>&6 - if test $ac_cv_prog_gxx_g = yes; then - CXXFLAGS="-g -O" - else - CXXFLAGS="-O" - fi +echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6 + if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS="$ac_save_CXXFLAGS" + elif test $ac_cv_prog_cxx_g = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-O2" fi else GXX= test "${CXXFLAGS+set}" = set || CXXFLAGS="-g" fi -# If we cannot run a trivial program, we must be cross compiling. -echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - if test "$cross_compiling" = yes; then - ac_cv_c_cross=yes -else -cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_c_cross=no -else - ac_cv_c_cross=yes -fi -fi -rm -fr conftest* -fi - -echo "$ac_t""$ac_cv_c_cross" 1>&6 -cross_compiling=$ac_cv_c_cross - echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6 -if eval "test \"`echo '$''{'ac_cv_func_memcmp'+set}'`\" = set"; then +echo "configure:693: 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 if test "$cross_compiling" = yes; then - ac_cv_func_memcmp=no + ac_cv_func_memcmp_clean=no else -cat > conftest.$ac_ext < conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } -if test -s conftest && (./conftest; exit) 2>/dev/null; then - ac_cv_func_memcmp=yes +if { (eval echo configure:714: \"$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 - ac_cv_func_memcmp=no -fi + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -fr conftest* + ac_cv_func_memcmp_clean=no fi rm -fr conftest* fi -echo "$ac_t""$ac_cv_func_memcmp" 1>&6 -test $ac_cv_func_memcmp = no && LIBOBJS="$LIBOBJS memcmp.o" +fi + +echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6 +test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.o" echo $ac_n "checking for vprintf""... $ac_c" 1>&6 +echo "configure:732: 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 <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_vprintf=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_vprintf=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -717,11 +783,12 @@ fi if test "$ac_cv_func_vprintf" != yes; then echo $ac_n "checking for _doprnt""... $ac_c" 1>&6 +echo "configure:787: 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 <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func__doprnt=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func__doprnt=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -770,14 +838,15 @@ fi fi -for ac_func in memmem snprintf foobar +for ac_func in memmem snprintf do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:845: 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 <&5; (eval $ac_link) 2>&5; }; then +if { (eval echo configure:876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no" fi rm -f conftest* - fi + if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` @@ -847,11 +917,25 @@ cat > confcache <<\EOF # --recheck option to rerun configure. # EOF +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \ - >> confcache + case `(ac_space=' '; set) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote substitution + # turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + -e "s/'/'\\\\''/g" \ + -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p' + ;; + esac >> confcache if cmp -s $cache_file confcache; then : else @@ -906,7 +990,7 @@ do echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.10" + echo "$CONFIG_STATUS generated by autoconf version 2.12" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -916,7 +1000,7 @@ done ac_given_srcdir=$srcdir -trap 'rm -fr `echo " out/config.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 +trap 'rm -fr `echo "out/Flower-flags.make:Flower-flags.make.in out/config.hh:config.hh.in" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15 EOF cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF + +# Split the substitutions into bite-sized pieces for seds with +# small command number limits, like on Digital OSF/1 and HP-UX. +ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script. +ac_file=1 # Number of current file. +ac_beg=1 # First line for current file. +ac_end=$ac_max_sed_cmds # Line after last line for current file. +ac_more_lines=: +ac_sed_cmds="" +while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file + else + sed "${ac_end}q" conftest.subs > conftest.s$ac_file + fi + if test ! -s conftest.s$ac_file; then + ac_more_lines=false + rm -f conftest.s$ac_file + else + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f conftest.s$ac_file" + else + ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file" + fi + ac_file=`expr $ac_file + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_cmds` + fi +done +if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat +fi +EOF + cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac - # Adjust relative srcdir, etc. for subdirectories. + # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories. # Remove last slash and all that follows it. Not all systems have dirname. ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'` @@ -988,6 +1111,7 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then top_srcdir="$ac_dots$ac_given_srcdir" ;; esac + echo creating "$ac_file" rm -f "$ac_file" configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure." @@ -996,13 +1120,15 @@ for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then # $configure_input" ;; *) ac_comsub= ;; esac + + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` sed -e "$ac_comsub s%@configure_input@%$configure_input%g s%@srcdir@%$srcdir%g s%@top_srcdir@%$top_srcdir%g -" -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file +" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file fi; done -rm -f conftest.subs +rm -f conftest.s* # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. @@ -1023,11 +1149,17 @@ ac_eB='$%\1#\2define\3' ac_eC=' ' ac_eD='%g' -CONFIG_HEADERS=${CONFIG_HEADERS-"out/config.hh:config.hh.in"} +if test "${CONFIG_HEADERS+set}" != set; then +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF +fi for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then - # Support "outfile[:infile]", defaulting infile="outfile.in". + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case "$ac_file" in - *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'` + *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'` ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; *) ac_file_in="${ac_file}.in" ;; esac @@ -1035,7 +1167,8 @@ for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then echo creating $ac_file rm -f conftest.frag conftest.in conftest.out - cp $ac_given_srcdir/$ac_file_in conftest.in + ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"` + cat $ac_file_inputs > conftest.in EOF @@ -1063,8 +1196,6 @@ EOF # Break up conftest.vals because some shells have a limit on # the size of here documents, and old seds have small limits too. -# Maximum number of lines to put in a single here document. -ac_max_here_lines=12 rm -f conftest.tail while : @@ -1106,7 +1237,11 @@ cat >> $CONFIG_STATUS <<\EOF fi fi; done +EOF +cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF exit 0 EOF diff --git a/flower/configure.in b/flower/configure.in index fd3376dcee..d35ff32bdd 100644 --- a/flower/configure.in +++ b/flower/configure.in @@ -1,15 +1,41 @@ -dnl Process this file with autoconf to produce a configure script. +dnl -*-shell-script-*- +dnl Process this file with autoconf to produce a configure script.- AC_INIT(choleski.cc) AC_LANG_CPLUSPLUS +optimise_b=yes +shared_b=yes +LIB_SUFFIX=.a + +AC_ARG_ENABLE(shared, + [ enable-shared shared flower library], + [shared_b=$enableval]) + +AC_ARG_ENABLE(optimise, + [ disable-optimise optimisations off], + [optimise_b=$enableval]) + +if test $shared_b = yes; then + MODULE_CXXFLAGS="$MODULE_CXXFLAGS -fPIC" + MODULE_LDFLAGS="-shared -Wl,-soname,libflower.so " + LIB_SUFFIX=.so +fi + +if test $optimise_b = yes; then + MODULE_CXXFLAGS="$MODULE_CXXFLAGS -O2 -DSTRING_UTILS_INLINED" +fi + dnl should enable flower specific compile flags. +AC_SUBST(MODULE_CXXFLAGS) +AC_SUBST(MODULE_LDFLAGS) +AC_SUBST(LIB_SUFFIX) AC_PROG_CXX AC_FUNC_MEMCMP AC_FUNC_VPRINTF -AC_CHECK_FUNCS(memmem snprintf foobar) +AC_CHECK_FUNCS(memmem snprintf ) AC_CONFIG_HEADER(out/config.hh:config.hh.in) CXX="$ac_cv_prog_CXX" ../bin/make_version > out/version.hh -AC_OUTPUT() +AC_OUTPUT(out/Flower-flags.make:Flower-flags.make.in) diff --git a/flower/include/string-data.hh b/flower/include/string-data.hh index 318f422f16..c79a6621ba 100644 --- a/flower/include/string-data.hh +++ b/flower/include/string-data.hh @@ -87,7 +87,7 @@ friend class String_handle; #ifndef INLINE #define INLINE inline #endif -#include "string-data.inl" +#include "string-data.icc" #endif diff --git a/flower/include/string-handle.hh b/flower/include/string-handle.hh index 88954cb168..a18fcc28ed 100644 --- a/flower/include/string-handle.hh +++ b/flower/include/string-handle.hh @@ -60,7 +60,7 @@ public: #ifdef STRING_UTILS_INLINED #ifndef INLINE -#define INLINE.iccine +#define INLINE inline #endif #include "string-handle.icc" /* we should be resetting INLINE. oh well. */ diff --git a/flower/test/Makefile b/flower/test/Makefile index 5b6affe77e..3de2bbdc70 100644 --- a/flower/test/Makefile +++ b/flower/test/Makefile @@ -40,8 +40,6 @@ VERSION_DEPENDENCY = # # module compile settings: (not generally needed! # -EXTRA_CFLAGS = -DSTRING_TEST -# # list of distribution files: @@ -50,9 +48,9 @@ EXTRA_DISTFILES = result # list of custom libraries: # -CUSTOMLIBES = $(LIBFLOWER)\ -LOADLIBES += +MODULE_LIBDEPS=check-flower-deps +MODULE_LIBES = -lflower # diff --git a/flower/test/stringtest.cc b/flower/test/stringtest.cc index adf545b172..cc652a5405 100644 --- a/flower/test/stringtest.cc +++ b/flower/test/stringtest.cc @@ -1,4 +1,3 @@ -#ifdef STRING_TEST /* stupid test program to verify stringlib stringtest.cc @@ -127,5 +126,4 @@ main() return 0; } -#endif STRING_TEST diff --git a/init/table_sixteen.ini b/init/table_sixteen.ini index 1767806825..95af77a40a 100644 --- a/init/table_sixteen.ini +++ b/init/table_sixteen.ini @@ -114,6 +114,7 @@ table_sixteen= "linestaf" "\linestafsym{%}{%}" "stem" "\stem{%}{%}" "fill" "\hbox{}" + % ugh. 8pt "crescendosym" "\crescendosym{%}" 0\pt 0\pt -3\pt 3\pt "decrescendosym" "\decrescendosym{%}" 0\pt 0\pt -3\pt 3\pt } diff --git a/input/maartje.ly b/input/maartje.ly index daaa42bffb..f816bb734e 100644 --- a/input/maartje.ly +++ b/input/maartje.ly @@ -13,7 +13,7 @@ globals=\melodic{ \meter {2/4} } -ritme = \staff{ +ritme = \staff{melodicregs globals % rhythmic broken for now % \rhytmic{ @@ -31,7 +31,7 @@ ritme = \staff{ % } } -melody= \staff{ +melody= \staff{melodicregs globals \melodic{ c8\key{fis cis gis} diff --git a/input/martien.ly b/input/martien.ly index 7ae8fe4041..17fdb9895c 100644 --- a/input/martien.ly +++ b/input/martien.ly @@ -7,7 +7,7 @@ % % % The purpose of this file is to demonstrate features of LilyPond; -% respect the copyright. +% respect the copyright. %% VAAG! % % \barnumbering5 % \barnumberstyle\boxed @@ -15,13 +15,13 @@ globalmusic= \melodic{ \meter {2/4} % \key fis - \skip {56*2} + \skip {2*56} % \key bes es as - \skip {8*2} + \skip {2*8} \meter {6/8} - \skip{ 48*8} + \skip{ 8*48} \meter {2/4} - \skip {16*2} + \skip {2*16} % \key fis } @@ -31,10 +31,10 @@ include "mlvio2.ly" include "mlcello.ly" \score{ - \staff{ globalmusic alto } - \staff{ globalmusic violinI } - \staff{ globalmusic violinII } - \staff{ globalmusic cello } + \staff{ melodicregs globalmusic alto } + \staff{melodicregs globalmusic violinI } + \staff{ melodicregs globalmusic violinII } + \staff{ melodicregs globalmusic cello } \paper{ \unitspace 24\mm \width 195\mm diff --git a/input/rhythm.ly b/input/rhythm.ly index d61b04f883..5739294fbf 100644 --- a/input/rhythm.ly +++ b/input/rhythm.ly @@ -4,9 +4,10 @@ % add any impressive examples here, please ritme = \staff { - \rhythmic{ - \partial {1*8} % doesnt' have to be here. - \meter{ 4/4} + melodicregs + \melodic{ %\octave {c} + \partial {8} + \meter{ 4/4} c8 | [a8() a8. a8 a16 a16 a16] c4. | % watch the beams! @@ -16,7 +17,7 @@ ritme = \staff { % divide measure in 5 equal parts. Usually it 2+3 or 3+2 \grouping { 5*16 } [c8 c16 c8 ] | % watch THIS! - \plet{5/4} [c16 c16 c16 c16]\plet{1/1} | + [c16 c16 c16 c16]5/4 | \meter{ 2/8} c4 | c4 c4 c4 c4 @@ -28,22 +29,15 @@ ritme = \staff { % [c16 c16 c16 c16 c16 ] | } - - % - % The \co\mmands section takes the same stuff that \music { } takes; - % the \co\mmands issued below could have been issued inside the above - % \music block; - % - } -another = \staff{ +another = \staff{ melodicregs \melodic{ \meter{ 4/4} c1 c1 c1 c4 c4 c4 c4 \meter{ 4/4} c1 c1 c1 } } -yanother = \staff{ +yanother = \staff{ melodicregs \melodic{ \meter{ 4/4} c1 c1 c1 c4 c4 c4 c4 c1 c1 c1 } diff --git a/input/scales.ly b/input/scales.ly index 1fe1f39875..04e2abc10b 100644 --- a/input/scales.ly +++ b/input/scales.ly @@ -1,12 +1,15 @@ +% +% scales with accents. +% -blah = \staff{ "melodic" +blah = \staff{ melodicregs \melodic { \duration { 8 } \meter {6/8} \octave{ c } - |[ a cr a a a a a a a rc a ]6/9 + |[ a cr a a a a a a a rc a ff decr ]6/9 \octave{ c } - |[ a decr a a a a a a a rc a ]6/9 + |[ a a a a a a a a rc a ]6/9 \octave { c' } [ 'c 'g d a e' b' f'' c''' g''' ]6/9 [ g''' c''' f'' b' e' a d 'g 'c ]6/9 @@ -23,7 +26,7 @@ blah = \staff{ "melodic" [ d' g c ]2/3 [ f c' g' ]2/3 [ g' c' f ]2/3 - [ g' c' f ]2/3 + [ g' c' f ]2/3 \meter {4/4} c1 diff --git a/lib/Makefile b/lib/Makefile index 497b93d8a8..b156a10b1a 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -41,10 +41,6 @@ DISTFILES = Makefile $(ALL_SOURCES) # # list of custom libraries: -# -# yes, i know about the -L and -l options, -# but these libraries get rebuild when needed. -CUSTOMLIBES = \ LOADLIBES += # @@ -54,7 +50,7 @@ LOADLIBES += # MAINTARGET = $(EXECUTABLE) # MAINTARGET = $(LIBRARY) # MAINTARGET = $(bindir)/$(EXECUTABLE)# huh? -MAINTARGET = $(libdir)/$(LIBRARY)# huh? +MAINTARGET = $(outdir)/$(LIBRARY)# huh? default: $(MAINTARGET) # diff --git a/lib/duration-convert.cc b/lib/duration-convert.cc index 8ec7e2527d..48f251fb97 100644 --- a/lib/duration-convert.cc +++ b/lib/duration-convert.cc @@ -198,7 +198,7 @@ Duration_convert::ticks2standardised_dur( int ticks_i ) if ( mom == upper_mom ) // don-t miss last (sic) return upper_dur; if ( ( mom >= lower_mom ) && ( mom <= upper_mom ) ) { - warning( String( "duration not exact: " ) + String( (Real)mom ), 0 ); + warning( String( "duration not exact: " ) + String( (Real)mom ) ); if ( abs( mom - lower_mom ) < abs( mom - upper_mom ) ) return lower_dur; else diff --git a/lib/includable-lexer.cc b/lib/includable-lexer.cc index f394907823..2f8d33f461 100644 --- a/lib/includable-lexer.cc +++ b/lib/includable-lexer.cc @@ -35,7 +35,7 @@ Includable_lexer::new_input(String s, Sources * global_sources) } /** pop the inputstack. conceptually this is a destructor, but it - does not destruct the Source_file it creates. */ + does not destruct the Source_file that Includable_lexer::new_input creates. */ bool Includable_lexer::close_input() { @@ -75,3 +75,9 @@ Includable_lexer::add_lexed_char(int count) { char_count_stack_.top() += count; } + +Source_file* +Includable_lexer::source_file_l()const +{ + return include_stack_.top(); +} diff --git a/lib/include/debug.hh b/lib/include/debug.hh index 7870a0da03..b3b786172d 100644 --- a/lib/include/debug.hh +++ b/lib/include/debug.hh @@ -11,13 +11,8 @@ #include "real.hh" #include "proto.hh" -void message( String message_str, char const* context_ch_c_l ); -void warning( String message_str, char const* context_ch_c_l ); void warning( String message_str ); -void error( String message_str, char const* context_ch_c_l ); - void error( String message_str); -void error(String s); // errors void error_t(const String& s, Time_description const & t_tdes); void error_t(String const &s, const Moment &when); // warnings diff --git a/lib/include/includable-lexer.hh b/lib/include/includable-lexer.hh index 3a076181a4..a5416ef45a 100644 --- a/lib/include/includable-lexer.hh +++ b/lib/include/includable-lexer.hh @@ -28,6 +28,7 @@ protected: Array include_stack_; Array char_count_stack_; public: + Source_file* source_file_l()const; void new_input(String s,Sources*); Includable_lexer(); ~Includable_lexer(); diff --git a/lib/include/input.hh b/lib/include/input.hh index 80ab11a1bb..180baf170b 100644 --- a/lib/include/input.hh +++ b/lib/include/input.hh @@ -15,11 +15,17 @@ */ class Input { char const *defined_ch_C_ ; - + Source_file * source_file_l_; public: - set_spot(char const *); - Input(char const *); - Input(Input const &); + + void warning(String)const; // should use member func? + void error(String)const; + void message(String)const; + void set_spot(Input const &); + + String location_str()const; + Input(Source_file*, char const*); + Input(); }; #endif // INPUT_HH diff --git a/lily/input.cc b/lib/input.cc similarity index 56% rename from lily/input.cc rename to lib/input.cc index 1ff4e86244..de341811bf 100644 --- a/lily/input.cc +++ b/lib/input.cc @@ -11,21 +11,21 @@ #include "source.hh" #include "source-file.hh" -Input::Input(Sources*s, char const *cl) +Input::Input(Source_file*s, char const *cl) { - sources_l_=s; + source_file_l_=s; defined_ch_C_=cl; } Input::Input() { - sources_l_ = 0; + source_file_l_ = 0; defined_ch_C_ = 0; } Input::Input(Input const &s) { - sources_l_ = s.sources_l_; + source_file_l_ = s.source_file_l_; defined_ch_C_ = s.defined_ch_C_; } @@ -39,24 +39,16 @@ void Input::message(String message_str)const { String str = ""; - Source_file* sourcefile_l=0; - if (sources_l_) - sourcefile_l = sources_l_->sourcefile_l( defined_ch_C_ ); - - if ( sourcefile_l ) { - str += sourcefile_l->file_line_no_str(defined_ch_C_) + String(": "); + if ( source_file_l_ ) { + str += source_file_l_->file_line_no_str(defined_ch_C_) + String(": "); } str += message_str; - if ( sourcefile_l ) { + if ( source_file_l_ ) { str += ":\n"; - str += sourcefile_l->error_str( defined_ch_C_); + str += source_file_l_->error_str( defined_ch_C_); } - /* - if ( busy_parsing() ) - cerr << endl; - */ cerr << str << endl; } @@ -75,11 +67,8 @@ Input::error(String s)const String Input::location_str()const { - Source_file * sourcefile_l=0; - if (sources_l_) - sourcefile_l = sources_l_->sourcefile_l (defined_ch_C_); - if (sourcefile_l) - return sourcefile_l->file_line_no_str(defined_ch_C_); + if (source_file_l_) + return source_file_l_->file_line_no_str(defined_ch_C_); else return "(location unknown)"; } diff --git a/lib/source-file.cc b/lib/source-file.cc index 43fe9c53a3..a9af630686 100644 --- a/lib/source-file.cc +++ b/lib/source-file.cc @@ -153,7 +153,7 @@ Source_file::map() data_caddr_ = (caddr_t)mmap( (void*)0, size_off_, PROT_READ, MAP_SHARED, fildes_i_, 0 ); if ( (int)data_caddr_ == -1 ) - warning( String( "can't map: " ) + name_str_ + String( ": " ) + strerror( errno ), 0 ); + warning( String( "can't map: " ) + name_str_ + String( ": " ) + strerror( errno )); } String @@ -168,7 +168,7 @@ Source_file::open() fildes_i_ = ::open( name_str_, O_RDONLY ); if ( fildes_i_ == -1 ) { - warning( String( "can't open: " ) + name_str_ + String( ": " ) + strerror( errno ), 0); + warning( String( "can't open: " ) + name_str_ + String( ": " ) + strerror( errno )); return; } diff --git a/lily/.version b/lily/.version index 44ee82c2f9..06a9091689 100644 --- a/lily/.version +++ b/lily/.version @@ -1,7 +1,7 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 46 +PATCH_LEVEL = 47 # use to send patches, always empty for released version: # include separator: ".postfix", "-pl" makes rpm barf -MY_PATCH_LEVEL = .jcn1 +MY_PATCH_LEVEL = diff --git a/lily/Makefile b/lily/Makefile index 583becb8e8..9d63dbc469 100644 --- a/lily/Makefile +++ b/lily/Makefile @@ -14,10 +14,10 @@ depth = .. # generic variables: # +include Stable.make include ./$(depth)/make/Variables.make include ./$(depth)/make/Files.make include .version -include Stable.make # # identify module: @@ -39,11 +39,9 @@ EXTRA_DISTFILES = .version # list of custom libraries: # -# yes, i know about the -L and -l options, -# but these libraries get rebuilt when needed. -CUSTOMLIBES = $(LIBLILY) $(LIBFLOWER) +MODULE_LIBDEPS= check-flower-deps check-lily-deps +MODULE_LIBES= -llily -lflower -LOADLIBES += # # main target of this module: diff --git a/lily/crescendo.cc b/lily/crescendo.cc index 163e3be737..e8a36e29a8 100644 --- a/lily/crescendo.cc +++ b/lily/crescendo.cc @@ -48,7 +48,9 @@ Crescendo::brew_molecule_p() const return m_p ; Symbol s( paper()->lookup_l()->hairpin(w_dim, grow_dir_i_ < 0) ); m_p->add(Atom(s)); int pos = (dir_i_ >0) ? staff_size_i_ + 4 : - 4 ; - m_p->translate(Offset(0,pos * paper()->internote())); + if(dir_i_<0 ) // should do something better anyway. + m_p->translate(Offset(0, -m_p->extent().y.left )); + m_p->translate(Offset(x_off_dim,pos * paper()->internote())); } IMPLEMENT_STATIC_NAME(Crescendo); diff --git a/lily/include/input.hh b/lily/include/input.hh deleted file mode 100644 index 8677daa116..0000000000 --- a/lily/include/input.hh +++ /dev/null @@ -1,32 +0,0 @@ -/* - input.hh -- declare Input - - source file of the LilyPond music typesetter - - (c) 1997 Han-Wen Nienhuys -*/ - - -#ifndef INPUT_HH -#define INPUT_HH - -/** - Base class for anything that records its poisition in the parse file. - */ -class Input { - char const *defined_ch_C_ ; - Sources * sources_l_; -public: - - void warning(String)const; // should use member func? - void error(String)const; - void message(String)const; - void set_spot(Input const &); - void set_sources(Sources *); - - String location_str()const; - Input(Sources *,char const*); - Input(); -}; - -#endif // INPUT_HH diff --git a/lily/include/time-description.hh b/lily/include/time-description.hh index 16ea5c5f14..1bfd5820e6 100644 --- a/lily/include/time-description.hh +++ b/lily/include/time-description.hh @@ -37,9 +37,10 @@ struct Time_description { String str()const; void print() const; void setpartial(Moment p); + String try_set_partial_str(Moment)const; Moment barleft(); void set_meter(int,int); - static int compare (Time_description&, Time_description&); + static int compare (const Time_description&, const Time_description&); }; #include "compare.hh" diff --git a/lily/lexer.l b/lily/lexer.l index 560b49da11..9ecc6f9e4d 100644 --- a/lily/lexer.l +++ b/lily/lexer.l @@ -75,7 +75,6 @@ include { String s (YYText()+1); s = s.left_str(s.length_i()-1); mtor << "#include `" << s << "\'\n"; -// defined_ch_C = here_ch_C() - String( YYText() ).length_i() - 1; new_input(s,source_l_g); yy_pop_state(); } @@ -231,7 +230,7 @@ include { } <*>. { - error( String( "illegal character: " ) + String( YYText()[0] ), here_ch_C() ); + LexerError( String( "illegal character: " ) +String( YYText()[0] )); return YYText()[0]; } diff --git a/lily/local-key-reg.cc b/lily/local-key-reg.cc index 876a0ecf01..308a7ac432 100644 --- a/lily/local-key-reg.cc +++ b/lily/local-key-reg.cc @@ -64,7 +64,7 @@ Local_key_register::process_requests() if (key_C_) local_key_.reset(*key_C_); else if( time_C_->when_ >Moment(0)) - warning ("Help me! can't figure current key", (const char*)0); + warning ("Help me! can't figure current key"); } } IMPLEMENT_STATIC_NAME(Local_key_register); diff --git a/lily/my-lily-lexer.cc b/lily/my-lily-lexer.cc index 2bb88b7448..6ff46f282c 100644 --- a/lily/my-lily-lexer.cc +++ b/lily/my-lily-lexer.cc @@ -128,15 +128,13 @@ My_lily_lexer::LexerError(char const *s) if (include_stack_.empty()) { *mlog << "error at EOF" << s << '\n'; } else { - char const* ch_C = here_ch_C(); - if ( ch_C ) { - ch_C--; - while (isspace(*ch_C == ' ' )) - ch_C--; - ch_C++; - } errorlevel_i_ |= 1; - error( s, ch_C ); + error(String(s)); + // FIXME. +/*Input spot(source_l_g = here_spot(); + + spot.error( s ); + */ } } diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index 0696d91912..0463a9d077 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -210,7 +210,7 @@ My_lily_parser::My_lily_parser(Sources * source_l) source_l_ = source_l; lexer_p_ = 0; default_duration_.type_i_ = 4; - default_octave_i_ = 3; // retain old default + default_octave_i_ = 0; textstyle_str_="roman"; // in lexer? error_level_i_ = 0; last_duration_mode = false; @@ -239,5 +239,6 @@ My_lily_parser::pop_spot() Input My_lily_parser::here_input()const { - return Input(source_l_, here_ch_C()); + Source_file * f_l= lexer_p_->source_file_l(); + return Input(f_l, here_ch_C()); } diff --git a/lily/staff-walker.cc b/lily/staff-walker.cc index ea37d9d63e..8dbc6f4a1a 100644 --- a/lily/staff-walker.cc +++ b/lily/staff-walker.cc @@ -71,7 +71,12 @@ Staff_walker::process_timing_reqs() for (int i=0; i < ptr()->timing_req_l_arr_.size(); i++) { Timing_req * tr_l = ptr()->timing_req_l_arr_[i]; if (tr_l->partial()) { - time_.setpartial(tr_l->partial()->duration_); + Moment m = tr_l->partial()->duration_; + String error = time_.try_set_partial_str(m); + if (error != "") { + tr_l->warning(error); + } else + time_.setpartial(m); } else if (tr_l->barcheck() && time_.whole_in_measure_) { tr_l ->warning( "Barcheck failed"); } else if (tr_l->cadenza()) { diff --git a/lily/text-item.cc b/lily/text-item.cc index 2171a81d24..817dc6a3b7 100644 --- a/lily/text-item.cc +++ b/lily/text-item.cc @@ -49,7 +49,7 @@ Text_item::Text_item(Text_req* treq_l, int staffsize_i) void Text_item::set_default_index() { - pos_i_ = (dir_i_ > 0) ? staffsize_i_ + 2: -4; + pos_i_ = (dir_i_ > 0) ? staffsize_i_ + 4: -4; } void @@ -63,10 +63,10 @@ Molecule* Text_item::brew_molecule_p() const { Molecule* mol_p = new Molecule(tdef_p_->create_atom(paper())); - mol_p->translate(Offset(0, pos_i_ * paper()->internote())); - if(dir_i_<0) - mol_p->translate(Offset(0, -mol_p->extent().y.length() )); + if(dir_i_<0 ) // should do something better anyway. + mol_p->translate(Offset(0, -mol_p->extent().y.left )); + mol_p->translate(Offset(0, pos_i_ * paper()->internote())); return mol_p; } diff --git a/lily/time-description.cc b/lily/time-description.cc index 2266b61b33..44d9b3d5e9 100644 --- a/lily/time-description.cc +++ b/lily/time-description.cc @@ -46,7 +46,7 @@ Time_description::set_cadenza(bool b) { if (cadenza_b_ && !b) { if (whole_in_measure_) { - bars_i_ ++; + bars_i_ ++; // should do? whole_in_measure_ = 0; } } @@ -90,13 +90,27 @@ Time_description::allow_meter_change_b() { return!(whole_in_measure_); } + +/** + retrieve error messages. + @return + error messages if not possible, "" if possible + */ +String +Time_description::try_set_partial_str(Moment p)const +{ + if (when_) + return ("Partial measure only allowed at beginning."); + if (p whole_per_measure_) + return ("Partial measure too large"); + return ""; +} + void Time_description::setpartial(Moment p) { - if (when_) - error_t ("Partial measure only allowed at beginning.", *this); - if (p whole_per_measure_) - error_t ("Partial measure has incorrect size", *this); whole_in_measure_ = whole_per_measure_ - p; } @@ -108,7 +122,7 @@ Time_description::barleft() } int -Time_description::compare(Time_description &t1, Time_description&t2) +Time_description::compare(Time_description const &t1, Time_description const&t2) { int i = sign(t1.when_-t2.when_); diff --git a/lily/warn.cc b/lily/warn.cc index 4240aa04b5..08c8b52696 100644 --- a/lily/warn.cc +++ b/lily/warn.cc @@ -44,51 +44,15 @@ error_t(String const & s, Time_description const &t_tdes) error(e); } -void -message( String message_str, char const* context_ch_C ) -{ - String str = ""; - Source_file* sourcefile_l = source_l_g->sourcefile_l( context_ch_C ); - if ( sourcefile_l ) { - str += sourcefile_l->file_line_no_str(context_ch_C) + String(": "); - } - str += message_str; - if ( sourcefile_l ) { - str += ":\n"; - str += sourcefile_l->error_str( context_ch_C ); - } - if ( busy_parsing() ) - cerr << endl; - cerr << str << endl; -} - -void -warning( String message_str, char const* context_ch_C ) -{ - message( "warning: " + message_str, context_ch_C ); -} - -void -error( String message_str, char const* context_ch_C ) -{ - message( message_str, context_ch_C ); - // since when exits error again? - // i-d say: error: errorlevel |= 1; -> no output upon error - // warning: recovery -> output (possibly wrong) -/* if ( lexer ) - lexer->errorlevel_i_ |= 1;*/ -// exit( 1 ); -} - - void warning(String m) { - warning(m, (char*)0); + cerr << "warning" < -# Han-Wen Nienhuys - # list of c++ header files: # HHFILES = $(wildcard *.hh) @@ -20,21 +10,19 @@ INLFILES = $(wildcard *.icc) # list of c++ template files: # + TCCFILES = $(wildcard *.tcc) -# -# list plain c++ source files: -# -CCFILES = $(wildcard *.cc) # - # list of other source files: # + EXTRA_SOURCE_FILES = $(wildcard *.y *.l) -# +# PODFILES = $(wildcard *.pod) +CCFILES = $(wildcard *.cc) MAKEFILES = $(wildcard *.make) ALL_SOURCES=$(HHFILES) $(CCFILES) $(EXTRA_SOURCE_FILES) $(INLFILES) \ diff --git a/make/Rules.make b/make/Rules.make index b7ec413b65..1b01a3ed27 100644 --- a/make/Rules.make +++ b/make/Rules.make @@ -9,15 +9,11 @@ # this is supposed to clear all suffixes: .SUFFIXES: + # so why does make still consider xx.y : RCS/xx.y,v ? # there is no suffix ,v anymore! -.SUFFIXES: .cc .o .hh .y .l .pod .txt .1 .dep +.SUFFIXES: .cc .o .hh .y .l .pod .txt .1 .dep .html -# cancel implicit rules: -# -# shit, how to get rid of these stupid built-in rules? -# include ./$(depth)/make/Builtin-rules.make -# # compile rules: # @@ -48,6 +44,10 @@ $(outdir)/%.text: $(outdir)/%.1 $(depth)/%.text: $(outdir)/%.text cp $< $@ +$(outdir)/%.html: %.pod + $(pod2html) $< + mv $(notdir $@) $(outdir)/ + $(outdir)/%.5: %.pod $(pod2groff) $(outdir)/%.1: %.pod diff --git a/make/Targets.make b/make/Targets.make index 2ab80134ca..964bf1c257 100644 --- a/make/Targets.make +++ b/make/Targets.make @@ -7,7 +7,7 @@ # Jan Nieuwenhuizen # Han-Wen Nienhuys -.PHONY : all clean config default dist doc doc++ dummy exe help lib TAGS +.PHONY : all clean config default dist doc doc++ dummy exe help lib TAGS html # target all: # @@ -29,7 +29,7 @@ include ./$(depth)/make/out/Site.make # dependency list of executable: # EXECUTABLE = $(lily_bindir)/$(NAME) -$(EXECUTABLE): $(build) $(OFILES) $(CUSTOMLIBES) +$(EXECUTABLE): $(build) $(OFILES) $(MODULE_LIBDEPS) $(INCREASE_BUILD) $(MAKE) -S $(OFILES) $(SILENT_LOG) ifdef STABLEOBS @@ -45,14 +45,19 @@ $(build): $(depth)/.version # dependency list of library: # -LIBRARY = $(libdir)/$(LIB_PREFIX)$(NAME)$(LIB_SUFFIX) -$(LIBRARY): $(build) $(OFILES) $(CUSTOMLIBES) +LIBRARY = $(outdir)/$(LIB_PREFIX)$(NAME).a +$(LIBRARY): $(build) $(OFILES) $(MODULE_LIBDEPS) $(INCREASE_BUILD) $(MAKE) $(OFILES) $(SILENT_LOG) $(AR_COMMAND) $(OFILES) $(RANLIB_COMMAND) - +SHAREDLIBRARY=$(outdir)/$(LIB_PREFIX)$(NAME).so +$(SHAREDLIBRARY): $(build) $(OFILES) $(MODULE_LIBDEPS) + $(INCREASE_BUILD) + $(MAKE) $(OFILES) $(SILENT_LOG) + $(LD_COMMAND) $(OFILES) -o $@ +# ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $(outdir)/$(LIB_PREFIX)$(NAME).so # lib: $(LIBRARY) # @@ -187,7 +192,7 @@ localuninstall: $(LIBFLOWER): check-flower-deps check-flower-deps: - $(MAKE) -C $(depth)/flower/ $(outdir)/$(notdir $(LIBFLOWER)) + $(MAKE) -C $(depth)/flower/ default check-lily-deps: check-flower-deps $(MAKE) -C $(depth)/lib @@ -204,7 +209,8 @@ $(LIBLILY): dummy #rpm: dist # mv ./$(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources) rpm: - cp ./$(depth)/../releases/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources) + make -C ./$(depth) dist + cp $(depth)/lilypond-$(TOPLEVEL_VERSION).tar.gz $(rpm-sources) cp $(doc-dir)/*.gif $(rpm-sources) $(MAKE) -C $(make-dir) spec rpm -ba $(makeout)/lilypond.spec diff --git a/make/User.make b/make/User.make index 2a9fd5e36f..2e74e16170 100644 --- a/make/User.make +++ b/make/User.make @@ -7,30 +7,9 @@ # Jan Nieuwenhuizen # Han-Wen Nienhuys -# this still sux # will be split into CFLAGS/EXTRA_CFLAGS etc, # so that defineable generically and per module -# you-re using a i386, eh? -# -#PROFILEFLAG=-pg -# - -# optimization and debugging: -# -# if defined (=not commented-out), debugging flag is ignored! -OPTIFLAG=-DNDEBUG -DNPRINT -O2 -# -DEBUGFLAG=-g -# - -# turn off -pipe if linker doesn't support it -# -# USER_CXXFLAGS=-pipe -Wall -W -Wmissing-prototypes -# added two warnings that are treated by cygwin32's gcc 2.7.2 as errors. -# huh, but still, no warnings even provoced with linux's gcc 2.7.2.1? -USER_CXXFLAGS=-pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion - # # -lefence = ElectricFence. # diff --git a/make/Variables.make b/make/Variables.make index 8c3ab6f497..5ed24ca44e 100644 --- a/make/Variables.make +++ b/make/Variables.make @@ -2,8 +2,11 @@ # project LilyPond -- the musical typesetter # title generic variables # file make/Variables.make -# abstract do not change this file for site-wide extensions; -# please edit settings in User.make +# abstract +# +# do not change this file for site-wide extensions; please use +# make/out/Site.make; +# Any change in files in this directory (make/) would be distributed. # # Copyright (c) 1997 by # Jan Nieuwenhuizen @@ -33,7 +36,6 @@ module-distdir = ./$(depth)/$(MODULE_DIST_NAME) depdir = $(outdir) flowerout = ./$(depth)/flower/$(outdir) libout = ./$(depth)/lib/$(outdir) -libdir = $(outdir) lilyout = ./$(depth)/lily/$(outdir) mi2muout = ./$(depth)/mi2mu/$(outdir) makeout = ./$(depth)/make/$(outdir) @@ -81,7 +83,7 @@ OFILEC = $(SOURCE_FILES:.c=.o) OFILECC = $(OFILEC:.cc=.o) OFILEL = $(OFILECC:.l=.o) OFILEY = $(OFILEL:.y=.o) -OFILES = $(patsubst %,$(outdir)/%,$(OFILEY)) +OFILES = $(addprefix $(outdir)/,$(OFILEY)) # # dummydeps @@ -102,7 +104,7 @@ allexe = $(lily_bindir)/lilypond $(lily_bindir)/mi2mu allhh := $(shell $(FIND) -name "*.hh" $(ERROR_LOG)) allcc := $(shell $(FIND) -name "*.cc" $(ERROR_LOG)) allobs := $(shell $(FIND) $(outdir) -name "*.o" $(ERROR_LOG)) -allibs := $(shell $(FIND) $(libdir) -name "*.lib" $(ERROR_LOG)) + alldeps := $(shell $(FIND) $(outdir) -name "*.dep" $(ERROR_LOG)) # version stuff: @@ -122,11 +124,17 @@ LIBLILY = $(depth)/lib/$(outdir)/$(LIB_PREFIX)lily$(LIB_SUFFIX) # ARFLAGS = ru CFLAGS = $(DEFINES) $(INCLUDES) $(USER_CFLAGS) $(EXTRA_CFLAGS) -CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) + +# added two warnings that are treated by cygwin32's gcc 2.7.2 as errors. +# huh, but still, no warnings even provoced with linux's gcc 2.7.2.1? +EXTRA_CXXFLAGS=-pipe -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wconversion + + +CXXFLAGS = $(CFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS) INCLUDES = -Iinclude -I$(outdir) -I$(include-lib) -I$(libout) -I$(include-flower) -I$(flowerout) CXX_OUTPUT_OPTION = $< -o $@ -LDFLAGS = $(EXTRA_LDFLAGS) -LOADLIBES = $(EXTRA_LIBES) $(CUSTOMLIBES) -lg++ # need lg++ for win32, really! +LDFLAGS = $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) -L $(depth)/lib/out -L $(depth)/flower/out +LOADLIBES = $(EXTRA_LIBES) $(MODULE_LIBES) -lg++ # need lg++ for win32, really! # # librarian: @@ -166,7 +174,11 @@ DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)" # EXECUTABLE = $(NAME)$(EXE) LIB_PREFIX = lib + +ifndef LIB_SUFFIX LIB_SUFFIX = .a +endif + LIBRARY = $(LIB_PREFIX)$(NAME)$(LIB_SUFFIX) # @@ -176,13 +188,20 @@ DISTFILES=$(EXTRA_DISTFILES) Makefile $(ALL_SOURCES) DOCDIR=$(depth)/$(outdir) # .hh should be first. Don't know why +# take some trouble to auto sources and obsolete stuff. progdocs=$(shell find -name '*.hh' |egrep -v 'obsolete/|out/') $(shell find -name '*.cc'|egrep -v 'out/|obsolete/') + + +pod2html=pod2html pod2groff=pod2man --center="LilyPond documentation" --section="0"\ --release="LilyPond $(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)" $< > $@ + + STRIP=strip --strip-debug ifdef stablecc STABLEOBS=$(addprefix $(outdir)/,$(stablecc:.cc=.o)) endif -stablecc= + +# substitute $(STRIP) if you want stripping DO_STRIP=true diff --git a/mi2mu/Makefile b/mi2mu/Makefile index 235504e660..901111dd24 100644 --- a/mi2mu/Makefile +++ b/mi2mu/Makefile @@ -46,11 +46,8 @@ DISTFILES = Makefile .version $(ALL_SOURCES) # list of custom libraries: # -# yes, i know about the -L and -l options, -# but these libraries get rebuild when needed. -CUSTOMLIBES = $(LIBLILY) $(LIBFLOWER) - -LOADLIBES += +MODULE_LIBDEPS=check-flower-deps check-lily-deps +MODULE_LIBES=-llily -lflower # # main target of this module: -- 2.39.2