]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.38.jcn3
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 24 Mar 2000 00:52:48 +0000 (01:52 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 24 Mar 2000 00:52:48 +0000 (01:52 +0100)
1.3.38.jcn3
===========

* CHANGES: when I'm in add-changelog-entry mode, which we seem to
do now(?), I can't seem to get rid of the left margin (well,
either that, or I can't fill-paragraph).

* buildscripts/make-cygwin-cross.sh: A try at dropping cygwin1.dll
 dependency by using mingw.  Compiling guile is too much to ask
 for mingw, though.  Also:
 - rename python scripts .py (request from Alain)
 - install native packages under their own, separate root. (Alain)

* lily.scm: Don't use regex module when running on
Windows. (Shamus)

* lily/staff-margin-engraver.cc (acknowledge_element): If
possible, hang y-axis of margin script to span-bar.  This fixes
vertical placement of margin scripts attached to staff groups.

* help2man-rules.make: Fixes for generating manpages by copying
and for building using --scrdir.

* stepmake/stepmake/generic-targets.make: Preserve date stamp of
config.h, version.hh files file when copying.

CHANGES
VERSION
buildscripts/make-cygwin-cross.sh
input/test/staff-margin.ly
lily/staff-margin-engraver.cc
scm/lily.scm
stepmake/stepmake/generic-targets.make
stepmake/stepmake/help2man-rules.make

diff --git a/CHANGES b/CHANGES
index 003cecf3bc7ef0f274f4b23c219ee6bbf789d01f..46f7d3bd7f094817bf195e4fb7c0e9fb59a0306f 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,29 @@
+1.3.38.jcn3
+===========
+       
+       * CHANGES: when I'm in add-changelog-entry mode, which we seem to
+       do now(?), I can't seem to get rid of the left margin (well,
+       either that, or I can't fill-paragraph).
+
+       * buildscripts/make-cygwin-cross.sh: A try at dropping cygwin1.dll
+        dependency by using mingw.  Compiling guile is too much to ask
+        for mingw, though.  Also:
+        - rename python scripts .py (request from Alain)
+        - install native packages under their own, separate root. (Alain)
+
+       * lily.scm: Don't use regex module when running on
+       Windows. (Shamus)
+
+       * lily/staff-margin-engraver.cc (acknowledge_element): If
+       possible, hang y-axis of margin script to span-bar.  This fixes
+       vertical placement of margin scripts attached to staff groups.
+                       
+       * help2man-rules.make: Fixes for generating manpages by copying
+       and for building using --scrdir.
+
+       * stepmake/stepmake/generic-targets.make: Preserve date stamp of
+       config.h, version.hh files file when copying.
+
 1.3.38.jcn2
 ===========
 
diff --git a/VERSION b/VERSION
index 1e4e1e21335f46d6ef4a2626ec1872fbb85e2161..c4a38ba67450ab94e6bd645ab08f151a4f34b468 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=38
-MY_PATCH_LEVEL=jcn2
+MY_PATCH_LEVEL=jcn3
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 749839af17087cdf6717e910a59b62ea643b4e6a..942d58e01f071ca22f6f309f7b5180a4259c7f92 100644 (file)
 #          flex/flex-src.tar.gz
 #          gcc/gcc-2.95.2-1-src.tar.gz
 #
+#      ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/runtime/
+#
+#          bin-crtdll-2000-02-03.tar.gz  (mingw only)
+#
 #  * guile-1.3.4.tar.gz
 #
 #  * lilypond-1.3.38.jcn1.tar.gz
 # config section
 ################
 
-ROOT=/usr/src/cygwin-net-485
+target=cygwin
+#target=mingw
+
+if [ $target = cygwin ]; then
+       ROOT=/usr/src/cygwin-net-485
+       TARGET_ARCH=i686-pc-cygwin
+else
+       ROOT=/usr/src/mingw-net-485
+       TARGET_ARCH=i386-pc-mingw32
+fi
 PREFIX=$ROOT/usr
 NATIVE_PREFIX=/Cygnus/usr
 
@@ -44,13 +57,22 @@ WWW=$DEVEL/WWW/lilypond/gnu-windows
 #WWW=/tmp
 
 CYGWIN_SOURCE=$DEVEL/sourceware.cygnus.com/pub/cygwin/private/cygwin-net-485
-SOURCE_PATH=$DEVEL/usr/src/releases:$DEVEL/usr/src/patches:$DEVEL/usr/src/lilypond/Documentation/ntweb
+MINGW_SOURCE=$DEVEL/ftp.xraylith.wisc.edu/pub/khan/gnu-win32/mingw32/runtime
+SOURCE_PATH=$DEVEL/usr/src/releases:$DEVEL/usr/src/patches:$DEVEL/usr/src/lilypond/Documentation/ntweb:$MINGW_SOURCE
 
 HOST=`uname -m`-gnu-`uname -s | tr '[A-Z]' '[a-z]'`
 
 cygwin_binary=cygwin-20000301.tar.gz
-TARGET_ARCH=i686-pc-cygwin
-CYGWIN_DLL=cygwin1-net-485.dll
+mingw_binary=bin-crtdll-2000-02-03.tar.gz
+
+#CYGWIN_DLL=cygwin1-net-485.dll
+CYGWIN_DLL=cygwin1.dll
+MINWG_DLL=mingwc10-net-485.dll
+
+
+################
+# cross packages
+################
 
 cross_packages="
 binutils-19990818
@@ -58,27 +80,51 @@ gcc-2.95.2
 flex
 bison
 "
-
-not_yet_needed=cygwin-2000301
+not_yet_needed="
+cygwin-2000301
+"
 
 cross_configure='--prefix=$PREFIX --target=$TARGET_ARCH'
-##native_configure='--prefix=$NATIVE_PREFIX --target=$TARGET_ARCH'
 gcc_make='LANGUAGES="c++"'
 cygwin_make='-k || true'
 
-native_configure='--target=$TARGET_ARCH --build=$TARGET_ARCH --host=$HOST --oldincludedir=$PREFIX/include --prefix=$NATIVE_PREFIX'
+
+#################
+# native packages
+#################
+
+# Typically, we install native packages under
+#
+#   /Cygnus/usr/package-x.y.z
+#
+# so that's how we configure them.
+#
+native_configure='--target=$TARGET_ARCH --build=$TARGET_ARCH --host=$HOST --oldincludedir=$PREFIX/include --prefix=$NATIVE_PREFIX/$package'
 
 guile_patch='guile-1.3.4-gnu-windows.patch'
+if [ $target = mingw ]; then
+       guile_patch1='guile-1.3.4-mingw.patch'
+       guile_cflags='-I $PREFIX/$TARGET_ARCH/include -I $PREFIX/i686-pc-cygwin/include'
+fi
 guile_configure='--enable-sizeof-int=4 --enable-sizeof-long=4 --enable-restartable-syscalls=yes'
 guile_make='oldincludedir=$PREFIX/include'
 
+# We need to get guile properly installed for cross-development, ie
+# at our prefix: $PREFIX.  When packaging, the prefix we configured
+# for, will be used.
+#
+guile_install='prefix=$PREFIX'
+
 lilypond_version=@TOPLEVEL_VERSION@
-#lilypond_prefix="$NATIVE_PREFIX/lilypond-$lilypond_version"
+if [ $target = mingw ]; then
+       lilypond_cflags='-I $PREFIX/$TARGET_ARCH/include -I $PREFIX/i686-pc-cygwin/include'
+fi
 lilypond_ldflags='-L$PREFIX/lib -lguile $PREFIX/bin/$CYGWIN_DLL'
 #lilypond_configure='--prefix=$lilypond_prefix'
 ## URG, help2man: doesn't know about cross-compilation.
 #lilypond_make='-k || make -k || true'
 lilypond_patch=lilypond-manpages.patch
+# Don't install lilypond
 lilypond_install='--just-print'
 
 native_packages="
@@ -86,7 +132,6 @@ guile-1.3.4
 lilypond-$lilypond_version
 "
 
-
 #######################
 # end of config section
 #######################
@@ -95,20 +140,6 @@ cygwin_dirs=`/bin/ls -d1 $CYGWIN_SOURCE/*`
 cygwin_source_path=`echo $CYGWIN_SOURCE $cygwin_dirs`
 source_path=`echo $SOURCE_PATH:$cygwin_source_path | sed 's/:/ /g'`
 
-# mingw doesn't work yet. 
-#TARGET_ARCH=i686-pc-mingw32
-#
-# building cross-compiler i686-pc-mingw32-gcc exists on:
-#
-#  /usr/src/cygwin-mingw/usr/src/cross-gcc-2.95.2/gcc/xgcc -B/usr/src/cygwin-mingw/usr/src/cross-gcc-2.95.2/gcc/ -B/usr/src/cygwin-mingw/usr/i686-pc-mingw32/bin/ -I/usr/src/cygwin-mingw/usr/i686-pc-mingw32/include -O2 -I../../gcc-2.95.2/gcc/../winsup/include -DCROSS_COMPILE -DIN_GCC     -g -O2 -I./include   -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED   -I. -I../../gcc-2.95.2/gcc -I../../gcc-2.95.2/gcc/config -I../../gcc-2.95.2/gcc/../include -c
-#
-# with:
-#
-#  ../../gcc-2.95.2/gcc/libgcc2.c:2582: conflicting types for `getpagesize'
-#/usr/src/cygwin-mingw/usr/i686-pc-mingw32/include/sys/unistd.h:43: previous declaration of `getpagesize'
-# it seems that __CYGWIN__ is not defined in mingw compiler/or compiler isn't
-# fully ported to mingw
-
 ###########
 # functions
 ###########
@@ -145,6 +176,35 @@ expand ()
 )
 }
 
