From 9a7a808b7c7abcacd08f4c992f75394cc4543d2e Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 16 Mar 2003 14:59:09 +0000 Subject: [PATCH] * stepmake/stepmake/omf-targets.make (local-install): add scrollkeeper-update message. * scripts/lilypond-book.py (lilypond_binary): explicity add path to binary. (TexiPaper.process_ly2dvi_block): idem for ly2dvi * scripts/ly2dvi.py (lilypond_binary): explicity add path to binary. --- ChangeLog | 8 ++++++++ GNUmakefile.in | 5 +---- make/lilypond.redhat.spec.in | 2 +- make/substitute.make | 1 + python/lilylib.py | 2 ++ scripts/lilypond-book.py | 23 +++++++++++++++++++---- scripts/ly2dvi.py | 16 +++++++++++----- stepmake/stepmake/omf-targets.make | 1 + 8 files changed, 44 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3ebd4ba3bc..b0c57d4c1b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2003-03-16 Han-Wen Nienhuys + * stepmake/stepmake/omf-targets.make (local-install): add + scrollkeeper-update message. + + * scripts/lilypond-book.py (lilypond_binary): explicity add path to binary. + (TexiPaper.process_ly2dvi_block): idem for ly2dvi + + * scripts/ly2dvi.py (lilypond_binary): explicity add path to binary. + * Documentation/user/converters.itely (Invoking midi2ly): add track/channel notice. diff --git a/GNUmakefile.in b/GNUmakefile.in index 26eff5fc19..93609bb701 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -54,16 +54,13 @@ web-doc: web-reqs pfa-fonts: $(MAKE) MAKE_PFA_FILES=1 -C mf - -web-doc-install: web-doc top-web +install-html-doc: web-doc top-web $(INSTALL) -m 755 -d $(local_package_docdir) tar -C $(local_package_docdir)/ -xzf $(outdir)/web.tar.gz - # KPATHSEA=0: Hack for compiling without kpathsea -- not recommended my_tfm_path = $(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp - local-install: $(INSTALL) -d $(local_lilypond_datadir) ifeq ($(KPATHSEA),0) diff --git a/make/lilypond.redhat.spec.in b/make/lilypond.redhat.spec.in index 07176b3d8e..c5a342153f 100644 --- a/make/lilypond.redhat.spec.in +++ b/make/lilypond.redhat.spec.in @@ -79,7 +79,7 @@ mkdir -p $RPM_BUILD_ROOT/etc/profile.d cp buildscripts/out/lilypond-profile $RPM_BUILD_ROOT/etc/profile.d/lilypond.sh cp buildscripts/out/lilypond-login $RPM_BUILD_ROOT/etc/profile.d/lilypond.csh -make prefix="$RPM_BUILD_ROOT%{_prefix}" web-doc-install +make prefix="$RPM_BUILD_ROOT%{_prefix}" install-html-doc make -C Documentation/user/ prefix="$RPM_BUILD_ROOT%{_prefix}" omf-install diff --git a/make/substitute.make b/make/substitute.make index 3ffbd9bb29..21f626ea3a 100644 --- a/make/substitute.make +++ b/make/substitute.make @@ -9,6 +9,7 @@ ATVARIABLES = \ DATE\ sharedstatedir\ GUILE\ + bindir\ date\ datadir\ lilypond_datadir\ diff --git a/python/lilylib.py b/python/lilylib.py index 49078c5ab2..173d5d60cf 100644 --- a/python/lilylib.py +++ b/python/lilylib.py @@ -39,6 +39,8 @@ if os.environ.has_key ('LILYPONDPREFIX') : sys.path.insert (0, os.path.join (datadir, 'python')) + + # Customize these if __name__ == '__main__': import lilylib as ly diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index bb217b0b93..e9560f3684 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -138,8 +138,22 @@ option_definitions = [ include_path = [os.getcwd ()] -lilypond_cmd = 'lilypond' -#lilypond_cmd = 'valgrind --suppressions=/home/hanwen/usr/src/guile-1.6.supp --num-callers=10 /home/hanwen/usr/src/lilypond/lily/out/lilypond' +#lilypond_binary = 'valgrind --suppressions=/home/hanwen/usr/src/guile-1.6.supp --num-callers=10 /home/hanwen/usr/src/lilypond/lily/out/lilypond' + +lilypond_binary = os.path.join ('@bindir@', 'lilypond') + +# only use installed binary when we're installed too. +if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary): + lilypond_binary = 'lilypond' + + + +ly2dvi_binary = os.path.join ('@bindir@', 'ly2dvi') + +# only use installed binary when we're installed too. +if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary): + lilypond_binary = 'ly2dvi' + g_extra_opts = '' @@ -1151,7 +1165,8 @@ linking to the menu. preview = base + ".png" if changed or not os.path.isfile (preview): - ly.system ('ly2dvi --preview --postscript --verbose %s ' % base) + + ly.system ('%s --preview --postscript --verbose %s ' % (ly2dvi_binary, base) ) ly.make_page_images (base) ly.system ('gzip -9 - < %s.ps > %s.ps.gz' % (base, base)) @@ -1264,7 +1279,7 @@ def compile_all_files (chunks): lilyopts += ' --dep-prefix=' + g_outdir + '/' lilyopts += ' --header=texidoc' texfiles = string.join (tex) - cmd = string.join ((lilypond_cmd, lilyopts, g_extra_opts, + cmd = string.join ((lilypond_binary, lilyopts, g_extra_opts, texfiles)) ly.system (cmd, ignore_error = 0, progress_p = 1) diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 7b8c519955..8c418aa6c8 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -156,9 +156,13 @@ pdftex_p = 0 latex_cmd = 'latex' tex_extension = '.tex' -# Debugging support -- do we need this? -lilypond_cmd = 'lilypond' -#lilypond_cmd = 'valgrind --suppressions=%(home)s/usr/src/guile-1.6.supp --num-callers=10 %(home)s/usr/src/lilypond/lily/out/lilypond '% { 'home' : '/home/hanwen' } +#lilypond_binary = 'valgrind --suppressions=%(home)s/usr/src/guile-1.6.supp --num-callers=10 %(home)s/usr/src/lilypond/lily/out/lilypond '% { 'home' : '/home/hanwen' } + +lilypond_binary = os.path.join ('@bindir@', 'lilypond') + +# only use installed binary when we're installed too. +if '@bindir@' == ('@' + 'bindir@') or not os.path.exists (lilypond_binary): + lilypond_binary = 'lilypond' layout_fields = ['dedication', 'title', 'subtitle', 'subsubtitle', @@ -249,7 +253,7 @@ def run_lilypond (files, dep_prefix): if debug_p: ly.print_environment () - cmd = string.join ((lilypond_cmd,opts, fs)) + cmd = string.join ((lilypond_binary, opts, fs)) status = ly.system (cmd, ignore_error = 1, progress_p = 1) signal = 0x0f & status exit_status = status >> 8 @@ -668,10 +672,12 @@ for opt in options: pdftex_p = 1 tex_extension = '.pdftex' elif o == '--warranty' or o == '-w': - status = os.system ('lilypond -w') + status = os.system ('%s -w' % lilypond_binary) if status: ly.warranty () sys.exit (0) + else: + unimplemented_option () # signal programming error # Don't convert input files to abspath, rather prepend '.' to include # path. diff --git a/stepmake/stepmake/omf-targets.make b/stepmake/stepmake/omf-targets.make index c96cc788ae..fa82e1a64d 100644 --- a/stepmake/stepmake/omf-targets.make +++ b/stepmake/stepmake/omf-targets.make @@ -4,5 +4,6 @@ omf: $(OMF_FILES) omf-local-install: $(OMF_FILES) $(foreach a, $(OMF_FILES), $(INSTALL) $(a) $(local_package_omfdir)/$(notdir $(a)) && ) true + @echo "Run scrollkeeper-update to register newly installed OMF files." local-install: omf-local-install -- 2.39.2