From: Jan Nieuwenhuizen Date: Thu, 4 Jan 2001 16:03:04 +0000 (+0100) Subject: patch::: 1.3.120.jcn1 X-Git-Tag: release/1.3.121~2 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=a22b7ddea794271790a771b3f4bca86547071038;p=lilypond.git patch::: 1.3.120.jcn1 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 --- diff --git a/CHANGES b/CHANGES index 3a368ff587..e02ef62b98 100644 --- 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 ======= diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile index a4101cc14a..5c6310c150 100644 --- a/Documentation/user/GNUmakefile +++ b/Documentation/user/GNUmakefile @@ -3,7 +3,6 @@ depth=../.. - LATEX_FILES =$(wildcard *.latex) diff --git a/GNUmakefile.in b/GNUmakefile.in new file mode 100644 index 0000000000..37ac56142a --- /dev/null +++ b/GNUmakefile.in @@ -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 1d20a8cc00..98407b4c3d 100644 --- 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. diff --git a/aclocal.m4 b/aclocal.m4 index cc04f7b9e4..110ee942eb 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -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 index 0000000000..41d24b0319 --- /dev/null +++ b/buildscripts/walk.sh @@ -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 index 0000000000..193f1eaa3e --- /dev/null +++ b/input/bugs/coda-kludge.ly @@ -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"; diff --git a/input/test/coda-kludge.ly b/input/test/coda-kludge.ly index ea590a55eb..193f1eaa3e 100644 --- a/input/test/coda-kludge.ly +++ b/input/test/coda-kludge.ly @@ -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: diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make index f7017ed344..83a0972f8b 100644 --- a/make/lilypond-vars.make +++ b/make/lilypond-vars.make @@ -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)/ diff --git a/make/ly-rules.make b/make/ly-rules.make index a9d1be58fe..0577bae6e3 100644 --- a/make/ly-rules.make +++ b/make/ly-rules.make @@ -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 $@ diff --git a/make/srcdir.make.in b/make/srcdir.make.in index 3b460a7989..95954a1b23 100644 --- a/make/srcdir.make.in +++ b/make/srcdir.make.in @@ -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 diff --git a/make/stepmake.make b/make/stepmake.make index 9cfe90e50c..ae5f5cb46a 100644 --- a/make/stepmake.make +++ b/make/stepmake.make @@ -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 diff --git a/make/toplevel.make.in b/make/toplevel.make.in index 37ac56142a..e69de29bb2 100644 --- a/make/toplevel.make.in +++ b/make/toplevel.make.in @@ -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 - diff --git a/scripts/ly2dvi.py b/scripts/ly2dvi.py index 7b2f25c7f4..5df8c7ed28 100644 --- a/scripts/ly2dvi.py +++ b/scripts/ly2dvi.py @@ -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 index 0000000000..349ff922af --- /dev/null +++ b/stepmake/GNUmakefile.in @@ -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 diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 0de4fdda72..110ee942eb 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -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\ diff --git a/stepmake/make/srcdir.make.in b/stepmake/make/srcdir.make.in index edd1640265..70956185f8 100644 --- a/stepmake/make/srcdir.make.in +++ b/stepmake/make/srcdir.make.in @@ -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 diff --git a/stepmake/make/stepmake.make b/stepmake/make/stepmake.make index 6e524643e0..39cea41b9b 100644 --- a/stepmake/make/stepmake.make +++ b/stepmake/make/stepmake.make @@ -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 diff --git a/stepmake/make/toplevel.make.in b/stepmake/make/toplevel.make.in index 349ff922af..e69de29bb2 100644 --- a/stepmake/make/toplevel.make.in +++ b/stepmake/make/toplevel.make.in @@ -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 diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make index bec07af2d4..5b53322e92 100644 --- a/stepmake/stepmake/texinfo-rules.make +++ b/stepmake/stepmake/texinfo-rules.make @@ -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 $(