+find_path ()
+{(
+       set -
+       expr=$1
+       found=
+       for i in $source_path; do
+               found=`/bin/ls -d1 $i/$expr 2>/dev/null | head -1`
+               if [ -e "$found" ]; then
+                       break
+               fi
+       done
+       echo $found
+)
+}
+
+fix_extension ()
+{
+       file=$1
+       ext=$2
+       expr="$3"
+       base=`basename $file $ext`
+       if [ $base$ext != $i ]; then
+               type="`file $file`"
+               if expr "$type" : "$expr"; then
+                       mv -f $file $base$ext
+               fi
+       fi
+}
+
 build ()
 {(
        package=$1
@@ -156,7 +216,7 @@ build ()
        fi
 
         name=`echo $package | sed 's/-.*//'`
-        name_patch=`expand $name _patch`
+        name_cflags=`expand $name _cflags`
         name_ldflags=`expand $name _ldflags`
         name_configure=`expand $name _configure`
         type_configure=`expand $type _configure`
@@ -176,23 +236,27 @@ build ()
        fi
        
        untar $found $package
-       if [ "x$name_patch" != "x" ]; then
+       patch=`expand $name _patch`
+       count=0
+       while [ "x$patch" != "x" ]; do
                (
                cd $package
-               found=`find_path $name_patch`
+               found=`find_path $patch`
                if [ "$found" = "" ]; then
-                       echo "$name_patch: no such file"
+                       echo "$patch: no such file"
                        exit 1
                fi
                patch -p1 -E < $found
                )
-       fi
+               count=`expr $count + 1`
+               patch=`expand $name _patch$count`
+       done
        set -x
        mkdir $type-$package
        cd $type-$package
 
        rm -f config.cache
-       LDFLAGS="$name_ldflags" ../$package/configure $type_configure $name_configure || exit 1
+       CFLAGS="$name_cflags" LDFLAGS="$name_ldflags" ../$package/configure $type_configure $name_configure || exit 1
        make $name_make || exit 1
        make install $name_install || exit 1
 )
@@ -206,7 +270,7 @@ pack ()
         name=`echo $package | sed 's/-.*//'`
         name_pack_install=`expand $name _pack_install`
        install_root=/tmp/$package-install
-       install_prefix=$install_root/$NATIVE_PREFIX
+       install_prefix=$install_root/$NATIVE_PREFIX/$package
 
        set -x
        rm -rf $install_root
@@ -219,33 +283,14 @@ pack ()
        ## for people that use a dumb shell instead of bash
        cd $install_prefix/bin &&
        for i in `/bin/ls -d1 *`; do
-               base=`basename $i .exe`
-               if [ $base.exe != $i ]; then
-                       type="`file $i`"
-                       if expr "$type" : '.*Windows.*\(executable\).*'; then
-                               mv -f $i $base.exe
-                       fi
-               fi
+               fix_extension $i .exe '.*Windows.*\(executable\).*'
+               fix_extension $i .py '.*\(python\).*'
        done
+
         rm -f $WWW/$package.zip
         cd $install_root && zip -r $WWW/$package.zip .$NATIVE_PREFIX
 )
 }
