]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.37.jcn2
authorJan Nieuwenhuizen <janneke@gnu.org>
Wed, 22 Mar 2000 10:16:03 +0000 (11:16 +0100)
committerJan Nieuwenhuizen <janneke@gnu.org>
Wed, 22 Mar 2000 10:16:03 +0000 (11:16 +0100)
1.3.37.jcn2
===========

* Fixed srcdir build, so that you can do:

      tar xzf releases/lilypond-x.y.z
      mkdir <build>
      cd <build>
      ../lilypond-x.y.z/configure
      make

  as with any other gnu package.  All build output goes to <build>/out.

* Changed and fixed use of different configurations, and different output
  directories.  Finally, you can use different configurations alongside
  eachother.  From make/stepmake.make:

      # Use alternate configurations alongside eachother:
      #
      #     ./configure --enable-configsuffix=debug
      #     make conf=debug
      #
      # uses config-debug.make and config-debug.h; output goes to out-debug.
      #

      # Use same configuration, but different output directory:
      #
      #     make out=WWW
      #
      # uses config.make and config.h; output goes to out-WWW.
      #

24 files changed:
CHANGES
VERSION
aclocal.m4
buildscripts/set-lily.sh
config.make.in
lily/GNUmakefile
ly/params.ly
make/mutopia-targets.make
make/srcdir.make.in [new file with mode: 0644]
make/stepmake.make
make/toplevel.make.in
stepmake/CHANGES
stepmake/aclocal.m4
stepmake/config.make.in
stepmake/configure.in
stepmake/make/srcdir.make.in [new file with mode: 0644]
stepmake/make/stepmake.make
stepmake/stepmake/c++-vars.make
stepmake/stepmake/executable-targets.make
stepmake/stepmake/executable-vars.make
stepmake/stepmake/generic-targets.make
stepmake/stepmake/generic-vars.make
stepmake/stepmake/library-targets.make
stepmake/stepmake/toplevel-targets.make

diff --git a/CHANGES b/CHANGES
index 48793fd84a6eee7261ce9f138e8eb348383f0b61..d0aa853b8257d0a07d1ee4335443840652e4b0df 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,35 @@
+1.3.37.jcn2
+===========
+
+* Fixed srcdir build, so that you can do:
+
+      tar xzf releases/lilypond-x.y.z
+      mkdir <build>
+      cd <build>
+      ../lilypond-x.y.z/configure
+      make
+
+  as with any other gnu package.  All build output goes to <build>/out.
+
+* Changed and fixed use of different configurations, and different output
+  directories.  Finally, you can use different configurations alongside
+  eachother.  From make/stepmake.make:
+
+      # Use alternate configurations alongside eachother:
+      #
+      #     ./configure --enable-configsuffix=debug
+      #     make conf=debug
+      #
+      # uses config-debug.make and config-debug.h; output goes to out-debug.
+      #
+
+      # Use same configuration, but different output directory:
+      #
+      #     make out=WWW
+      #
+      # uses config.make and config.h; output goes to out-WWW.
+      #
+
 1.3.37.jcn1
 ===========
 
diff --git a/VERSION b/VERSION
index bda133cd29308704e4841b4b9611bc3e488e6297..5289c4ce6a2bce28a2204e4a5357f14a7b5318f4 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=37
-MY_PATCH_LEVEL=jcn1
+MY_PATCH_LEVEL=jcn2
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 92908e0e0a65cf53911b0af367a8929ec61fd007..53d9704aedf2c95f716acd0bf651cba0e619f396 100644 (file)
@@ -1,9 +1,3 @@
-dnl WARNING WARNING WARNING WARNING
-dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
-dnl WARNING WARNING WARNING WARNING
-dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
-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
 
