From e1d47884955f31275ebb0972a08efd1d9d0457dc Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Sat, 28 Dec 2002 11:57:33 +0000 Subject: [PATCH] * .cvsignore: Remove stepmake (huh!?!), add lib. * GNUmakefile.in: Add libdir links for builddir runs. * scripts/midi2ly.py: Add [lilypond_]libdir/python to path, instead of datadir. * make/substitute.make (ATVARIABLES): Add lilypond_libdir, local_lilypond_libdir. * config.make.in (lilypond_libdir): Add. * stepmake/stepmake/substitute-rules.make: * stepmake/stepmake/script-rules.make: * stepmake/stepmake/python-module-rules.make: * stepmake/aclocal.m4 (STEPMAKE_LIBDIR): Fixes from lilypond-python-module patch. --- .cvsignore | 2 +- ChangeLog | 20 +++++++++++++++++++ GNUmakefile.in | 6 +++--- aclocal.m4 | 11 +++++------ config.make.in | 1 + make/substitute.make | 2 ++ scripts/midi2ly.py | 23 ++++++++++------------ stepmake/aclocal.m4 | 9 ++++----- stepmake/stepmake/python-module-rules.make | 2 +- stepmake/stepmake/script-rules.make | 12 +++++------ stepmake/stepmake/substitute-rules.make | 2 +- 11 files changed, 54 insertions(+), 36 deletions(-) diff --git a/.cvsignore b/.cvsignore index 87d0512e9a..0aa598fe7c 100644 --- a/.cvsignore +++ b/.cvsignore @@ -28,12 +28,12 @@ config.make config.status configure fonts +lib log ls-R ly2dvi.dir out out-www share -stepmake tfm tfm.[0-9] diff --git a/ChangeLog b/ChangeLog index 09cf84a4e1..6f47262803 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,23 @@ +2002-12-28 Jan Nieuwenhuizen + + * .cvsignore: Remove stepmake (huh!?!), add lib. + + * GNUmakefile.in: Add libdir links for builddir runs. + + * scripts/midi2ly.py: Add [lilypond_]libdir/python to path, + instead of datadir. + + * make/substitute.make (ATVARIABLES): Add lilypond_libdir, + local_lilypond_libdir. + + * config.make.in (lilypond_libdir): Add. + + * stepmake/stepmake/substitute-rules.make: + * stepmake/stepmake/script-rules.make: + * stepmake/stepmake/python-module-rules.make: + * stepmake/aclocal.m4 (STEPMAKE_LIBDIR): Fixes from + lilypond-python-module patch. + 2002-12-27 Han-Wen Nienhuys * Documentation/user/refman.itely (Graphical interfaces): add note diff --git a/GNUmakefile.in b/GNUmakefile.in index 1f4944f528..5e77962a85 100644 --- a/GNUmakefile.in +++ b/GNUmakefile.in @@ -132,13 +132,13 @@ CATALOGS = $(HELP_CATALOGS:lilypond=) $(builddir)/share/lilypond-force: # Preparing LilyPond tree for builddir exec - cd $(builddir) && rm -rf share lib - mkdir -p $(builddir)/share/lilypond + cd $(builddir) && rm -rf lib share mkdir -p $(builddir)/lib/lilypond + mkdir -p $(builddir)/share/lilypond mkdir -p $(builddir)/share/lilypond/fonts mkdir -p $(builddir)/share/lilypond/tex cd $(builddir)/lib/lilypond && \ - ln -s ../../python/$(outconfbase) python. + ln -s ../../python/$(outconfbase) python cd $(builddir)/share/lilypond && \ ln -s $(abs-srcdir)/ly ly && \ ln -s ../../mf/$(outconfbase) dvips && \ diff --git a/aclocal.m4 b/aclocal.m4 index 5dbbe94ae1..eb03abd45b 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,6 +1,6 @@ dnl aclocal.m4 -*-shell-script-*- dnl WARNING WARNING WARNING -dnl do not edit! this is aclocal.m4, generated from /home/rz/lilypond/lilypond/stepmake/aclocal.m4 +dnl do not edit! this is aclocal.m4, generated from /home/fred/lily/stepmake/aclocal.m4 dnl aclocal.m4 -*-shell-script-*- dnl StepMake subroutines for configure.in @@ -264,16 +264,15 @@ AC_DEFUN(STEPMAKE_DATADIR, [ ## ugh: cut & paste programming from datadir. AC_DEFUN(STEPMAKE_LIBDIR, [ - if test "$datadir" = "\${prefix}/lib"; then - datadir='${prefix}/lib' + if test "$libdir" = "\${exec_prefix}/lib"; then + libdir='${exec_prefix}/lib' fi - presome=${prefix} - if test "$prefix" = "NONE"; then + presome=${exec_prefix} + if test "$exec_prefix" = "NONE"; then presome=${ac_default_prefix} fi package_libdir=$libdir/$package - local_package_libdir=$package_libdir/$FULL_VERSION build_package_libdir=$ugh_ugh_autoconf250_builddir/lib/$package diff --git a/config.make.in b/config.make.in index 33fe5a8ae8..3e54d8152d 100644 --- a/config.make.in +++ b/config.make.in @@ -28,6 +28,7 @@ includedir = @includedir@ infodir = @infodir@ libdir = @libdir@ lilypond_datadir = @package_datadir@ +lilypond_libdir = @package_libdir@ local_lilypond_datadir = @local_package_datadir@ local_lilypond_libdir = @local_package_libdir@ localedir = @localedir@ diff --git a/make/substitute.make b/make/substitute.make index 9e94bd8d38..3ffbd9bb29 100644 --- a/make/substitute.make +++ b/make/substitute.make @@ -12,7 +12,9 @@ ATVARIABLES = \ date\ datadir\ lilypond_datadir\ + lilypond_libdir\ local_lilypond_datadir\ + local_lilypond_libdir\ localedir\ PACKAGE\ package\ diff --git a/scripts/midi2ly.py b/scripts/midi2ly.py index 3b3f00dd9e..aab73dde08 100644 --- a/scripts/midi2ly.py +++ b/scripts/midi2ly.py @@ -31,17 +31,13 @@ import sys ################################################################ # Users of python modules should include this snippet. # -# If set, LILYPONDPREFIX must take prevalence -# if datadir is not set, we're doing a build and LILYPONDPREFIX -datadir = '@local_lilypond_datadir@' -if not os.path.isdir (datadir): - datadir = '@lilypond_datadir@' -if os.environ.has_key ('LILYPONDPREFIX') : - datadir = os.environ['LILYPONDPREFIX'] - while datadir[-1] == os.sep: - datadir= datadir[:-1] - -sys.path.insert (0, os.path.join (datadir, 'python')) +# This soon to be removed for: import lilypond.lilylib as ly +libdir = '@local_lilypond_libdir@' +if not os.path.isdir (libdir): + libdir = '@lilypond_libdir@' +sys.path.insert (0, os.path.join (libdir, 'python')) + + ################################################################ import midi @@ -450,9 +446,10 @@ class Note: elif commas < 0: s = s + "," * -commas - if and dump_dur (explicit_durations_p \ + ## FIXME: compile fix --jcn + if (dump_dur and explicit_durations_p) \ or Duration.compare (self.duration, - reference_note.duration)): + reference_note.duration): s = s + self.duration.dump () reference_note = self diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 133034bd8c..afafae37ff 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -261,16 +261,15 @@ AC_DEFUN(STEPMAKE_DATADIR, [ ## ugh: cut & paste programming from datadir. AC_DEFUN(STEPMAKE_LIBDIR, [ - if test "$datadir" = "\${prefix}/lib"; then - datadir='${prefix}/lib' + if test "$libdir" = "\${exec_prefix}/lib"; then + libdir='${exec_prefix}/lib' fi - presome=${prefix} - if test "$prefix" = "NONE"; then + presome=${exec_prefix} + if test "$exec_prefix" = "NONE"; then presome=${ac_default_prefix} fi package_libdir=$libdir/$package - local_package_libdir=$package_libdir/$FULL_VERSION build_package_libdir=$ugh_ugh_autoconf250_builddir/lib/$package diff --git a/stepmake/stepmake/python-module-rules.make b/stepmake/stepmake/python-module-rules.make index d05fa733c2..e70f7311bf 100644 --- a/stepmake/stepmake/python-module-rules.make +++ b/stepmake/stepmake/python-module-rules.make @@ -5,6 +5,6 @@ $(outdir)/%$(SHARED_MODULE_SUFFIX): $(outdir)/%.lo $(outdir)/%.pyc: $(outdir)/%.py $(PYTHON) -c 'import py_compile; py_compile.compile ("$<")' -$(outdir)/%.py: %.py +$(outdir)/%.py: %.py $(builddir)/config.make cat $< | sed $(sed-atvariables) > $@ chmod 755 $@ diff --git a/stepmake/stepmake/script-rules.make b/stepmake/stepmake/script-rules.make index c431f2cd29..f15e6831e5 100644 --- a/stepmake/stepmake/script-rules.make +++ b/stepmake/stepmake/script-rules.make @@ -1,25 +1,25 @@ -$(outdir)/%: %.pl +$(outdir)/%: %.pl $(builddir)/config.make cat $< | sed $(sed-atvariables) > $@ chmod 755 $@ -$(outdir)/%: %.bash +$(outdir)/%: %.bash $(builddir)/config.make cat $< | sed $(sed-atvariables) > $@ chmod 755 $@ -$(outdir)/%: %.scm +$(outdir)/%: %.scm $(builddir)/config.make cat $< | sed $(sed-atvariables) > $@ chmod 755 $@ -$(outdir)/%: %.expect +$(outdir)/%: %.expect $(builddir)/config.make cat $< | sed $(sed-atvariables) > $@ chmod 755 $@ -$(outdir)/%: %.sh +$(outdir)/%: %.sh $(builddir)/config.make cat $< | sed $(sed-atvariables) > $@ chmod 755 $@ -$(outdir)/%: %.py +$(outdir)/%: %.py $(builddir)/config.make cat $< | sed $(sed-atvariables) > $@ chmod 755 $@ diff --git a/stepmake/stepmake/substitute-rules.make b/stepmake/stepmake/substitute-rules.make index fa93fed6f6..45a39890c1 100644 --- a/stepmake/stepmake/substitute-rules.make +++ b/stepmake/stepmake/substitute-rules.make @@ -1,5 +1,5 @@ -$(outdir)/%: %.in +$(outdir)/%: %.in $(builddir)/config.make rm -f $@ cat $< | sed $(sed-atfiles) $(sed-atvariables) > $@ -- 2.39.5