-
-find_path ()
-{(
-       set -
-       expr=$1
-       found=
-       for i in $source_path; do
-               found=`/bin/ls -d1 $i/$expr 2>/dev/null | head -1`
-               if [ -e "$found" ]; then
-                       break
-               fi
-       done
-       echo $found
-)
-}
 ##################
 # end of functions
 ##################
@@ -268,20 +313,32 @@ if [ ! -d $PREFIX ]; then
        mkdir -p $PREFIX/lib/gcc-lib/$TARGET_ARCH/2.95.2
 
        cd $PREFIX
+
        # urg, bug in gcc's cross-make configuration
-       if [ ! -e include ]; then
-               #mv include huh-include
-               # not target-arch, but [i686-]pc-cygwin!
-               ln -s $PREFIX/i686-pc-cygwin/include .
-               # these necessary only for mingw32
-               ln -s $PREFIX/i686-pc-cygwin/include $TARGET_ARCH
-               ln -s $PREFIX/include $PREFIX/$TARGET_ARCH/include
-       fi
+       rm -f include
+       ln -s $PREFIX/$TARGET_ARCH/include .
 else
        echo "$PREFIX: already exists"
        echo "$cygwin_binary: skipping"
 fi
 
+# mingw
+if [ ! -d $PREFIX/$TARGET_ARCH ]; then
+       cd $PREFIX
+       found=`find_path $mingw_binary`
+       if [ "$found" = "" ]; then
+               echo "$mingw_binary: no such tarball"
+               exit 1
+       fi
+       tar xzf $found
+
+       mkdir -p $PREFIX/lib/gcc-lib/$TARGET_ARCH/2.95.2
+       rm -f include
+       mkdir -p $PREFIX/i386-mingw32/include
+       ln -s $PREFIX/i386-mingw32 $TARGET_ARCH
+       ln -s $PREFIX/$TARGET_ARCH/include .
+fi
+
 if [ ! -e $NATIVE_PREFIX ]; then
        ln -s $ROOT /Cygnus || exit 1
 fi
@@ -301,7 +358,8 @@ for i in $cross_packages; do
 done
 
 # urg, bug in gcc's cross-make install
-mv -f $PREFIX/bin/cygwin1.dll $PREFIX/bin/$CYGWIN_DLL
+mv $PREFIX/bin/cygwin1.dll $PREFIX/bin/$CYGWIN_DLL
+mv $PREFIX/bin/mingwc10.dll $PREFIX/bin/$MINGW_DLL
 ln -f $PREFIX/bin/$TARGET_ARCH-gcc $PREFIX/$TARGET_ARCH/bin/cc 
 ln -f $PREFIX/bin/$TARGET_ARCH-c++ $PREFIX/$TARGET_ARCH/bin/c++
 ln -f $PREFIX/bin/$TARGET_ARCH-g++ $PREFIX/$TARGET_ARCH/bin/g++
index b6752444ce45cc4771d06f41914399f52308af8e..455a2c6e423bb189320f7cbcacca0a085d3e87e7 100644 (file)
@@ -11,8 +11,9 @@
     \context Staff = bass { \property Staff.instrument = "Left " \clef bass; c4 }>
 
 \paper {
+linewidth=-1.0;
 \translator { \ScoreContext
-       textVerticalAlignment = #0
+       %textVerticalAlignment = #0
        }
 \translator { \StaffContext \consists "Staff_margin_engraver"; }
 \translator { \PianoStaffContext \consists "Staff_margin_engraver"; }
index 3e3a43585697e748e29eb4553625419cdd89786a..f0887d650a635b1eb7e59594ff70abdc12e54bce 100644 (file)
@@ -9,6 +9,7 @@
 #include "translator.hh"
 #include "engraver.hh"
 #include "bar.hh"
+#include "span-bar.hh"
 #include "dimension-cache.hh"
 #include "directional-element-interface.hh"
 #include "timing-translator.hh"
@@ -73,10 +74,18 @@ Staff_margin_engraver::acknowledge_element (Score_element_info info)
   if (now_mom () > Moment (0))
     s = get_property ("instr");
 
-  //s = ly_str02scm ("HALLO");
-  
-  if (dynamic_cast<Bar*> (info.elem_l_) && gh_string_p (s))
-    create_text (s);
+  if (gh_string_p (s))
+    {
+      if (Bar* b= dynamic_cast<Bar*> (info.elem_l_))
+       {
+         create_text (s);
+         if (Span_bar* s= dynamic_cast<Span_bar*> (b))
+           {
+             assert (text_p_);
+             text_p_->set_parent (s, Y_AXIS);
+           }
+       }
+    }
 }
 
 void
index 17b7c457946d90ad9f72a89394089d5add665e49..c78447ff499578d0d96480797bfbfc338a7f30aa 100644 (file)
@@ -17,6 +17,9 @@
 
 (use-modules (ice-9 regex))
 
+(define use-regex
+  (not (string-match ".*windows.*" (string-downcase (vector-ref (uname) 0)))))
+
 ;; do nothing in .scm output
 (define (comment s) "")
 
   (define (header-end)
     (string-append
      "\\special{! "
-     ; fixed in 1.3.4
-     ;(ly-gulp-file "lily.ps")
 
-     ;; URG: now we can't use scm output without Lily
-     (regexp-substitute/global #f "\n" (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
+     ;; URG: ly-gulp-file: now we can't use scm output without Lily
+     (if use-regex
+        ;; fixed in 1.3.4 for powerpc -- broken on Windows
+        (regexp-substitute/global #f "\n"
+                                  (ly-gulp-file "lily.ps") 'pre " %\n" 'post)
+        (ly-gulp-file "lily.ps"))
      "}"
      "\\input lilyponddefs \\turnOnPostScript"))
 
   ;;
   (define (output-tex-string s)
       (if security-paranoia
-         (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+         (if use-regex
+             (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+             (begin (display "warning: not paranoid") s))
          s))
       
   (define (lily-def key val)
     (string-append
      "\\def\\"
-     ; fixed in 1.3.4
-     (regexp-substitute/global #f "_" (output-tex-string key) 'pre "X" 'post)
-     ;(output-tex-string key)
+     (if use-regex
+        ;; fixed in 1.3.4 for powerpc -- broken on Windows
+        (regexp-substitute/global #f "_"
+                                  (output-tex-string key) 'pre "X" 'post)
+        (output-tex-string key))
      "{" (output-tex-string val) "}\n"))
 
   (define (number->dim x)
index ed786e6c6ca94d7c8a5d7b4ab526e274df3733ef..0e08464814e67296a404e959809661b67127f98a 100644 (file)
@@ -122,13 +122,13 @@ TAGS:
 
 # ugh . -> $(outdir)
 $(outdir)/VERSION: $(depth)/VERSION
-       cp $< $@
+       cp -p $< $@
 
 $(outdir)/version.hh: $(outdir)/VERSION
        $(PYTHON) $(step-bindir)/make-version.py $< > $@
 
 $(outdir)/config.h: $(config_h)
-       cp $< $@
+       cp -p $< $@
 
 # should this be in Rules?
 configure: configure.in aclocal.m4
index b2f86ea8fc2dddebf5e412ed36474084bbffe0e9..493d7acff5f7620d3e2e0ad5109e10f471f98c16 100644 (file)
@@ -5,11 +5,14 @@
 #       interpreter.  This is slightly bizarre, but it helps
 # Indeed it is. Perl sucks.
 #
+
+ifneq ($(outdir),./out)
+$(outdir)/%.1: out/%.1
+       cp $< $@
+endif
+
 $(outdir)/%.1: $(outdir)/%
-       $(PERL) $(depth)/buildscripts/$(outdir)/help2man $< > $@ || \
+       $(PERL) $(depth)/$(builddir)/buildscripts/$(outbase)/help2man $< > $@ || \
        (echo ""; echo "Apparently the man pages failed to build. This is";\
        echo "no problem, since they don't contain any information anyway.";\
        echo "Please run make again, and be prepared for NO manual pages.")
-
-$(outdir)/%.1: out/%.1
-       cp $< $@