@@ -138,9 +132,14 @@ AC_DEFUN(AC_STEPMAKE_DATADIR, [
 AC_DEFUN(AC_STEPMAKE_END, [
     AC_OUTPUT($CONFIGFILE.make:config.make.in)
 
-    rm -f GNUmakefile
-    cp make/toplevel.make.in ./GNUmakefile
-    chmod 444 GNUmakefile
+    rm -f $srcdir/GNUmakefile
+    cp $srcdir/make/toplevel.make.in $srcdir/GNUmakefile
+    chmod 444 $srcdir/GNUmakefile
+    if test "$builddir" != "."; then
+        rm -f GNUmakefile
+       cp $srcdir/make/srcdir.make.in GNUmakefile
+       chmod 444 GNUmakefile
+    fi
 ])
 
 AC_DEFUN(AC_STEPMAKE_GXX, [
@@ -192,19 +191,43 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
     AC_MSG_CHECKING(Package)
     if test "x$PACKAGE" = "xSTEPMAKE"; then
        AC_MSG_RESULT(Stepmake package!)
-       (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
-       (cd stepmake; rm -f bin; ln -s ../bin .)
+
+       #if test "x$builddir" != "x"; then
+       #    builddir="../$builddir"
+       #else
+       #    builddir=..
+       #fi
+       if test "$srcdir" != "."; then
+           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
+
+       (cd stepmake 2>/dev/null || mkdir stepmake)
+       (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .)
+       (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
        AC_CONFIG_AUX_DIR(bin)
        stepmake=stepmake
     else
         AC_MSG_RESULT($PACKAGE)
+
+       if test "$srcdir" != "."; then
+           absolute_builddir="`pwd`"
+           builddir="`dirname  $srcdir`/`basename $absolute_builddir`"
+       else
+           builddir=.
+       fi
+
        AC_MSG_CHECKING(for stepmake)
        # Check for installed stepmake
        if test -d $stepmake; then
            AC_MSG_RESULT($stepmake)
        else
-           stepmake='$(depth)'/stepmake
-           AC_MSG_RESULT(./stepmake  ($datadir/stepmake not found))
+           stepmake='$(depth)'/$srcdir/stepmake
+           AC_MSG_RESULT($srcdir/stepmake  ($datadir/stepmake not found))
        fi
        AC_CONFIG_AUX_DIR(\
          $HOME/usr/local/share/stepmake/bin\
@@ -216,9 +239,11 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
          /usr/share/stepmake/bin\
          /usr/lib/stepmake/bin\
          stepmake/bin\
+         $srcdir/stepmake/bin\
        )
     fi
 
+    AC_SUBST(builddir)
     AC_SUBST(stepmake)
     AC_SUBST(package)
     AC_SUBST(PACKAGE)
@@ -236,8 +261,6 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
 
     AUTOGENERATE="This file was automatically generated by configure"
     AC_SUBST(AUTOGENERATE)
-    absolute_builddir="`pwd`"
-    AC_SUBST(absolute_builddir)
 
     STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
     if test "x$STATE_VECTOR" != "x"; then
@@ -248,13 +271,9 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
     CONFIGSUFFIX=
     AC_ARG_ENABLE(config,
     [  enable-config=FILE      put configure settings in config-FILE.make],
-    [CONFIGSUFFIX=$enableval])
+    [CONFIGSUFFIX=-$enableval])
 
-    if test "$CONFIGSUFFIX" != "" ; then
-       CONFIGFILE=config-$CONFIGSUFFIX
-    else
-       CONFIGFILE=config
-    fi
+    CONFIGFILE=config$CONFIGSUFFIX
     AC_SUBST(CONFIGSUFFIX)
      
     AC_CANONICAL_HOST
index 7383d6308778ddd39ab2e15d64d10166bdf6023b..fad30f18d3e30f7ca3c6695841736066492a31d3 100755 (executable)
@@ -100,5 +100,5 @@ echo Starting configuration
 echo
 (set -x; TEX_TFMDIR=$TEX_TFMDIR ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise)
 
-echo "making tags in background"
-make TAGS >& log &
+echo "Making tags in background..."
+make TAGS > /dev/null 2>&1 &
index 91b7accc0105347d0fe7893ac162306449f055f2..a0d9338300b89e7df845d5f18e14be2174f59630 100644 (file)
@@ -21,8 +21,10 @@ CONFIGSUFFIX = @CONFIGSUFFIX@
 MAKEINFO = @MAKEINFO@
 ICFLAGS = @ICFLAGS@
 ILDFLAGS = @ILDFLAGS@
+builddir = @builddir@
 libdir = @libdir@
 prefix = @prefix@
+srcdir = @srcdir@
 TEXPREFIX = @TEXPREFIX@
 TEXDIR = @TEXDIR@
 MFDIR = @MFDIR@
index 37456760c9346e62af6933c3e3e67a45fc817ea3..16218df88e8373db8e0e5e055fad58cf64ac0605 100644 (file)
@@ -21,5 +21,3 @@ $(outdir)/my-lily-lexer.o: $(outdir)/parser.hh
 $(outdir)/lexer.o: $(outdir)/parser.hh
 $(outdir)/lily-version.o: $(outdir)/version.hh
 
-
-
index a0f86cdf287bcc59218adfb788fb950501c522c2..e0382e13e8f8a301342a74c74190fe8f2edcc40a 100644 (file)
@@ -51,21 +51,23 @@ space):
 
                = arithmetic_multiplier * arithmetic_basicspace
 
-   { choose: arithmetic_multiplier = 0.9*quartwidth (why?)}
+   { choose: arithmetic_multiplier = 1.0*quartwidth (why?)}
 
-               = 0.9*quartwidth * arithmetic_basicspace
+               = quartwidth * arithmetic_basicspace
 
    =>         
 
-   arithmetic_basicspace = 2/0.9 = 2.2
+   arithmetic_basicspace = 2/1 = 2
 
 If you want to space your music wider, use something like:
 
    arithmetic_basicspace = 4.;
 
 %}
+% We use 0.9*\quartwidth, because 1.0 seems to wide.
+% We don't adjust arithmetic_basicspace accordingly (why not?)
 arithmetic_multiplier = 0.9 * \quartwidth ;
-arithmetic_basicspace = 2.2;
+arithmetic_basicspace = 2.0;
 
 
 #'Stem_tremolo::beam-width = 1.5 * \quartwidth ; 
index 769b7ab8feed98a241bd0c080744df8c6042e41c..15a0e4cf7393d5389fd18919dd6e54b0c50009d0 100644 (file)
@@ -7,7 +7,7 @@ local-WWW: $(ly_examples) $(fly_examples) $(ps_examples) $(png_examples)
 #      $(footify) $(outdir)/index.html
 
 local-web:
-       $(MAKE) CONFIGSUFFIX=www local-WWW
+       $(MAKE) conf=www local-WWW
 
 convert-mudela: local-convert-mudela
        $(LOOP)
diff --git a/make/srcdir.make.in b/make/srcdir.make.in
new file mode 100644 (file)
index 0000000..3b460a7
--- /dev/null
@@ -0,0 +1,43 @@
+# -*-Makefile-*-
+# specific srcdir makefile for LilyPond  
+
+depth=.
+
+# Don't try to outsmart us, you puny computer!
+ifeq (0,${MAKELEVEL})
+  MAKE:=$(MAKE) --no-builtin-rules
+endif
+
+# Use alternate configurations alongside eachother:
+#
+#     ./configure --enable-configsuffix=debug
+#     make conf=debug
+#
+# uses config-debug.make and config-debug.h; output goes to out-debug.
+#
+ifdef conf
+  CONFIGSUFFIX=-$(conf)
+endif
+
+# Use same configuration, but different output directory:
+#
+#     make out=WWW
+#
+# uses config.make and config.h; output goes to out-WWW.
+#
+ifdef out
+  outbase=out-$(out)
+else
+  outbase=out$(CONFIGSUFFIX)
+endif
+
+config = config$(CONFIGSUFFIX).make
+
+include $(config)
+
+SRCDIR=$(MAKE) -C $(srcdir) builddir=$(builddir) $@
+
+default: all
+
+%:
+       $(SRCDIR)
index 47b5cd6a9037658ac48aedeb984e9edab058187f..c43fd0ffd6bc0ba02a91c38e5f04516887651b1d 100644 (file)
@@ -8,24 +8,56 @@ ifeq (0,${MAKELEVEL})
 endif
 .SUFFIXES:
 
+# Use alternate configurations alongside eachother:
+#
+#     ./configure --enable-configsuffix=debug
+#     make conf=debug
+#
+# uses config-debug.make and config-debug.h; output goes to out-debug.
+#
+ifdef conf
+  CONFIGSUFFIX=-$(conf)
+endif
 
-ifndef config
-  configuration=config
+# Use same configuration, but different output directory:
+#
+#     make out=WWW
+#
+# uses config.make and config.h; output goes to out-WWW.
+#
+ifdef out
+  outbase=out-$(out)
 else
-  configuration=config-$(config)
+  outbase=out$(CONFIGSUFFIX)
 endif
 
-include $(depth)/$(configuration).make
+ifdef config
+  configuration=$(config)
+else
+  ifeq ($(builddir),.)
+    configuration=$(depth)/config$(CONFIGSUFFIX).make
+  else
+    # user package
+    configuration=$(depth)/$(builddir)/config$(CONFIGSUFFIX).make
+    # stepmake package
+    #configuration=$(depth)/../$(builddir)/stepmake/config$(CONFIGSUFFIX).make
+  endif
+endif
 
-ifdef CONFIGSUFFIX
-outdir=out-$(CONFIGSUFFIX)
+include $(configuration)
+
+ifeq ($(builddir),.)
+  outroot=.
 else
-outdir=out
+  outroot=$(depth)/$(builddir)/$(patsubst $(shell cd $(depth); pwd)%,%,$(shell cd .; pwd))
 endif
 
+outdir=$(outroot)/$(outbase)
+config_h=$(depth)/$(builddir)/config$(CONFIGSUFFIX).h
+
 # user package
 stepdir = $(stepmake)/stepmake
-# for stepmake packageg
+# for stepmake package
 # stepdir = $(depth)/stepmake
 
 STEPMAKE_TEMPLATES := generic $(STEPMAKE_TEMPLATES) 
index c8a102b841edf2fdbc635b2eb41956b10b18c7d8..08713d005906dd61caad0112be877a83b35e6dc2 100644 (file)
@@ -9,7 +9,7 @@ depth = .
 # descent order into subdirectories:
 #
 SUBDIRS = scripts buildscripts  flower lily mf midi2ly po debian \
-       Documentation ly input tex make mutopia intl stepmake\
+       Documentation ly input tex make mutopia intl $(builddir)/stepmake\
        ps  scm
 #
 
@@ -34,16 +34,16 @@ fonts:
 
 
 htmldoc: 
-       $(MAKE) CONFIGSUFFIX='www' local-WWW
-       $(MAKE) CONFIGSUFFIX='www' -C Documentation WWW
+       $(MAKE) out='www' local-WWW
+       $(MAKE) out='www' -C Documentation WWW
        rm -f `find . -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) CONFIGSUFFIX='www' -C input WWW
-       $(MAKE) CONFIGSUFFIX='www' -C mutopia WWW
+       $(MAKE) out='www' -C input WWW
+       $(MAKE) out='www' -C mutopia WWW
        $(footify-all-command)
        $(PYTHON) $(buildscripts)/mutopia-index.py -o short-examples.html input/
        $(PYTHON) $(buildscripts)/mutopia-index.py -o long-examples.html mutopia/
index 92b1569541d5f01639f3b2c7ce3996cb132b6f34..980c358324fd109dc02c844190414868fc98aeba 100644 (file)
@@ -1,3 +1,6 @@
+pl 82
+       - allow srcdir builds
+
 pl 81
        - Yodl-free (tm)
        - bf: package-zet: too many symlinks
index d0f44c8d777e8134afdc7be27b10f4b2ff5d4c82..53d9704aedf2c95f716acd0bf651cba0e619f396 100644 (file)
@@ -1,7 +1,3 @@
-dnl WARNING WARNING WARNING WARNING
-dnl do not edit! this is aclocal.m4, generated from stepmake/aclocal.m4
-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
 
@@ -136,9 +132,14 @@ AC_DEFUN(AC_STEPMAKE_DATADIR, [
 AC_DEFUN(AC_STEPMAKE_END, [
     AC_OUTPUT($CONFIGFILE.make:config.make.in)
 
-    rm -f GNUmakefile
-    cp make/toplevel.make.in ./GNUmakefile
-    chmod 444 GNUmakefile
+    rm -f $srcdir/GNUmakefile
+    cp $srcdir/make/toplevel.make.in $srcdir/GNUmakefile
+    chmod 444 $srcdir/GNUmakefile
+    if test "$builddir" != "."; then
+        rm -f GNUmakefile
+       cp $srcdir/make/srcdir.make.in GNUmakefile
+       chmod 444 GNUmakefile
+    fi
 ])
 
 AC_DEFUN(AC_STEPMAKE_GXX, [
@@ -190,19 +191,43 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
     AC_MSG_CHECKING(Package)
     if test "x$PACKAGE" = "xSTEPMAKE"; then
        AC_MSG_RESULT(Stepmake package!)
-       (cd stepmake; rm -f stepmake; ln -s ../stepmake .)
-       (cd stepmake; rm -f bin; ln -s ../bin .)
+
+       #if test "x$builddir" != "x"; then
+       #    builddir="../$builddir"
+       #else
+       #    builddir=..
+       #fi
+       if test "$srcdir" != "."; then
+           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
+
+       (cd stepmake 2>/dev/null || mkdir stepmake)
+       (cd stepmake; rm -f stepmake; ln -s ../$srcdir/stepmake .)
+       (cd stepmake; rm -f bin; ln -s ../$srcdir/bin .)
        AC_CONFIG_AUX_DIR(bin)
        stepmake=stepmake
     else
         AC_MSG_RESULT($PACKAGE)
+
+       if test "$srcdir" != "."; then
+           absolute_builddir="`pwd`"
+           builddir="`dirname  $srcdir`/`basename $absolute_builddir`"
+       else
+           builddir=.
+       fi
+
        AC_MSG_CHECKING(for stepmake)
        # Check for installed stepmake
        if test -d $stepmake; then
            AC_MSG_RESULT($stepmake)
        else
-           stepmake='$(depth)'/stepmake
-           AC_MSG_RESULT(./stepmake  ($datadir/stepmake not found))
+           stepmake='$(depth)'/$srcdir/stepmake
+           AC_MSG_RESULT($srcdir/stepmake  ($datadir/stepmake not found))
        fi
        AC_CONFIG_AUX_DIR(\
          $HOME/usr/local/share/stepmake/bin\
@@ -214,9 +239,11 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
          /usr/share/stepmake/bin\
          /usr/lib/stepmake/bin\
          stepmake/bin\
+         $srcdir/stepmake/bin\
        )
     fi
 
+    AC_SUBST(builddir)
     AC_SUBST(stepmake)
     AC_SUBST(package)
     AC_SUBST(PACKAGE)
@@ -234,8 +261,6 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
 
     AUTOGENERATE="This file was automatically generated by configure"
     AC_SUBST(AUTOGENERATE)
-    absolute_builddir="`pwd`"
-    AC_SUBST(absolute_builddir)
 
     STATE_VECTOR=`ls make/STATE-VECTOR 2>/dev/null`
     if test "x$STATE_VECTOR" != "x"; then
@@ -246,13 +271,9 @@ AC_DEFUN(AC_STEPMAKE_INIT, [
     CONFIGSUFFIX=
     AC_ARG_ENABLE(config,
     [  enable-config=FILE      put configure settings in config-FILE.make],
-    [CONFIGSUFFIX=$enableval])
+    [CONFIGSUFFIX=-$enableval])
 
-    if test "$CONFIGSUFFIX" != "" ; then
-       CONFIGFILE=config-$CONFIGSUFFIX
-    else
-       CONFIGFILE=config
-    fi
+    CONFIGFILE=config$CONFIGSUFFIX
     AC_SUBST(CONFIGSUFFIX)
      
     AC_CANONICAL_HOST
index 5eb062aaf0af21f63ee59fd6d1605262648a15be..7fb382ef89141b985be7bdf8a7943db93c8f1f6d 100644 (file)
@@ -21,8 +21,10 @@ CONFIGSUFFIX = @CONFIGSUFFIX@
 MAKEINFO = @MAKEINFO@
 ICFLAGS = @ICFLAGS@
 ILDFLAGS = @ILDFLAGS@
+builddir = @builddir@
 libdir = @libdir@
 prefix = @prefix@
+srcdir = @srcdir@
 TEXPREFIX = @TEXPREFIX@
 TEXDIR = @TEXDIR@
 MFDIR = @MFDIR@
index 296e9fbae06f8631c556d4e376c96a73535852d5..e4907b1a8cb693f0d2909f6bdd9f4f3b292a3449 100644 (file)
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to produce a configure script.
 
 # Bootstrap the init proces.  List a file identifies your package.
 AC_INIT(make/stepmake.lsm.in)
-AC_CONFIG_HEADER($CONFIGFILE.hh:config.hh.in)
+AC_CONFIG_HEADER($CONFIGFILE.h:config.hh.in)
 
 # Bootstrap StepMake configure
 AC_STEPMAKE_INIT
diff --git a/stepmake/make/srcdir.make.in b/stepmake/make/srcdir.make.in
new file mode 100644 (file)
index 0000000..edd1640
--- /dev/null
@@ -0,0 +1,43 @@
+# -*-Makefile-*-
+# specific srcdir makefile for StepMake
+
+depth=..
+
+# Don't try to outsmart us, you puny computer!
+ifeq (0,${MAKELEVEL})
+  MAKE:=$(MAKE) --no-builtin-rules
+endif
+
+# Use alternate configurations alongside eachother:
+#
+#     ./configure --enable-configsuffix=debug
+#     make conf=debug
+#
+# uses config-debug.make and config-debug.h; output goes to out-debug.
+#
+ifdef conf
+  CONFIGSUFFIX=-$(conf)
+endif
+
+# Use same configuration, but different output directory:
+#
+#     make out=WWW
+#
+# uses config.make and config.h; output goes to out-WWW.
+#
+ifdef out
+  outbase=out-$(out)
+else
+  outbase=out$(CONFIGSUFFIX)
+endif
+
+config = config$(CONFIGSUFFIX).make
+
+include $(config)
+
+SRCDIR=$(MAKE) -C $(srcdir) builddir=$(builddir) $@
+
+default: all
+
+%:
+       $(SRCDIR)
index 3c7dade6d78e94a61627123c8d5a7d907b42a066..1130415d69bdf696d5818568d5cb2ab3e835ffff 100644 (file)
@@ -8,24 +8,56 @@ ifeq (0,${MAKELEVEL})
 endif
 .SUFFIXES:
 
+# Use alternate configurations alongside eachother:
+#
+#     ./configure --enable-configsuffix=debug
+#     make conf=debug
+#
+# uses config-debug.make and config-debug.h; output goes to out-debug.
+#
+ifdef conf
+  CONFIGSUFFIX=-$(conf)
+endif
 
-ifndef config
-  configuration=config
+# Use same configuration, but different output directory:
+#
+#     make out=WWW
+#
+# uses config.make and config.h; output goes to out-WWW.
+#
+ifdef out
+  outbase=out-$(out)
 else
-  configuration=config-$(config)
+  outbase=out$(CONFIGSUFFIX)
 endif
 
-include $(depth)/$(configuration).make
+ifdef config
+  configuration=$(config)
+else
+  ifeq ($(builddir),.)
+    configuration=$(depth)/config$(CONFIGSUFFIX).make
+  else
+    # user package
+    # configuration=$(depth)/$(builddir)/config$(CONFIGSUFFIX).make
+    # stepmake package
+    configuration=$(depth)/../$(builddir)/stepmake/config$(CONFIGSUFFIX).make
+  endif
+endif
 
-ifdef CONFIGSUFFIX
-outdir=out-$(CONFIGSUFFIX)
+include $(configuration)
+
+ifeq ($(builddir),.)
+  outroot=.
 else
-outdir=out
+  outroot=$(depth)/$(builddir)/$(patsubst $(shell cd $(depth); pwd)%,%,$(shell cd .; pwd))
 endif
 
+outdir=$(outroot)/$(outbase)
+config_h=$(depth)/$(builddir)/config$(CONFIGSUFFIX).h
+
 # user package
 # stepdir = $(stepmake)/stepmake
-# for stepmake packageg
+# for stepmake package
 stepdir = $(depth)/stepmake
 
 STEPMAKE_TEMPLATES := generic $(STEPMAKE_TEMPLATES) 
index e273cc7a48918649dde031e294c16788d2120cc9..119a35b546d3544655107c6aa65e089f662592e5 100644 (file)
@@ -6,8 +6,7 @@
 # EXTRA_CXXFLAGS= -Wall -Winline -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
 EXTRA_CXXFLAGS= -Wall  -W -Wmissing-prototypes -Wmissing-declarations -Wconversion
 
-
- CXXFLAGS = $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS) $($(PACKAGE)_CFLAGS) $($(PACKAGE)_CXXFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)
+CXXFLAGS = $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS) $($(PACKAGE)_CFLAGS) $($(PACKAGE)_CXXFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)
 CXX_OUTPUT_OPTION = $< -o $@
 DO_CXX_COMPILE=$(DODEP) $(CXX) -c $(CXXFLAGS) $(CXX_OUTPUT_OPTION)
 
index 85d77ef212e0019d39bcedcd551dcd0c04ff968a..66e33173a68a13071d4c45d48bf97d5b87126843 100644 (file)
@@ -5,7 +5,7 @@
 
 default: $(EXECUTABLE)
 
-$(EXECUTABLE): $(depth)/config.h $(O_FILES) $(outdir)/version.hh
+$(EXECUTABLE): $(outdir)/config.h $(O_FILES) $(outdir)/version.hh
        $(foreach a, $(MODULE_LIBS), $(MAKE) -C $(a) && ) true
        $(LD_COMMAND) $(O_FILES) $(LOADLIBES) $(USER_LDFLAGS)
 
index 117bfc5a5cc8441bf8a9fefed4d9947e320cd58f..784f8f603f0c0942b7937b3502f2ef977dcc4a34 100644 (file)
@@ -1,5 +1,6 @@
 # empty
 LDFLAGS = $(ILDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) $($(PACKAGE)_LDFLAGS)
 
-MODULE_LIBES =$(addsuffix /$(outdir)/library.a, $(MODULE_LIBS))
+## urg, silly name: library.a
+MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix /$(outbase)/library.a, $(MODULE_LIBS)))
 LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES)
index f886881856595e3bd16a2af2b867b85caed159a7..98e0724d1a9b8bcf3797b8b71c5b9150ea0785a7 100644 (file)
@@ -3,9 +3,7 @@
 
 .PHONY : all clean config default dist doc doc++  exe help html lib TAGS\
         po
-# VPATH=$(outdir)/             #ugh?
-# target all:
-#
+
 all:    default
        $(LOOP)
 
@@ -127,6 +125,9 @@ $(outdir)/VERSION: $(depth)/VERSION
 $(outdir)/version.hh: $(outdir)/VERSION
        $(PYTHON) $(step-bindir)/make-version.py $< > $@
 
+$(outdir)/config.h: $(config_h)
+       cp $< $@
+
 # should this be in Rules?
 configure: configure.in aclocal.m4
        autoconf 
@@ -166,7 +167,7 @@ include $(stepdir)/package.make
 include $(outdir)/dummy.dep $(DEP_FILES)
 
 $(outdir)/dummy.dep:
-       -mkdir $(outdir)
+       -mkdir -p $(outdir)
        touch $(outdir)/dummy.dep
 
 
index b9aacf192fa7fa88e7c5a87db417c628efe8e5cc..3fe7ed8dfb7660bb03c78aa5c4f3fabae950a0ef 100644 (file)
@@ -84,7 +84,8 @@ date := $(shell date +%x)     #duplicated?
 #
 ARFLAGS = ru
 
-INCLUDES =  $(depth) include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
+#INCLUDES =  $(depth)/$(builddir) include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
+INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
 
 # urg: for windows ?
 # LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
index ce12f8ff11fef678d125ecd808f4b6629260a44c..ad32b208740d4d133739cbd8773feb90476b0c27 100644 (file)
@@ -4,11 +4,11 @@
 
 default: $(LIBRARY)
 
-$(outdir)/library.a: $(depth)/config.h $(O_FILES) $(MODULE_LIBES)
+$(outdir)/library.a: $(outdir)/config.h $(O_FILES) $(MODULE_LIBES)
        $(AR_COMMAND) $(O_FILES)
        $(RANLIB_COMMAND)
 
-$(SHAREDLIBRARY):  $(depth)/config.h  $(O_FILES) $(MODULE_LIBES)
+$(SHAREDLIBRARY):  $(outdir)/config.h $(O_FILES) $(MODULE_LIBES)
        $(LD_COMMAND) $(O_FILES) -o $@.$(VERSION)
        rm -f $@
        ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $@.$(MAJOR_VERSION)
index faf6124c8f43442eaab72342c8bb946b9453513f..eb763be8af57eb4a98a7bc087b08d5e702a0a7ce 100644 (file)
@@ -26,7 +26,7 @@ index.html: check-top-web NEWS
        $(sed-version) < Documentation/topdocs/$(outdir)/topweb.html > $@
 
 WWW-clean: local-WWW-clean
-       $(MAKE) CONFIGSUFFIX='www' clean
+       $(MAKE) out='www' clean
 
 local-WWW-clean: