]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.120.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 4 Jan 2001 16:03:04 +0000 (17:03 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 4 Jan 2001 16:03:04 +0000 (17:03 +0100)
1.3.120.jcn1
============

* Bugfix Ly2dvi: reset LC_ALL and LC_LANG too.

* Commented out dubious undocumented $(PATHSEP) from lilypond-vars.make

* Replaced some instances of [$(outdir)/].. with $(pwd), these may
break --srcdir builds and texi2dvi.

* Several fixes for --srcdir build, allowing build from read only media.

* Moved make/toplevel.make.in to less unusual GNUmakefile.in

21 files changed:
CHANGES
Documentation/user/GNUmakefile
GNUmakefile.in [new file with mode: 0644]
VERSION
aclocal.m4
buildscripts/walk.sh [new file with mode: 0644]
input/bugs/coda-kludge.ly [new file with mode: 0644]
input/test/coda-kludge.ly
make/lilypond-vars.make
make/ly-rules.make
make/srcdir.make.in
make/stepmake.make
make/toplevel.make.in
scripts/ly2dvi.py
stepmake/GNUmakefile.in [new file with mode: 0644]
stepmake/aclocal.m4
stepmake/make/srcdir.make.in
stepmake/make/stepmake.make
stepmake/make/toplevel.make.in
stepmake/stepmake/texinfo-rules.make
stepmake/stepmake/toplevel-targets.make

diff --git a/CHANGES b/CHANGES
index 3a368ff58774f2db7ae43364c98cc12cedd8482b..e02ef62b98d2f8dfa66cc7d285bf98f3b11366a4 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,17 @@
+1.3.120.jcn1
+============
+
+* Bugfix Ly2dvi: reset LC_ALL and LC_LANG too.
+
+* Commented out dubious undocumented $(PATHSEP) from lilypond-vars.make
+
+* Replaced some instances of [$(outdir)/].. with $(pwd), these may
+break --srcdir builds and texi2dvi.
+
+* Several fixes for --srcdir build, allowing build from read only media.
+
+* Moved make/toplevel.make.in to less unusual GNUmakefile.in
+
 1.3.120
 =======
 
index a4101cc14afaf27dc36fea58341883a97fe59785..5c6310c150cd93e3a16bd3739a74a1f5611de5e9 100644 (file)
@@ -3,7 +3,6 @@
 depth=../..
 
 
-
 LATEX_FILES =$(wildcard *.latex)
 
 
diff --git a/GNUmakefile.in b/GNUmakefile.in
new file mode 100644 (file)
index 0000000..37ac561
--- /dev/null
@@ -0,0 +1,82 @@
+# -*-Makefile-*-
+# title           specific top level makefile for LilyPond  
+
+# subdir level:
+#
+depth = .
+#
+
+# descent order into subdirectories:
+#
+SUBDIRS =  buildscripts scripts  flower lily mf midi2ly po debian \
+       Documentation ly input tex make mutopia intl $(builddir)/stepmake\
+       ps  scm
+#
+
+SCRIPTS = configure aclocal.m4
+README_FILES =  DEDICATION COPYING NEWS CHANGES ROADMAP
+README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt FAQ.txt
+IN_FILES := $(wildcard *.in)
+EXTRA_DIST_FILES = lilypond-font-lock.el lilypond-mode.el vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES) 
+NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
+
+# bootstrap stepmake:
+#
+STEPMAKE_TEMPLATES=toplevel yolily-toplevel po
+include $(depth)/make/stepmake.make 
+#
+
+website: fonts htmldoc examples  footify
+
+footify:
+       $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
+       $(footify-all-command)
+
+fonts:
+       $(MAKE) -C $(depth)/mf 
+
+doc:
+       $(MAKE) -C Documentation
+
+htmldoc: 
+       $(MAKE) out='www' local-WWW
+       $(MAKE) out='www' -C Documentation WWW
+       rm -f `find . -name \*.html~ -print`
+       $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
+       $(footify-all-command)
+       find `find Documentation -type d -name 'out-www'` -not -name '*dvi' -not -name '*ly' -not -name '*tex' -not -name '*.ps' -not -name 'out-www'  > wwwlist
+       tar cfz $(outdir)/htmldoc.tar.gz  `cat wwwlist` `ls *.png $(ERRORLOG)`  index.html
+
+examples:
+       $(MAKE) out='www' -C input WWW
+       $(MAKE) out='www' -C mutopia WWW
+# arg, should not break concept of recursive make;
+# this breaks links (and dependencies, see above)
+
+# don't understand this comment --hwn
+
+# See below.  The footify-all you had before caused dead links on the
+# webpage, because the footify command assumes it can calculate the location
+# of index.html from the current depth.  That doesn't work, if you don't
+# use recursive make like we do everywhere else; leads to bugs that you
+# make a specific fix for.
+
+       $(PYTHON) $(buildscript-dir)/mutopia-index.py -o short-examples.html input/
+       $(PYTHON) $(buildscript-dir)/mutopia-index.py -o long-examples.html mutopia/
+#$(footify-all-command)
+       $(footify) --index=./ `$(FIND) . -name '*.html' -print`
+       tar --exclude='*.dvi' --exclude='*.tex' --exclude='*.ps' --exclude='*.ppm' -czf $(outdir)/examples.tar.gz *-examples.html  `find input mutopia -type d -name 'out-www' -print`
+
+# Kpathsea is overkill, and a horror/impossible to compile without compiling
+# and using a matching TeX (well, I gave up trying for now).
+my_tfm_path=$(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp 
+
+localinstall:
+       mkdir -p $(datadir)
+ifeq ($(KPATHSEA),0)
+       $(foreach i, 1 2 3 4 5, rm -f $(datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(datadir)/tfm.$(i) ; )
+endif
+
+local-WWW-clean:
+       $(SHELL) $(buildscript-dir)/clean-fonts.sh
+
diff --git a/VERSION b/VERSION
index 1d20a8cc0015b1df59d6218af77fb81354655ebb..98407b4c3d8dadb865b26428eb19856161968eba 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=120
-MY_PATCH_LEVEL=
+MY_PATCH_LEVEL=jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index cc04f7b9e4709227334719a175748162d2d409a7..110ee942eb7e9e15ac729179c2c96c8a70a89834 100644 (file)
@@ -1,8 +1,31 @@
-dnl WARNING WARNING WARNING WARNING
-dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
 dnl aclocal.m4   -*-shell-script-*-
 dnl StepMake subroutines for configure.in
 
+function base ()
+{
+    expr "$1" : "\(/[^/]*\)"
+}
+
+function unbase ()
+{
+    expr "$1" : "/[^/]*\(.*\)"
+}
+
+function walk ()
+{
+    from=`(cd "$1" && pwd)`
+    to=`pwd`
+    t=`base "$to"`
+    f=`base "$from"`
+    while [ -n "$t" -a "$t" = "$f" ]; do
+       to=`unbase "$to"`
+       from=`unbase "$from"`
+       t=`base "$to"`
+       f=`base "$from"`
+    done
+    echo ..$to
+}
+
 AC_DEFUN(AC_STEPMAKE_BIBTEX2HTML, [
     AC_CHECK_PROGS(BIBTEX2HTML, bibtex2html bib2html, error)
     if test "$BIBTEX2HTML" = "bib2html"; then
@@ -147,10 +170,13 @@ AC_DEFUN(AC_STEPMAKE_DATADIR, [
 AC_DEFUN(AC_STEPMAKE_END, [
     AC_OUTPUT($CONFIGFILE.make:config.make.in)
 
-    rm -f $srcdir/GNUmakefile
-    cp $srcdir/make/toplevel.make.in $srcdir/GNUmakefile
-    chmod 444 $srcdir/GNUmakefile
-    if test "$builddir" != "."; then
+    # regular in-place build
+    # test for srcdir_build = yes ?
+    if test "$builddir" = "."; then
+       rm -f $srcdir/GNUmakefile
+       cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
+       chmod 444 $srcdir/GNUmakefile
+    else # --srcdir build
         rm -f GNUmakefile
        cp $srcdir/make/srcdir.make.in GNUmakefile
        chmod 444 GNUmakefile
@@ -241,19 +267,16 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
     if test "x$PACKAGE" = "xSTEPMAKE"; then
        AC_MSG_RESULT(Stepmake package!)
 
-       #if test "x$builddir" != "x"; then
-       #    builddir="../$builddir"
-       #else
-       #    builddir=..
-       #fi
-       if test "$srcdir" != "."; then
+       AC_MSG_CHECKING(builddir)
+       if test "$srcdir" = "."; then
+           builddir=.
+       else
            absolute_builddir="`pwd`"
            package_absolute_builddir="`dirname $absolute_builddir`"
            package_srcdir="`dirname  $srcdir`"
            builddir="`dirname $package_srcdir`/`basename $package_absolute_builddir`/`basename $absolute_builddir`"
-       else
-           builddir=.
        fi
+       AC_MSG_RESULT($builddir)
 
        (cd stepmake 2>/dev/null || mkdir stepmake)
        (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .)
@@ -263,11 +286,20 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
     else
         AC_MSG_RESULT($PACKAGE)
 
-       if test "$srcdir" != "."; then
-           absolute_builddir="`pwd`"
-           builddir="`dirname  $srcdir`/`basename $absolute_builddir`"
-       else
+       AC_MSG_CHECKING(builddir)
+       if test "$srcdir" = "."; then
            builddir=.
+           srcdir_build=no
+       else
+           absolute_builddir="`pwd`"
+#          builddir="`dirname  $srcdir`/`basename $absolute_builddir`"
+           builddir="`bash $srcdir/buildscripts/walk.sh \"$srcdir\"`"
+           srcdir_build=yes
+       fi
+       AC_MSG_RESULT($builddir)
+       if expr "$srcdir" : '/' > /dev/null 2>&1; then
+           absolute_srcdir=yes
+           AC_STEPMAKE_WARN(Absolute --srcdir specified: $srcdir)
        fi
 
        AC_MSG_CHECKING(for stepmake)
@@ -275,9 +307,14 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
        if test -d $stepmake; then
            AC_MSG_RESULT($stepmake)
        else
-           stepmake='$(depth)'/$srcdir/stepmake
+           if test "$absolute_srcdir" != "yes"; then
+               stepmake='$(depth)'/$srcdir/stepmake
+           else
+               stepmake=$srcdir/stepmake
+           fi
            AC_MSG_RESULT($srcdir/stepmake  ($datadir/stepmake not found))
        fi
+
        AC_CONFIG_AUX_DIR(\
          $HOME/usr/local/share/stepmake/bin\
          $HOME/usr/local/lib/stepmake/bin\
diff --git a/buildscripts/walk.sh b/buildscripts/walk.sh
new file mode 100644 (file)
index 0000000..41d24b0
--- /dev/null
@@ -0,0 +1,36 @@
+#!@SHELL@
+# walk.sh
+# ugh
+# print reversed relative path to $1
+
+function base ()
+{
+    expr "$1" : "\(/[^/]*\)"
+}
+
+function unbase ()
+{
+    expr "$1" : "/[^/]*\(.*\)"
+}
+
+function walk ()
+{
+    from=`(cd "$1" && pwd)`
+    to=`pwd`
+    t=`base "$to"`
+    f=`base "$from"`
+    while [ -n "$t" -a "$t" = "$f" ]; do
+       to=`unbase "$to"`
+       from=`unbase "$from"`
+       t=`base "$to"`
+       f=`base "$from"`
+    done
+    i=`echo $from | sed -e 's/[^/]\+/../g'`
+    if expr "$from" : '/' > /dev/null 2>&1; then
+       c=..
+    fi
+    echo $c$i$to
+}
+
+walk $1
+
diff --git a/input/bugs/coda-kludge.ly b/input/bugs/coda-kludge.ly
new file mode 100644 (file)
index 0000000..193f1ea
--- /dev/null
@@ -0,0 +1,58 @@
+% The volta texts should read: 1-4  and  5
+% Not 1 and 2
+% (see 1.2.17)
+
+%{
+Hi,
+       I want to write some music that has the structure:
+
+       Intro
+       \repeat 4 { Chorus [first-ending] verse }
+       fifth-ending final
+
+       The obvious:
+
+       \repeat 4 { Chorus \alternative{{first-ending}{}} verse}
+       \alternative{{}{fifth-ending}}
+       final
+
+       doesn't work.
+
+       And the (logically correct but ugly)
+
+       \repeat 4 {Chorus}
+       \alternative {{first-ending verse}{fifth ending}}
+       final
+
+       is very ugly, because the volta bracket keeps going for so
+       long.
+
+       Peter C
+%}
+
+\score{
+       <
+               \context Staff \notes\relative c''{
+                       c c c c
+                       % coda-klugde: let volta span only one bar
+                       \property Staff.voltaSpannerDuration = #(make-moment 1 1)
+                       \repeat "volta" 5 { d d d d }
+                               \alternative { { e e e e f f f f }
+                       { g g g g } }
+               }
+               \context Lyrics \lyrics{
+                       intro1
+                       \repeat fold 5 {}
+                       \alternative {
+                               { chorus1 one verse1 }
+                               { chorus1 two verse1 }
+                               { chorus1 three verse }
+                               { chorus1 four verse }
+                       }
+                       five1
+               }
+       >
+}
+
+
+%\version "1.0.16"; 
index ea590a55ebcf17f5ab43d90f6c7270493f663a8c..193f1eaa3e2f3a559f2a17739fbddb3d30f1d0d2 100644 (file)
@@ -1,3 +1,7 @@
+% The volta texts should read: 1-4  and  5
+% Not 1 and 2
+% (see 1.2.17)
+
 %{
 Hi,
        I want to write some music that has the structure:
index f7017ed3448a1fffa66257372be20b1155bd4f56..83a0972f8b6b23359339bf21dce2d24ed3c25ff9 100644 (file)
@@ -1,8 +1,20 @@
 
 export PATH:=$(topdir)/lily/out:$(topdir)/buildscripts/out:$(PATH)
+
+# Huh, PATHSEP, but still '/' for dirsep?
+# Doesn't make sense.
+ifeq (0,1)
+
 export MFINPUTS:=$(topdir)/mf/$(PATHSEP)$(MFINPUTS)$(PATHSEP)$(PATHSEP)
-export TEXINPUTS:=$(topdir)/mf/out/$(PATHSEP)$(topdir)/tex/$(PATHSEP)$(topdir)/ps/$(PATHSEP)$(TEXINPUTS)$(PATHSEP)..$(PATHSEP)$(PATHSEP)
+export TEXINPUTS:=$(topdir)/mf/out/$(PATHSEP)$(topdir)/tex/$(PATHSEP)$(topdir)/ps/$(PATHSEP)$(TEXINPUTS)$(PATHSEP)$(pwd)$(PATHSEP)$(PATHSEP)
 export LILYINCLUDE:=$(topdir)/ps$(PATHSEP)$(topdir)/scm$(PATHSEP)$(topdir)/ly$(PATHSEP)$(topdir)/mf/out$(PATHSEP)$(PATHSEP)$(TEX_TFMDIR)$(PATHSEP)$(LILYINCLUDE)
 
+else
+
+export MFINPUTS:=$(topdir)/mf/:$(MFINPUTS)::
+export TEXINPUTS:=$(topdir)/mf/out/:$(topdir)/tex/:$(topdir)/ps/:$(TEXINPUTS):$(pwd)::
+export LILYINCLUDE:=$(topdir)/ps:$(topdir)/scm:$(topdir)/ly:$(topdir)/mf/out::$(TEX_TFMDIR):$(LILYINCLUDE)
+
+endif
 
 export LILYPONDPREFIX:=$(depth)/
index a9d1be58febefc00667853ff6938ffe245bf03d4..0577bae6e3390b37c3847c864ae829e57d250e81 100644 (file)
@@ -5,21 +5,21 @@
 
 $(outdir)/%.latex: %.doc
        rm -f $@
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $<
+       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I $(pwd) -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ $<
        chmod -w $@
 
 # don't do ``cd $(outdir)'', and assume that $(outdir)/.. is the src dir.
 # it is not, for --scrdir builds
 $(outdir)/%.texi: %.tely
        rm -f $@
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I .. -I $(input-dir)/test/ --dependencies --format=texi $<
+       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) -I $(pwd) -I $(input-dir)/test/ --dependencies --format=texi $<
        chmod -w $@
 
 # nexi: no-lily texi
 # for plain info doco: don't run lily
 $(outdir)/%.nexi: %.tely
        rm -f $@
-       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) --no-lily -I .. -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $<
+       LILYPONDPREFIX=$(LILYPONDPREFIX)/..  $(PYTHON) $(script-dir)/lilypond-book.py --outdir=$(outdir) --no-lily -I $(pwd) -I $(input-dir)/test/ --dependencies --dep-prefix=$(outdir)/ --format=texi $<
        mv $(@D)/$(*F).texi $@
        chmod -w $@
 
index 3b460a798907b351d8a588440408bc2402a4f282..95954a1b234d6f0ac18b9e4598661b92761ef1ed 100644 (file)
@@ -35,7 +35,7 @@ config = config$(CONFIGSUFFIX).make
 
 include $(config)
 
-SRCDIR=$(MAKE) -C $(srcdir) builddir=$(builddir) $@
+SRCDIR=$(MAKE) -C $(srcdir) -f GNUmakefile.in builddir=$(builddir) $@
 
 default: all
 
index 9cfe90e50c1395d097baaa23757fcce9f7b13d0e..ae5f5cb46ab60e6ccc005438b2fb61c983cc4744 100644 (file)
@@ -42,7 +42,7 @@ endif
 include $(configuration)
 
 ifeq ($(builddir),.)
-  outroot=.
+  outroot=$(builddir)
 else
   outroot=$(depth)/$(builddir)/$(patsubst $(shell cd $(depth); pwd)%,%,$(shell cd .; pwd))
 endif
index 37ac56142a4ea32bcd71b5b843db3594a1aa473b..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,82 +0,0 @@
-# -*-Makefile-*-
-# title           specific top level makefile for LilyPond  
-
-# subdir level:
-#
-depth = .
-#
-
-# descent order into subdirectories:
-#
-SUBDIRS =  buildscripts scripts  flower lily mf midi2ly po debian \
-       Documentation ly input tex make mutopia intl $(builddir)/stepmake\
-       ps  scm
-#
-
-SCRIPTS = configure aclocal.m4
-README_FILES =  DEDICATION COPYING NEWS CHANGES ROADMAP
-README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt FAQ.txt
-IN_FILES := $(wildcard *.in)
-EXTRA_DIST_FILES = lilypond-font-lock.el lilypond-mode.el vimrc VERSION $(README_FILES)  $(SCRIPTS) $(IN_FILES) 
-NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
-
-# bootstrap stepmake:
-#
-STEPMAKE_TEMPLATES=toplevel yolily-toplevel po
-include $(depth)/make/stepmake.make 
-#
-
-website: fonts htmldoc examples  footify
-
-footify:
-       $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
-       $(footify-all-command)
-
-fonts:
-       $(MAKE) -C $(depth)/mf 
-
-doc:
-       $(MAKE) -C Documentation
-
-htmldoc: 
-       $(MAKE) out='www' local-WWW
-       $(MAKE) out='www' -C Documentation WWW
-       rm -f `find . -name \*.html~ -print`
-       $(footify) --index=./ `$(FIND) . -maxdepth 1 -name '*.html' -print`
-       $(footify-all-command)
-       find `find Documentation -type d -name 'out-www'` -not -name '*dvi' -not -name '*ly' -not -name '*tex' -not -name '*.ps' -not -name 'out-www'  > wwwlist
-       tar cfz $(outdir)/htmldoc.tar.gz  `cat wwwlist` `ls *.png $(ERRORLOG)`  index.html
-
-examples:
-       $(MAKE) out='www' -C input WWW
-       $(MAKE) out='www' -C mutopia WWW
-# arg, should not break concept of recursive make;
-# this breaks links (and dependencies, see above)
-
-# don't understand this comment --hwn
-
-# See below.  The footify-all you had before caused dead links on the
-# webpage, because the footify command assumes it can calculate the location
-# of index.html from the current depth.  That doesn't work, if you don't
-# use recursive make like we do everywhere else; leads to bugs that you
-# make a specific fix for.
-
-       $(PYTHON) $(buildscript-dir)/mutopia-index.py -o short-examples.html input/
-       $(PYTHON) $(buildscript-dir)/mutopia-index.py -o long-examples.html mutopia/
-#$(footify-all-command)
-       $(footify) --index=./ `$(FIND) . -name '*.html' -print`
-       tar --exclude='*.dvi' --exclude='*.tex' --exclude='*.ps' --exclude='*.ppm' -czf $(outdir)/examples.tar.gz *-examples.html  `find input mutopia -type d -name 'out-www' -print`
-
-# Kpathsea is overkill, and a horror/impossible to compile without compiling
-# and using a matching TeX (well, I gave up trying for now).
-my_tfm_path=$(TFM_PATH) /tmp /tmp /tmp /tmp /tmp /tmp 
-
-localinstall:
-       mkdir -p $(datadir)
-ifeq ($(KPATHSEA),0)
-       $(foreach i, 1 2 3 4 5, rm -f $(datadir)/tfm.$(i); $(LN_S) $(word $(i), $(my_tfm_path)) $(datadir)/tfm.$(i) ; )
-endif
-
-local-WWW-clean:
-       $(SHELL) $(buildscript-dir)/clean-fonts.sh
-
index 7b2f25c7f435cc2ae6379107756a465286766298..5df8c7ed28393c9b9ad49d81000e51fba44cd0a4 100644 (file)
@@ -36,7 +36,10 @@ import time
 import glob
 import tempfile
 
-os.environ['LANG'] = ''                # Can't grep localized msgs
+# Can't grep localized msgs
+os.environ['LC_ALL'] = ''
+os.environ['LANG'] = ''
+os.environ['LC_LANG'] = ''
 
 
 
diff --git a/stepmake/GNUmakefile.in b/stepmake/GNUmakefile.in
new file mode 100644 (file)
index 0000000..349ff92
--- /dev/null
@@ -0,0 +1,54 @@
+# -*-Makefile-*-
+# title         specific top level makefile for StepMake
+
+# subdir level:
+#
+depth = .
+#
+
+# descent order into subdirectories:
+#
+ifeq ($(PACKAGE),STEPMAKE)
+SUBDIRS = bin make stepmake 
+else
+SUBDIRS =
+endif
+#
+
+# list of distribution files:
+#
+SCRIPTS = configure aclocal.m4
+README_FILES = CHANGES README TODO
+README_TXT_FILES = AUTHORS.txt INSTALL.txt
+EXTRA_DIST_FILES = $(IN_FILES) VERSION $(README_FILES)  $(SCRIPTS) INSTALL.texi
+NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
+#
+
+# bootstrap stepmake:
+#
+STEPMAKE_TEMPLATES=toplevel texinfo
+include $(depth)/make/stepmake.make 
+#
+
+# descent order into subdirectories:
+#
+ifeq ($(PACKAGE),STEPMAKE)
+SUBDIRS = bin make stepmake 
+else
+SUBDIRS =
+endif
+#
+
+#urg urg
+stepmake/aclocal.m4:
+       -$(LN) aclocal.m4 $@
+
+ifeq ($(PACKAGE),STEPMAKE)
+INSTALLATION_DIR=$(datadir)
+INSTALLATION_FILES=$(DIST_FILES) $(NON_ESSENTIAL_DIST_FILES) GNUmakefile config.make config.status
+include $(stepdir)/install-targets.make
+endif
+
+localclean:
+       rm -f bin/*.pyc
+       rm -f stepmake/stepmake stepmake/bin stepmake/aclocal.m4
index 0de4fdda7200549cfcf20dc530986d81423fc5be..110ee942eb7e9e15ac729179c2c96c8a70a89834 100644 (file)
@@ -1,6 +1,31 @@
 dnl aclocal.m4   -*-shell-script-*-
 dnl StepMake subroutines for configure.in
 
+function base ()
+{
+    expr "$1" : "\(/[^/]*\)"
+}
+
+function unbase ()
+{
+    expr "$1" : "/[^/]*\(.*\)"
+}
+
+function walk ()
+{
+    from=`(cd "$1" && pwd)`
+    to=`pwd`
+    t=`base "$to"`
+    f=`base "$from"`
+    while [ -n "$t" -a "$t" = "$f" ]; do
+       to=`unbase "$to"`
+       from=`unbase "$from"`
+       t=`base "$to"`
+       f=`base "$from"`
+    done
+    echo ..$to
+}
+
 AC_DEFUN(AC_STEPMAKE_BIBTEX2HTML, [
     AC_CHECK_PROGS(BIBTEX2HTML, bibtex2html bib2html, error)
     if test "$BIBTEX2HTML" = "bib2html"; then
@@ -145,10 +170,13 @@ AC_DEFUN(AC_STEPMAKE_DATADIR, [
 AC_DEFUN(AC_STEPMAKE_END, [
     AC_OUTPUT($CONFIGFILE.make:config.make.in)
 
-    rm -f $srcdir/GNUmakefile
-    cp $srcdir/make/toplevel.make.in $srcdir/GNUmakefile
-    chmod 444 $srcdir/GNUmakefile
-    if test "$builddir" != "."; then
+    # regular in-place build
+    # test for srcdir_build = yes ?
+    if test "$builddir" = "."; then
+       rm -f $srcdir/GNUmakefile
+       cp $srcdir/GNUmakefile.in $srcdir/GNUmakefile
+       chmod 444 $srcdir/GNUmakefile
+    else # --srcdir build
         rm -f GNUmakefile
        cp $srcdir/make/srcdir.make.in GNUmakefile
        chmod 444 GNUmakefile
@@ -239,19 +267,16 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
     if test "x$PACKAGE" = "xSTEPMAKE"; then
        AC_MSG_RESULT(Stepmake package!)
 
-       #if test "x$builddir" != "x"; then
-       #    builddir="../$builddir"
-       #else
-       #    builddir=..
-       #fi
-       if test "$srcdir" != "."; then
+       AC_MSG_CHECKING(builddir)
+       if test "$srcdir" = "."; then
+           builddir=.
+       else
            absolute_builddir="`pwd`"
            package_absolute_builddir="`dirname $absolute_builddir`"
            package_srcdir="`dirname  $srcdir`"
            builddir="`dirname $package_srcdir`/`basename $package_absolute_builddir`/`basename $absolute_builddir`"
-       else
-           builddir=.
        fi
+       AC_MSG_RESULT($builddir)
 
        (cd stepmake 2>/dev/null || mkdir stepmake)
        (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .)
@@ -261,11 +286,20 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
     else
         AC_MSG_RESULT($PACKAGE)
 
-       if test "$srcdir" != "."; then
-           absolute_builddir="`pwd`"
-           builddir="`dirname  $srcdir`/`basename $absolute_builddir`"
-       else
+       AC_MSG_CHECKING(builddir)
+       if test "$srcdir" = "."; then
            builddir=.
+           srcdir_build=no
+       else
+           absolute_builddir="`pwd`"
+#          builddir="`dirname  $srcdir`/`basename $absolute_builddir`"
+           builddir="`bash $srcdir/buildscripts/walk.sh \"$srcdir\"`"
+           srcdir_build=yes
+       fi
+       AC_MSG_RESULT($builddir)
+       if expr "$srcdir" : '/' > /dev/null 2>&1; then
+           absolute_srcdir=yes
+           AC_STEPMAKE_WARN(Absolute --srcdir specified: $srcdir)
        fi
 
        AC_MSG_CHECKING(for stepmake)
@@ -273,9 +307,14 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
        if test -d $stepmake; then
            AC_MSG_RESULT($stepmake)
        else
-           stepmake='$(depth)'/$srcdir/stepmake
+           if test "$absolute_srcdir" != "yes"; then
+               stepmake='$(depth)'/$srcdir/stepmake
+           else
+               stepmake=$srcdir/stepmake
+           fi
            AC_MSG_RESULT($srcdir/stepmake  ($datadir/stepmake not found))
        fi
+
        AC_CONFIG_AUX_DIR(\
          $HOME/usr/local/share/stepmake/bin\
          $HOME/usr/local/lib/stepmake/bin\
index edd16402654459bf93a67510202ae0b52d1ccfb2..70956185f8e36ce4b36401e44cae285ac0637ddb 100644 (file)
@@ -35,7 +35,7 @@ config = config$(CONFIGSUFFIX).make
 
 include $(config)
 
-SRCDIR=$(MAKE) -C $(srcdir) builddir=$(builddir) $@
+SRCDIR=$(MAKE) -C $(srcdir) -f GNUmakefile.in builddir=$(builddir) $@
 
 default: all
 
index 6e524643e06247b5ea7db23ff76042528f2e8c30..39cea41b9b2b645c9b8be68eab80682e6b9dbacc 100644 (file)
@@ -32,7 +32,7 @@ else
     configuration=$(depth)/config$(CONFIGSUFFIX).make
   else
     # user package
-    configuration=$(depth)/$(builddir)/config$(CONFIGSUFFIX).make
+    configuration=$(depth)/$(builddir)/config$(CONFIGSUFFIX).make
     # stepmake package
     configuration=$(depth)/../$(builddir)/stepmake/config$(CONFIGSUFFIX).make
   endif
@@ -41,7 +41,7 @@ endif
 include $(configuration)
 
 ifeq ($(builddir),.)
-  outroot=.
+  outroot=$(builddir)
 else
   outroot=$(depth)/$(builddir)/$(patsubst $(shell cd $(depth); pwd)%,%,$(shell cd .; pwd))
 endif
index 349ff922af839da542c1abccce16b2404aeb1abc..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 (file)
@@ -1,54 +0,0 @@
-# -*-Makefile-*-
-# title         specific top level makefile for StepMake
-
-# subdir level:
-#
-depth = .
-#
-
-# descent order into subdirectories:
-#
-ifeq ($(PACKAGE),STEPMAKE)
-SUBDIRS = bin make stepmake 
-else
-SUBDIRS =
-endif
-#
-
-# list of distribution files:
-#
-SCRIPTS = configure aclocal.m4
-README_FILES = CHANGES README TODO
-README_TXT_FILES = AUTHORS.txt INSTALL.txt
-EXTRA_DIST_FILES = $(IN_FILES) VERSION $(README_FILES)  $(SCRIPTS) INSTALL.texi
-NON_ESSENTIAL_DIST_FILES = $(README_TXT_FILES)
-#
-
-# bootstrap stepmake:
-#
-STEPMAKE_TEMPLATES=toplevel texinfo
-include $(depth)/make/stepmake.make 
-#
-
-# descent order into subdirectories:
-#
-ifeq ($(PACKAGE),STEPMAKE)
-SUBDIRS = bin make stepmake 
-else
-SUBDIRS =
-endif
-#
-
-#urg urg
-stepmake/aclocal.m4:
-       -$(LN) aclocal.m4 $@
-
-ifeq ($(PACKAGE),STEPMAKE)
-INSTALLATION_DIR=$(datadir)
-INSTALLATION_FILES=$(DIST_FILES) $(NON_ESSENTIAL_DIST_FILES) GNUmakefile config.make config.status
-include $(stepdir)/install-targets.make
-endif
-
-localclean:
-       rm -f bin/*.pyc
-       rm -f stepmake/stepmake stepmake/bin stepmake/aclocal.m4
index bec07af2d41bf67ae240672530f4d8a8ed41f512..5b53322e9258f6253e402d6e6d86df5f75b4f079 100644 (file)
@@ -17,12 +17,10 @@ $(outdir)/%/%.html: $(outdir)/%.texi
        $(deep-footify) $(sort $(wildcard $(outdir)/$(*F)/*.html))
 
 $(outdir)/%.dvi: $(outdir)/%.texi
-# ugh, --clean removes .. from TEXINPUTS?
-#      cd $(outdir); texi2dvi --batch --clean ../$< 
-       cd $(outdir); texi2dvi --batch ../$< 
+       cd $(outdir); texi2dvi --batch $(<F)
 
 $(outdir)/%.txt: $(outdir)/%.texi
-       $(MAKEINFO) --force -I../ -I $(outdir) --no-split --no-headers --output $@ $<
+       $(MAKEINFO) --force -I $(pwd) -I $(outdir) --no-split --no-headers --output $@ $<
 
 $(outdir)/%.texi: %.texi
        rm -f $@
index 9877a6771b56a95666aacf4631e9facd42a178bd..2039b624ccb20a6b571e1a8f886c51b672cad134 100644 (file)
@@ -12,7 +12,7 @@ local-distclean:
 local-maintainerclean:
        rm -f configure
 
-GNUmakefile: make/toplevel.make.in
+GNUmakefile: GNUmakefile.in
        $(MAKE) INFILE=$< OUTFILE=$@ -f $(stepdir)/automatically-generated.sub.make
 
 ifneq ($(PACKAGE),STEPMAKE)