summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Nieuwenhuizen <janneke@gnu.org>2005-10-19 13:54:23 +0000
committerJan Nieuwenhuizen <janneke@gnu.org>2005-10-19 13:54:23 +0000
commit078703a6ab29f75983a55ac2cc35fe5f315da574 (patch)
treead7605418a5a3f93c431fc93dab1bec5c13b110e
parent75e2b24fabd5962901580b0d3627cee6b0aa41c1 (diff)
* stepmake/stepmake/*:
* */GNUmakefile: * config.make.in: * GNUmakefile.in: * stepmake/aclocal.m4: Friendlier --srcdir build, allowing `make' from any directory in build-dir. Cleanups. * make/srcdir.make.in: Remove. * lily/main.cc (setup_paths): Fix and document build-dir hack.
-rw-r--r--ChangeLog11
-rw-r--r--Documentation/GNUmakefile2
-rw-r--r--Documentation/user/GNUmakefile34
-rw-r--r--GNUmakefile.in65
-rwxr-xr-xautogen.sh11
-rw-r--r--config.make.in41
-rw-r--r--configure.in8
-rw-r--r--cygwin/README.in16
-rw-r--r--cygwin/lilypond.hint9
-rw-r--r--elisp/GNUmakefile8
-rw-r--r--lily/GNUmakefile21
-rw-r--r--lily/font-config.cc19
-rw-r--r--lily/lexer.ll20
-rw-r--r--lily/main.cc28
-rw-r--r--make/lilypond-vars.make12
-rw-r--r--make/mutopia-rules.make2
-rw-r--r--make/srcdir.make.in54
-rw-r--r--make/stepmake.make18
-rw-r--r--make/substitute.make2
-rw-r--r--mf/GNUmakefile21
-rw-r--r--python/GNUmakefile2
-rw-r--r--stepmake/aclocal.m460
-rwxr-xr-xstepmake/autogen.sh11
-rw-r--r--stepmake/stepmake/c++-vars.make18
-rw-r--r--stepmake/stepmake/c-vars.make11
-rw-r--r--stepmake/stepmake/compile-vars.make2
-rw-r--r--stepmake/stepmake/elisp-vars.make2
-rw-r--r--stepmake/stepmake/executable-vars.make2
-rw-r--r--stepmake/stepmake/generic-targets.make18
-rw-r--r--stepmake/stepmake/generic-vars.make83
-rw-r--r--stepmake/stepmake/help2man-rules.make2
-rw-r--r--stepmake/stepmake/makedir-vars.make7
-rw-r--r--stepmake/stepmake/metafont-rules.make12
-rw-r--r--stepmake/stepmake/metafont-vars.make2
-rw-r--r--stepmake/stepmake/metapost-vars.make3
-rw-r--r--stepmake/stepmake/pod-vars.make2
-rw-r--r--stepmake/stepmake/python-module-vars.make2
-rw-r--r--stepmake/stepmake/scm-vars.make2
-rw-r--r--stepmake/stepmake/script-vars.make12
-rw-r--r--stepmake/stepmake/shared-library-vars.make1
-rw-r--r--stepmake/stepmake/texinfo-rules.make6
-rw-r--r--stepmake/stepmake/texinfo-vars.make4
-rw-r--r--stepmake/stepmake/topdocs-targets.make2
-rw-r--r--stepmake/stepmake/toplevel-targets.make6
-rw-r--r--vim/GNUmakefile8
45 files changed, 316 insertions, 366 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e7222aaf8..87aaf0b80f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2005-10-19 Jan Nieuwenhuizen <janneke@gnu.org>
+ * stepmake/stepmake/*:
+ * */GNUmakefile:
+ * config.make.in:
+ * GNUmakefile.in:
+ * stepmake/aclocal.m4: Friendlier --srcdir build, allowing `make'
+ from any directory in build-dir. Cleanups.
+
+ * make/srcdir.make.in: Remove.
+
+ * lily/main.cc (setup_paths): Fix and document build-dir hack.
+
* SConstruct (CheckYYCurrentBuffer): Use TryCompile (there is no
main).
diff --git a/Documentation/GNUmakefile b/Documentation/GNUmakefile
index a7306c8524..423b551427 100644
--- a/Documentation/GNUmakefile
+++ b/Documentation/GNUmakefile
@@ -20,7 +20,7 @@ deep-WWW-clean:
rm -rf $(outdir)/wiki-dump
copy-for-me:
- $(foreach a, $(README_TOP_FILES), cp ../$(a) $(outdir)/$(a).txt && ) true
+ $(foreach a, $(README_TOP_FILES), cp $(top-src-dir)/$(a) $(outdir)/$(a).txt && ) true
OUT_TXT_FILES = $(addprefix $(outdir)/, $(addsuffix .txt, $(README_TOP_FILES)))
diff --git a/Documentation/user/GNUmakefile b/Documentation/user/GNUmakefile
index e8b8d0dbe5..de0b41538c 100644
--- a/Documentation/user/GNUmakefile
+++ b/Documentation/user/GNUmakefile
@@ -1,12 +1,12 @@
depth=../..
-LATEX_FILES =$(wildcard *.latex)
+LATEX_FILES =$(call src-wildcard,*.latex)
# todo: add latex.
DVI_FILES = $(TELY_FILES:%.tely=$(outdir)/%.dvi)
EXTRA_DIST_FILES= $(LATEX_FILES) $(IMAGES)
-IMAGES=$(wildcard *.png)
+IMAGES=$(call src-wildcard,*.png)
OUT_EPS_IMAGES=$(IMAGES:%.png=$(outdir)/%.eps)
OUT_PNG_IMAGES=$(IMAGES:%=$(outdir)/%)
@@ -30,7 +30,7 @@ OMF_FILES += $(outdir)/lilypond-internals.html.omf
LOCALSTEPMAKE_TEMPLATES=lilypond ly
-TEXINPUTS=$(topdir)/tex::
+TEXINPUTS=$(top-src-dir)/tex::
export TEXINPUTS
include $(depth)/make/stepmake.make
@@ -123,7 +123,7 @@ endif
endif
# All web targets, except info image symlinks and info docs are
-# installed in non-recursing target from TOPDIR
+# installed in non-recursing target from TOP-SRC-DIR
local-install-WWW: local-install-info
local-uninstall-WWW: local-uninstall-info
@@ -150,7 +150,7 @@ $(outdir)/lilypond.nexi: $(outdir)/lilypond-internals.texi
#
$(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
mkdir -p $(dir $@)
- $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(abs-srcdir)/Documentation/texinfo.css --html $<
+ $(MAKEINFO) -I$(outdir) --output=$(outdir)/lilypond --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
find $(outdir)/lilypond/ -name '*'.png -o -name '*'.ly | xargs rm -f
# symbolic links to save space
(cd $(outdir)/lilypond/ ; ln -sf ../*.png ../*.ly . )
@@ -159,27 +159,27 @@ $(outdir)/lilypond/index.html: $(outdir)/lilypond.texi $(OUT_PNG_IMAGES)
# One big page manual
#
$(outdir)/lilypond.html: $(outdir)/lilypond.texi
- $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(abs-srcdir)/Documentation/texinfo.css --html --no-split --no-headers $<
+ $(MAKEINFO) -I$(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
#
# The split internals reference
#
$(outdir)/lilypond-internals/index.html: $(outdir)/lilypond-internals.texi
mkdir -p $(dir $@)
- $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(abs-srcdir)/Documentation/texinfo.css --html $<
+ $(MAKEINFO) --output=$(outdir)/lilypond-internals --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
#
# One big page internals reference
#
$(outdir)/lilypond-internals.html: $(outdir)/lilypond-internals.texi
- $(MAKEINFO) --output=$@ --css-include=$(abs-srcdir)/Documentation/texinfo.css --html --no-split --no-headers $<
+ $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
#
# The split glossary
#
$(outdir)/music-glossary/index.html: $(outdir)/music-glossary.texi
mkdir -p $(dir $@)
- $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(abs-srcdir)/Documentation/texinfo.css --html $<
+ $(MAKEINFO) --output=$(outdir)/music-glossary --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
find $(outdir)/music-glossary/ -name '*'.png -o -name '*'.ly | xargs rm -f
# symbolic links to save space
(cd $(outdir)/music-glossary/ ; ln -sf ../*.png ../*.ly . )
@@ -240,8 +240,8 @@ local-clean:
rm -rf $(outdir)/lilypond $(outdir)/lilypond-internals $(outdir)/music-glossary
# lilypond.texi deps
-$(builddir)/mf/$(outconfbase)/feta16list.ly:
- $(MAKE) -C $(topdir)/mf
+$(top-build-dir)/mf/$(outconfbase)/feta16list.ly:
+ $(MAKE) -C $(top-src-dir)/mf
$(outdir)/lilypond.texi: $(ITELY_FILES) $(ITEXI_FILES)
$(outdir)/lilypond.nexi: $(ITELY_FILES) $(ITEXI_FILES)
@@ -258,15 +258,15 @@ ifneq ($(CROSS),yes)
# of lilypond-internals every time. however, this triggers
# compilation during install, which is a bad thing (tm).
-$(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(builddir)/lily/$(outconfbase)/lilypond
- cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-documentation
+$(outdir)/lilypond-internals.nexi $(outdir)/lilypond-internals.texi: $(top-build-dir)/lily/$(outconfbase)/lilypond
+ cd $(outdir) && $(top-build-dir)/lily/$(outconfbase)/lilypond --verbose $(top-src-dir)/ly/generate-documentation
rm -f $(outdir)/lilypond-internals.nexi
-ln $(outdir)/lilypond-internals.texi $(outdir)/lilypond-internals.nexi
## unused
$(outdir)/interfaces.itexi: dummy
- cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond $(abs-srcdir)/ly/generate-interface-doc
+ cd $(outdir) && $(top-build-dir)/lily/$(outconfbase)/lilypond $(top-src-dir)/ly/generate-interface-doc
else
@@ -281,9 +281,5 @@ endif
local-clean: local-delete
local-delete:
- -for i in $$(seq 0 9); do \
- for j in dvi eps eps.bbox eps.trans eps.trans.ps ps log png tex; do \
- rm -f $(outdir)/lily-$$i*$$j; \
- done; \
- done
+ find $(outdir)/ -name 'lily-[0-9]*' | xargs rm -f
-rm -f $(outdir)/*
diff --git a/GNUmakefile.in b/GNUmakefile.in
index 2f768d56b1..3d84a8363c 100644
--- a/GNUmakefile.in
+++ b/GNUmakefile.in
@@ -22,9 +22,9 @@ SUBDIRS = buildscripts python scripts \
#package=`echo $PACKAGE_NAME | tr '[A-Z]' '[a-z]'`
SCRIPTS = configure aclocal.m4 autogen.sh lexer-gcc-3.1.sh Doxyfile
-README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS HACKING
+README_FILES = ChangeLog COPYING DEDICATION ROADMAP THANKS HACKING
README_TXT_FILES = AUTHORS.txt README.txt INSTALL.txt NEWS.txt
-IN_FILES := $(wildcard *.in)
+IN_FILES := $(call src-wildcard,*.in)
PATCH_FILES = emacsclient.patch server.el.patch darwin.patch
EXTRA_DIST_FILES = VERSION .cvsignore SConstruct \
$(README_FILES) $(SCRIPTS) $(IN_FILES) $(PATCH_FILES)
@@ -69,20 +69,20 @@ footifymail = MAILADDRESS=bug-lilypond@gnu.org
local-WWW-post:
# need UTF8 setting in case this is hosted on a website.
- echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(builddir)/.htaccess
- $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(builddir)/examples.html ./
- cd $(builddir) && $(FIND) . -name '*.html' -print | $(footifymail) xargs $(footify)
- cd $(builddir) && find . -name \*.html~ -print | xargs rm -f
- cd $(builddir) && find Documentation input \
+ echo -e 'AddDefaultCharset utf-8\nAddCharset utf-8 .html\nAddCharset utf-8 .en\nAddCharset utf-8 .nl\nAddCharset utf-8 .txt\n' > $(top-build-dir)/.htaccess
+ $(PYTHON) $(buildscript-dir)/mutopia-index.py -o $(top-build-dir)/examples.html ./
+ cd $(top-build-dir) && $(FIND) . -name '*.html' -print | $(footifymail) xargs $(footify)
+ cd $(top-build-dir) && find . -name \*.html~ -print | xargs rm -f
+ cd $(top-build-dir) && find Documentation input \
$(web-ext:%=-path '*/out-www/*.%' -or) -type l \
> $(outdir)/weblist
- echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(builddir)/index.html
- echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(builddir)/index.html
- cd $(builddir) && ls *.html >> $(outdir)/weblist
- cat $(outdir)/weblist | (cd $(builddir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
+ echo '<META HTTP-EQUIV="refresh" content="0;URL=Documentation/out-www/index.html">' > $(top-build-dir)/index.html
+ echo '<html><body>Redirecting to the documentation index...</body></html>' >> $(top-build-dir)/index.html
+ cd $(top-build-dir) && ls *.html >> $(outdir)/weblist
+ cat $(outdir)/weblist | (cd $(top-build-dir); GZIP=-9v tar -czf $(outdir)/web.tar.gz -T -)
-share-prefix = $(builddir)/share
-tree-prefix = $(builddir)/share/lilypond/$(TOPLEVEL_VERSION)
+share-prefix = $(top-build-dir)/share
+tree-prefix = $(top-build-dir)/share/lilypond/$(TOPLEVEL_VERSION)
src-ext = c cc yy ll hh icc py scm tex ps texi itexi tely itely sh
@@ -90,18 +90,18 @@ web-clean:
$(MAKE) out=www clean
$(MAKE) $(tree-prefix)/lilypond-force
-default: $(config_h) builddir-setup
+default: $(config_h) build-dir-setup
-builddir-setup: $(tree-prefix)/lilypond-force
+build-dir-setup: $(tree-prefix)/lilypond-force
-PO_FILES = $(wildcard $(srcdir)/po/*.po)
-HELP_CATALOGS = $(PO_FILES:$(srcdir)/po/%.po=%)
+PO_FILES = $(call src-wildcard,$(src-depth)/po/*.po)
+HELP_CATALOGS = $(PO_FILES:$(src-depth)/po/%.po=%)
CATALOGS = $(HELP_CATALOGS:lilypond=)
$(tree-prefix)/lilypond-force link-tree: GNUmakefile
-# Preparing LilyPond tree for builddir exec
- cd $(builddir) && rm -rf lib share
- mkdir -p $(builddir)/lib/$(package)
+# Preparing LilyPond tree for build-dir exec
+ cd $(top-build-dir) && rm -rf lib share
+ mkdir -p $(top-build-dir)/lib/$(package)
mkdir -p $(tree-prefix)
mkdir -p $(tree-prefix)/dvips
mkdir -p $(tree-prefix)/elisp
@@ -113,19 +113,20 @@ $(tree-prefix)/lilypond-force link-tree: GNUmakefile
mkdir -p $(tree-prefix)/fonts/map
mkdir -p $(tree-prefix)/fonts/enc
mkdir -p $(tree-prefix)/tex
- cd $(builddir)/lib && \
+ cd $(top-build-dir)/lib && \
ln -s ../../../python/$(outconfbase) python
cd $(tree-prefix) && \
- ln -s $(abs-srcdir)/ly ly && \
- ln -s $(abs-srcdir)/ps && \
+ ln -s $(top-src-dir)/ly ly && \
+ ln -s ../../../mf mf && \
+ ln -s $(top-src-dir)/ps && \
ln -s ../../../python/$(outconfbase) python && \
- ln -s $(abs-srcdir)/scm && \
- ln -s $(abs-srcdir)/scripts scripts
+ ln -s $(top-src-dir)/scm && \
+ ln -s $(top-src-dir)/scripts scripts
cd $(tree-prefix)/dvips && \
ln -s ./../../mf/$(outconfbase) mf-out && \
- ln -s $(abs-srcdir)/ps
+ ln -s $(top-src-dir)/ps
cd $(tree-prefix)/tex && \
- ln -s $(abs-srcdir)/tex source && \
+ ln -s $(top-src-dir)/tex source && \
ln -s ../../../../tex/$(outconfbase) tex-out && \
ln -s ../../../../mf/$(outconfbase) mf-out
-cd $(tree-prefix)/fonts/otf && \
@@ -137,11 +138,11 @@ $(tree-prefix)/lilypond-force link-tree: GNUmakefile
-cd $(tree-prefix)/fonts/type1 && \
ln -s ../../../../../mf/$(outconfbase)/*.pfa .
cd $(tree-prefix)/fonts && \
- ln -s $(abs-srcdir)/mf source && \
+ ln -s $(top-src-dir)/mf source && \
true
-cd $(tree-prefix)/elisp && \
ln -sf ../../../../../elisp/$(outconfbase)/lilypond-words.el . && \
- ln -s $(abs-srcdir)/elisp/*.el .
+ ln -s $(top-src-dir)/elisp/*.el .
$(foreach i,$(CATALOGS), \
mkdir -p $(share-prefix)/locale/$i/LC_MESSAGES && \
cd $(share-prefix)/locale/$i/LC_MESSAGES && \
@@ -149,9 +150,9 @@ $(tree-prefix)/lilypond-force link-tree: GNUmakefile
# touch $@
touch $(tree-prefix)/lilypond-force
-local-clean: builddir-setup-clean
-builddir-setup-clean:
- cd $(builddir) && rm -rf share
+local-clean: build-dir-setup-clean
+build-dir-setup-clean:
+ cd $(top-build-dir) && rm -rf share
$(config_h): config.hh.in
#
diff --git a/autogen.sh b/autogen.sh
index 1d4c1b61ef..2fd8bebd5a 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -56,10 +56,13 @@ if test -n "$NOCONFIGURE"; then
fi
if test -z "$*"; then
- echo "warning: about to run \`./configure' without arguments."
- echo "arguments on the \`$0\'"
- echo "command line will be passed to \`./configure'."
- echo
+ cat <<EOF
+ Warning: about to run \`configure' without arguments.
+ arguments on the \`$0' command line
+ will be passed to \`configure'.
+
+ Invoke with --noconfigure to skip configure step.
+EOF
fi
echo Running $srcdir/configure $conf_flags "$@" ...
diff --git a/config.make.in b/config.make.in
index 004c597be6..fa49dacdff 100644
--- a/config.make.in
+++ b/config.make.in
@@ -7,10 +7,25 @@ MISSING_REQUIRED = @REQUIRED@
package-depth = @package_depth@
-USER_CFLAGS = @CPPFLAGS@ @CFLAGS@ @GUILE_CFLAGS@ @PANGO_FT2_CFLAGS@ @FREETYPE2_CFLAGS@
-USER_CXXFLAGS = @CPPFLAGS@ @CXXFLAGS@ @GUILE_CFLAGS@ @PANGO_FT2_CFLAGS@ @FREETYPE2_CFLAGS@
-USER_LDFLAGS = @LDFLAGS@ @GUILE_LDFLAGS@
-EXTRA_LIBES = @EXTRA_LIBES@ @LIBS@ @PANGO_FT2_LIBS@ @FONTCONFIG_LIBS@ @FREETYPE2_LIBS@
+FREETYPE2_CFLAGS = @FREETYPE2_CFLAGS@
+GTK2_CFLAGS = @GTK2_CFLAGS@
+GUILE_CFLAGS = @GUILE_CFLAGS@
+PANGO_FT2_CFLAGS = @PANGO_FT2_CFLAGS@
+
+CONFIG_CPPFLAGS = @CPPFLAGS@
+CONFIG_DEFINES = @DEFINES@
+
+CONFIG_CFLAGS = @CFLAGS@ $(GUILE_CFLAGS) $(FREETYPE2_CFLAGS) $(PANGO_FT2_CFLAGS)
+CONFIG_CXXFLAGS = @CXXFLAGS@ $(GUILE_CFLAGS) $(FREETYPE2_CFLAGS) $(PANGO_FT2_CFLAGS)
+
+FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
+GUILE_LIBS = @GUILE_LDFLAGS@
+GTK2_LIBS = @GTK2_LIBS@
+FREETYPE2_LIBS = @FREETYPE2_LIBS@
+PANGO_FT2_LIBS = @PANGO_FT2_LIBS@
+
+CONFIG_LIBS = @LIBS@ @EXTRA_LIBS@ $(GUILE_LIBS) $(PANGO_FT2_LIBS) $(FONTCONFIG_LIBS) $(FREETYPE2_LIBS)
+CONFIG_LDFLAGS = @LDFLAGS@
PACKAGE = @PACKAGE@
package = @package@
@@ -21,24 +36,25 @@ HAVE_LIBKPATHSEA_SO = @HAVE_LIBKPATHSEA_SO@
prefix = @prefix@
exec_prefix = @exec_prefix@
-builddir = @ugh_ugh_autoconf250_builddir@
+##configure-builddir = @ugh_ugh_autoconf250_builddir@
+configure-srcdir = @srcdir@
+
+bindir = @bindir@
build_lilypond_datadir = @build_package_datadir@
build_lilypond_libdir = @build_package_libdir@
-bindir = @bindir@
datadir = @datadir@
+docdir = $(datadir)/doc
+elispdir = $(datadir)/emacs/site-lisp
includedir = @includedir@
infodir = @infodir@
libdir = @libdir@
localedir = @localedir@
mandir = @mandir@
+omfdir = $(datadir)/omf
program_prefix = @program_prefix@
program_suffix = @program_suffix@
sharedstatedir = @sharedstatedir@
-srcdir = @srcdir@
stepmake = @stepmake@
-docdir = $(datadir)/doc
-omfdir = $(datadir)/omf
-elispdir = $(datadir)/emacs/site-lisp
package_datadir = $(datadir)/$(package)
package_infodir = $(infodir)/$(package)
@@ -75,6 +91,7 @@ DEFS = @DEFS@
DOTEXE = @DOTEXE@
FIND = @FIND@
FLEX = @FLEX@
+FLEXLEXER_PATH = @FLEXLEXER_PATH@
FONTFORGE = @FONTFORGE@
GCC = @GCC@
GROFF = @GROFF@
@@ -89,6 +106,7 @@ INIMETAFONT = @INIMETAFONT@
INSTALL = @INSTALL@
KPATHSEA_LIBS = @KPATHSEA_LIBS@
LD = @LD@
+LINK_GXX_STATICALLY = @LINK_GXX_STATICALLY@
LN = @LN@
LN_S = @LN_S@
MAKEINFO_PROGRAM = @MAKEINFO@
@@ -110,6 +128,3 @@ TAR = @TAR@
WINDRES = @WINDRES@
YACC = @YACC@
ZIP = @ZIP@
-FLEXLEXER_PATH = @FLEXLEXER_PATH@
-
-LINK_GXX_STATICALLY = @LINK_GXX_STATICALLY@
diff --git a/configure.in b/configure.in
index 0fdd49c8ac..beefed504c 100644
--- a/configure.in
+++ b/configure.in
@@ -85,16 +85,16 @@ AC_SEARCH_LIBS(mbrtowc, [mingwex msvcp60])
STEPMAKE_PROGS(PKG_CONFIG, pkg-config, REQUIRED, 0.9.0)
if test "$gui_b" = "yes"; then
STEPMAKE_GTK2(gtk+-2.0, REQUIRED, 2.4.0)
-fi # $gui_b
+fi
if test "$reloc_b" = "yes"; then
AC_DEFINE(ARGV0_RELOCATION)
-fi # $reloc_b
+fi
-STEPMAKE_FREETYPE2(freetype2, REQUIRED, 0)
-#STEPMAKE_PANGO(pango, REQUIRED, 1.6.0)
STEPMAKE_PANGO_FT2(pangoft2, REQUIRED, 1.6.0)
+#STEPMAKE_PANGO(pango, REQUIRED, 1.6.0)
STEPMAKE_FONTCONFIG(fontconfig, REQUIRED, 2.2.0)
+STEPMAKE_FREETYPE2(freetype2, REQUIRED, 0)
STEPMAKE_WINDOWS
diff --git a/cygwin/README.in b/cygwin/README.in
index 2d097d40e2..2be5f9a111 100644
--- a/cygwin/README.in
+++ b/cygwin/README.in
@@ -8,26 +8,22 @@ For more information, tutorial, documentation, packaging instructions, visit:
Runtime requirements:
bash
cygwin-1.5.11 or newer
- ec-fonts-mftraced
ghostscript
glib2-runtime
libfontconfig1
libfreetype2
libguile12-1.6.5-1 or newer
libiconv2
- libintl2
- libkpathsea3-2.0.2-15 or newer
+ libintl3
pango-runtime
python
- tetex-bin-2.0.2-15 or newer
- tetex-tiny or tetex-base
Suggested:
xorg-x11-base
emacs or vim
ghostscript-x11
rxvt
- tetex-x11
+ libkpathsea4-3.0.0-3 or newer
gv
Build requirements:
@@ -43,12 +39,12 @@ Build requirements:
libfontconfig-devel
libfreetype2-devel
libguile12-1.6.5-1 or newer
- libkpathsea3-2.0.2-15 or newer
+ libkpathsea4-3.0.0-3 or newer
pango-devel
python
sed
- tetex-devel-2.0.2-15 or newer
- texinfo-4.7 or newer
+ tetex-devel-3.0.0-3 or newer
+ texinfo-4.8 or newer
Website/documentation build requirements (lilypond-doc package):
@@ -102,7 +98,7 @@ Port notes:
LilyPond builds ootb with cygwin/mknetrel.
- Cygwin port maintained by: Bertalan Fodor
+ Cygwin port maintained by: Jan Nieuwenhuizen.
------------------
diff --git a/cygwin/lilypond.hint b/cygwin/lilypond.hint
index bfa4cf8bd5..c0728e0334 100644
--- a/cygwin/lilypond.hint
+++ b/cygwin/lilypond.hint
@@ -1,8 +1,7 @@
sdesc: "A program for printing sheet music"
category: Publishing
-requires: bash coreutils cygwin findutils ghostscript glib2-runtime libfontconfig1 libfreetype2 libguile12 libiconv2 libintl3 pango-runtime python _update-info-dir
-#suggests: emacs gsview lilypond-doc rxvt tetex-x11 xorg-x11-base libkpathsea4
+requires: bash coreutils cygwin findutils ghostscript glib2-runtime libfontconfig1 libfreetype26 libguile12 libiconv2 libintl3 pango-runtime python _update-info-dir
+#suggests: emacs gsview libkpathsea4 lilypond-doc tetex-bin tetex-tiny rxvt xorg-x11-base
ldesc: "A program for printing sheet music.
-LilyPond prints beautiful sheet music. It produces music notation
-from a description file. It excels at typesetting classical music, but
-you can also print pop-songs. LilyPond is part of the GNU Project."
+LilyPond lets you create music notation. It produces
+beautiful sheet music from a high-level description file."
diff --git a/elisp/GNUmakefile b/elisp/GNUmakefile
index 97558ad019..efb2026eab 100644
--- a/elisp/GNUmakefile
+++ b/elisp/GNUmakefile
@@ -14,12 +14,12 @@ include $(depth)/make/stepmake.make
LILYPOND_WORDS = $(outdir)/lilypond-words.el
LILYPOND_WORDS_DEPENDS =\
- $(topdir)/lily/lily-lexer.cc \
+ $(top-src-dir)/lily/lily-lexer.cc \
$(buildscript-dir)/lilypond-words.py \
- $(topdir)/scm/markup.scm \
- $(topdir)/ly/engraver-init.ly
+ $(top-src-dir)/scm/markup.scm \
+ $(top-src-dir)/ly/engraver-init.ly
$(LILYPOND_WORDS):
- cd $(topdir) && $(PYTHON) buildscripts/lilypond-words.py --el --dir=$(builddir)/elisp/$(outconfbase)
+ cd $(top-src-dir) && $(PYTHON) buildscripts/lilypond-words.py --el --dir=$(top-build-dir)/elisp/$(outconfbase)
all: $(LILYPOND_WORDS)
diff --git a/lily/GNUmakefile b/lily/GNUmakefile
index 04ad56acf4..f525d1fc7c 100644
--- a/lily/GNUmakefile
+++ b/lily/GNUmakefile
@@ -29,7 +29,7 @@ endif
# for profiling, link guile statically:
#
-# USER_LDFLAGS += -static -lltdl -ldl
+# CONFIG_LDFLAGS += -static -lltdl -ldl
#
ifeq ($(PLATFORM_WINDOWS),yes)
@@ -38,13 +38,13 @@ O_FILES += $(outdir)/lilypond.rc.o
$(outdir)/lilypond: $(outdir)/lilypond.rc.o
$(outdir)/lilypond.rc.o: $(outdir)/lilypond.ico $(outdir)/ly.ico
-$(builddir)/Documentation/pictures/$(outbase)/lilypond.ico:
- $(MAKE) -C $(abs-srcdir)/Documentation/pictures
-$(outdir)/lilypond.ico: $(builddir)/Documentation/pictures/$(outbase)/lilypond.ico
+$(top-build-dir)/Documentation/pictures/$(outbase)/lilypond.ico:
+ $(MAKE) -C $(top-src-dir)/Documentation/pictures
+$(outdir)/lilypond.ico: $(top-build-dir)/Documentation/pictures/$(outbase)/lilypond.ico
cp $< $@
-$(builddir)/Documentation/pictures/$(outbase)/ly.ico:
- $(MAKE) -C $(abs-srcdir)/Documentation/pictures
-$(outdir)/ly.ico: $(builddir)/Documentation/pictures/$(outbase)/ly.ico
+$(top-build-dir)/Documentation/pictures/$(outbase)/ly.ico:
+ $(MAKE) -C $(top-src-dir)/Documentation/pictures
+$(outdir)/ly.ico: $(top-build-dir)/Documentation/pictures/$(outbase)/ly.ico
cp $< $@
endif
@@ -83,7 +83,12 @@ local-po: $(outdir)/parser.cc
# ugh. For --srcdir builds, these must exist to satisfy their broken
# lexer.dep and parser.dep file entries.
-ifneq ($(srcdir), .)
+ifneq ($(configure-srcdir),.)
.PRECIOUS: $(outdir)/lexer.cc $(outdir)/parser.cc
endif
+
+foe:
+ @echo b:$(build-dir)
+ @echo s:$(src-dir)
+ @echo t:$(tree-dir)
diff --git a/lily/font-config.cc b/lily/font-config.cc
index cd21688ad7..c15f94f87e 100644
--- a/lily/font-config.cc
+++ b/lily/font-config.cc
@@ -29,18 +29,15 @@ init_fontconfig ()
font_config_global = FcConfigGetCurrent ();
Array<String> dirs;
- struct stat statbuf;
- String builddir = prefix_directory + "/mf/out/";
-
- if (stat (builddir.to_str0 (), &statbuf) == 0)
- dirs.push (builddir.to_str0 ());
- else
- {
- dirs.push (prefix_directory + "/fonts/otf/");
- dirs.push (prefix_directory + "/fonts/type1/");
- dirs.push (prefix_directory + "/fonts/svg/");
- }
+ /*
+ ugh. C&P main.cc
+ */
+ dirs.push (prefix_directory + "/fonts/otf/");
+ dirs.push (prefix_directory + "/fonts/type1/");
+ dirs.push (prefix_directory + "/fonts/cff/");
+ dirs.push (prefix_directory + "/fonts/svg/");
+
for (int i = 0; i < dirs.size (); i++)
{
String dir = dirs[i];
diff --git a/lily/lexer.ll b/lily/lexer.ll
index b4e3697a50..fe8dacfb78 100644
--- a/lily/lexer.ll
+++ b/lily/lexer.ll
@@ -862,26 +862,6 @@ scan_fraction (String frac)
return scm_cons (scm_from_int (n), scm_from_int (d));
}
-// Breaks for flex 2.5.31
-#if 0
-/* avoid silly flex induced gcc warnings */
-static void yy_push_state (int) {;}
-static void yy_pop_state () {;}
-static int yy_top_state () { return 0; }
-
-static void
-avoid_silly_flex_induced_gcc_warnings ()
-{
- (void)yy_start_stack_ptr;
- (void)yy_start_stack_depth;
- (void)yy_start_stack;
- yy_push_state (0);
- yy_pop_state ();
- yy_top_state ();
- avoid_silly_flex_induced_gcc_warnings ();
-}
-#endif
-
SCM
lookup_markup_command (String s)
{
diff --git a/lily/main.cc b/lily/main.cc
index 3fc4637273..2245a71396 100644
--- a/lily/main.cc
+++ b/lily/main.cc
@@ -393,20 +393,24 @@ setup_paths (char const *argv0)
}
/*
- ugh. C&P font-config.cc
+ When running from build dir, a full LILYPOND_PREFIX is set-up at
+
+ share/lilypond/TOPLEVEL_VERSION
+
+ This historical hack will allow the shorthand
+
+ LILYPONDPREFIX=. lily/out/lilypond ...
+
*/
struct stat statbuf;
- String builddir = prefix_directory + "/mf/out/";
- if (stat (builddir.to_str0 (), &statbuf) == 0)
- dirs.push (builddir.to_str0 ());
- else
- {
- dirs.push (prefix_directory + "/fonts/otf/");
- dirs.push (prefix_directory + "/fonts/type1/");
- dirs.push (prefix_directory + "/fonts/cff/");
- dirs.push (prefix_directory + "/fonts/svg/");
- dirs.push (prefix_directory + "/fonts/cff/");
- }
+ String build_prefix = prefix_directory + "share/lilypond/" TOPLEVEL_VERSION;
+ if (stat (build_prefix.to_str0 (), &statbuf) == 0)
+ prefix_directory = build_prefix;
+
+ dirs.push (prefix_directory + "/fonts/otf/");
+ dirs.push (prefix_directory + "/fonts/type1/");
+ dirs.push (prefix_directory + "/fonts/cff/");
+ dirs.push (prefix_directory + "/fonts/svg/");
for (int i = 0; i < dirs.size (); i++)
global_path.prepend (dirs[i]);
diff --git a/make/lilypond-vars.make b/make/lilypond-vars.make
index bcec04b21f..56d9d6ffb7 100644
--- a/make/lilypond-vars.make
+++ b/make/lilypond-vars.make
@@ -2,19 +2,19 @@
## settings to run LilyPond
# environment settings.
-export PATH:=$(builddir)/lily/$(outconfbase):$(builddir)/buildscripts/$(outconfbase):$(builddir)/scripts/$(outconfbase):$(PATH):
+export PATH:=$(top-build-dir)/lily/$(outconfbase):$(top-build-dir)/buildscripts/$(outconfbase):$(top-build-dir)/scripts/$(outconfbase):$(PATH):
export LILYPONDPREFIX:=$(build_lilypond_datadir)/$(TOPLEVEL_VERSION)
-export PYTHONPATH:=$(builddir)/python/$(outconfbase):$(PYTHONPATH)
-export DVIPSHEADERS:=$(builddir)/mf/out::
+export PYTHONPATH:=$(top-build-dir)/python/$(outconfbase):$(PYTHONPATH)
+export DVIPSHEADERS:=$(top-build-dir)/mf/out::
the-script-dir=$(wildcard $(script-dir))
ABC2LY = $(script-dir)/abc2ly.py
CONVERT_LY = $(script-dir)/convert-ly.py
-LILYPOND = $(builddir)/lily/$(outconfbase)/lilypond
+LILYPOND = $(top-build-dir)/lily/$(outconfbase)/lilypond
LILYPOND_BOOK = $(script-dir)/lilypond-book.py
-LILYPOND_BOOK_INCLUDES = -I $(pwd) -I $(outdir) -I$(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(builddir)/mf/$(outconfbase)/ -I $(builddir)/mf/out/
-LILYPOND_BOOK_FLAGS = --process="$(LILYPOND) --backend=eps --formats=ps,png --header=texidoc -I $(srcdir)/input/test -dinternal-type-checking -danti-alias-factor=2 -dgs-font-load"
+LILYPOND_BOOK_INCLUDES = -I $(src-dir)/ -I $(outdir) -I$(input-dir) -I $(input-dir)/regression/ -I $(input-dir)/test/ -I $(input-dir)/tutorial/ -I $(top-build-dir)/mf/$(outconfbase)/ -I $(top-build-dir)/mf/out/
+LILYPOND_BOOK_FLAGS = --process="$(LILYPOND) --backend=eps --formats=ps,png --header=texidoc -I $(top-src-dir)/input/test -dinternal-type-checking -danti-alias-factor=2 -dgs-font-load"
#texi-html for www only:
diff --git a/make/mutopia-rules.make b/make/mutopia-rules.make
index fd35071131..934b9464e0 100644
--- a/make/mutopia-rules.make
+++ b/make/mutopia-rules.make
@@ -13,7 +13,7 @@ $(outdir)/%.ly.txt: %.abc
$(outdir)/%.ly: %.abc
$(PYTHON) $(ABC2LY) --strict -o $@ $<
-# hmm. notdir builds srcdir builds?
+# hmm. notdir builds src-dir builds?
$(outdir)/%.png $(outdir)/%.pdf $(outdir)/%.ly $(outdir)/%.ps: $(outdir)/%.ly
cd $(outdir); $(LILYPOND) --pdf --png -danti-alias-factor=2 -ddelete-intermediate-files -dno-point-and-click -I $(shell pwd)/ $(notdir $<)
touch $(outdir)/$(basename $(notdir $<)).png
diff --git a/make/srcdir.make.in b/make/srcdir.make.in
deleted file mode 100644
index 734ce42bd4..0000000000
--- a/make/srcdir.make.in
+++ /dev/null
@@ -1,54 +0,0 @@
-# -*-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 configurations, 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)
-
-export SRCMAKE=$(MAKE) -C $(srcdir) -f GNUmakefile.in builddir=$(builddir)
-
-default: all
-
-%:
- $(SRCMAKE) $@
-
-web:
- $(SRCMAKE) out=www WWW
- $(SRCMAKE) out=www WWW-post
-
-web-install:
- $(SRCMAKE) out=www install-WWW
-
-install:
- $(SRCMAKE) install
- $(SRCMAKE) final-install
diff --git a/make/stepmake.make b/make/stepmake.make
index 9b1767fa06..6ca2126168 100644
--- a/make/stepmake.make
+++ b/make/stepmake.make
@@ -64,25 +64,17 @@ endif
ifdef config
config_make=$(config)
else
- ifeq ($(builddir),)
- config_make=$(depth)/config$(CONFIGSUFFIX).make
- else
- config_make=$(builddir)/config$(CONFIGSUFFIX).make
- endif
+ config_make=$(depth)/config$(CONFIGSUFFIX).make
endif
-ifeq ($(builddir),)
- outroot=.
-else
- outroot=$(builddir)$(patsubst $(shell cd $(depth); pwd)%,%,$(pwd))
-endif
+outroot=.
include $(config_make)
outdir=$(outroot)/$(outbase)
# why not generic ??
-config_h=$(builddir)/config$(CONFIGSUFFIX).hh
+config_h=$(top-build-dir)/config$(CONFIGSUFFIX).hh
# The outdir that was configured for: best guess to find binaries
outconfbase=out$(CONFIGSUFFIX)
@@ -115,7 +107,7 @@ all:
include $(addprefix $(stepdir)/,$(addsuffix -vars.make, $(STEPMAKE_TEMPLATES)))
-# ugh. need to do this because of PATH :=$(topdir)/..:$(PATH)
+# ugh. need to do this because of PATH :=$(top-src-dir)/..:$(PATH)
include $(addprefix $(depth)/make/,$(addsuffix -vars.make, $(LOCALSTEPMAKE_TEMPLATES)))
@@ -123,5 +115,3 @@ include $(addprefix $(depth)/make/,$(addsuffix -rules.make, $(LOCALSTEPMAKE_TEMP
include $(addprefix $(stepdir)/,$(addsuffix -rules.make, $(STEPMAKE_TEMPLATES)))
include $(addprefix $(depth)/make/,$(addsuffix -targets.make, $(LOCALSTEPMAKE_TEMPLATES)))
include $(addprefix $(stepdir)/,$(addsuffix -targets.make, $(STEPMAKE_TEMPLATES)))
-
-
diff --git a/make/substitute.make b/make/substitute.make
index b28874f118..1fe34a194f 100644
--- a/make/substitute.make
+++ b/make/substitute.make
@@ -35,5 +35,3 @@ ATVARIABLES = \
program_prefix\
program_suffix\
sharedstatedir\
- srcdir\
- step-bindir\
diff --git a/mf/GNUmakefile b/mf/GNUmakefile
index bef84b3a59..e1dd993fff 100644
--- a/mf/GNUmakefile
+++ b/mf/GNUmakefile
@@ -5,7 +5,7 @@ LOCALSTEPMAKE_TEMPLATES=lilypond
include $(depth)/make/stepmake.make
-AF_FILES = $(wildcard *.af)
+AF_FILES = $(call src-wildcard,*.af)
# hangs on feta23
MFTRACE_FLAGS= # --simplify
@@ -13,10 +13,10 @@ MFTRACE_FLAGS= # --simplify
EXTRA_DIST_FILES += README feta.tex
# We don't use $(MF_FILES), because there's more .mf cruft here
-FETA_MF_FILES = $(wildcard feta[0-9]*.mf)\
- $(wildcard feta-braces-[a-z].mf)\
- $(wildcard feta-alphabet*[0-9].mf)\
- $(wildcard parmesan[0-9]*.mf)
+FETA_MF_FILES = $(call src-wildcard,feta[0-9]*.mf)\
+ $(call src-wildcard,feta-braces-[a-z].mf)\
+ $(call src-wildcard,feta-alphabet*[0-9].mf)\
+ $(call src-wildcard,parmesan[0-9]*.mf)
STAFF_SIZES = 11 13 14 16 18 20 23 26
BRACES = a b c d e f g h i
@@ -49,7 +49,7 @@ TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)\
FETA_LIST_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%list.ly)
-ENCODING_FILE=$(findstring $(<:.mf=.enc), $(FETA_MF_FILES:.mf=.enc))
+ENCODING_FILE=$(findstring $(<F:.mf=.enc), $(FETA_MF_FILES:.mf=.enc))
MFTRACE_FLAGS=$(if $(ENCODING_FILE),--encoding $(ENCODING_FILE),) --no-afm
# only for fonts which
@@ -120,7 +120,7 @@ $(outdir)/aybabtu.otf $(outdir)/$(PFA_PREFIX)aybabtu.pfa $(outdir)/aybabtu.svg:
$(outdir)/aybabtu.fontname:
echo -n 'aybabtu' > $@
$(outdir)/aybabtu.subfonts:
- echo $(subst .mf,,$(wildcard feta-braces-[a-z].mf)) > $@
+ echo $(subst .mf,,$(call src-wildcard,feta-braces-[a-z].mf)) > $@
$(PE_SCRIPTS): $(buildscript-dir)/gen-emmentaler-scripts.py
$(PYTHON) $< --dir=$(outdir)
@@ -171,8 +171,8 @@ export MFINPUTS:=.:$(MFINPUTS)
.PHONY: tree-regen
# FIXME: temporary hack: must regenerate after building fonts
tree-regen:
- rm -rf $(builddir)/share
- ${MAKE} -C $(builddir) link-tree
+ rm -rf $(top-build-dir)/share
+ ${MAKE} -C $(top-build-dir) link-tree
default: pfa_warning $(ALL_GEN_FILES) $(outdir)/emmentaler-20.otf tree-regen
@@ -243,3 +243,6 @@ local-install:
local-uninstall:
-rm -f $(DESTDIR)$(local_lilypond_datadir)/dvips/map
-rmdir $(DESTDIR)$(local_lilypond_datadir)/dvips
+
+foe:
+ @echo mf:$(FETA_MF_FILES) \ No newline at end of file
diff --git a/python/GNUmakefile b/python/GNUmakefile
index 3600ab22d7..8c0791d7b1 100644
--- a/python/GNUmakefile
+++ b/python/GNUmakefile
@@ -5,7 +5,7 @@ STEPMAKE_TEMPLATES=c python-module install-out po
include $(depth)/make/stepmake.make
# unset al guile stuff from configure
-USER_LDFLAGS=
+CONFIG_LDFLAGS=
INSTALLATION_OUT_SUFFIXES=1
diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4
index 397b9d8be8..8df5168b8c 100644
--- a/stepmake/aclocal.m4
+++ b/stepmake/aclocal.m4
@@ -195,7 +195,7 @@ AC_DEFUN(STEPMAKE_COMPILE, [
fi
if test $profile_b = yes; then
- EXTRA_LIBES="-pg"
+ EXTRA_LIBS="-pg"
OPTIMIZE="$OPTIMIZE -pg"
fi
@@ -243,10 +243,8 @@ AC_DEFUN(STEPMAKE_COMPILE, [
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
- AC_SUBST(ICFLAGS)
- AC_SUBST(ILDFLAGS)
AC_SUBST(DEFINES)
- AC_SUBST(EXTRA_LIBES)
+ AC_SUBST(EXTRA_LIBS)
])
AC_DEFUN(STEPMAKE_CXX, [
@@ -254,13 +252,11 @@ AC_DEFUN(STEPMAKE_CXX, [
AC_PROG_CXX
STEPMAKE_OPTIONAL_REQUIRED(CXX, c++, $1)
- CPPFLAGS="$CPPFLAGS $DEFINES"
CXXFLAGS="$CXXFLAGS $OPTIMIZE"
- LDFLAGS="$LDFLAGS $EXTRA_LIBES"
+ LD='$(CXX)'
- AC_SUBST(CXXFLAGS)
AC_SUBST(CXX)
- LD='$(CXX)'
+ AC_SUBST(CXXFLAGS)
AC_SUBST(LD)
])
@@ -358,10 +354,26 @@ AC_DEFUN(STEPMAKE_END, [
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
+ else
+ if test -f $srcdir/GNUmakefile; then
+ cat <<EOF
+Source directory already configured. Please clean the source directory
+
+ make -C $srcdir distclean
+
+and rerun configure.
+EOF
+ exit 2
+ fi
+ rm -f GNUmakefile
+ cp $srcdir/GNUmakefile.in GNUmakefile
+ ## (cd $srcdir && find . -name GNUmakefile -o -name '*.make' | grep -v config.make | xargs tar -cf-) | tar -xf-
+ for i in $(cd $srcdir && find . -name GNUmakefile -o -name '*.make' | grep -v config.make); do
+ mkdir -p $(dirname $i)
+ ln -sf $srcdir/$i $i
+ done
+ ln -sf $srcdir/VERSION .
+ AC_SUBST(VPATH)
fi
])
@@ -661,6 +673,7 @@ AC_DEFUN(STEPMAKE_INIT, [
fi
AC_SUBST(ugh_ugh_autoconf250_builddir)
+ AC_SUBST(srcdir)
AC_SUBST(stepmake)
AC_SUBST(package)
AC_SUBST(PACKAGE)
@@ -1087,8 +1100,14 @@ AC_DEFUN(STEPMAKE_FREETYPE2, [
PKG_CHECK_MODULES(FREETYPE2, $1 >= $3, have_freetype2=yes, true)
if test "$have_freetype2" = yes; then
AC_DEFINE(HAVE_FREETYPE2)
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ CPPFLAGS="$FREETYPE2_CFLAGS $CPPFLAGS"
+ LIBS="$FREETYPE2_LIBS $LIBS"
AC_SUBST(FREETYPE2_CFLAGS)
AC_SUBST(FREETYPE2_LIBS)
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
else
# UGR
#r="lib$1-dev or $1-devel"
@@ -1102,8 +1121,15 @@ AC_DEFUN(STEPMAKE_GTK2, [
PKG_CHECK_MODULES(GTK2, $1 >= $3, have_gtk2=yes, true)
if test "$have_gtk2" = yes ; then
AC_DEFINE(HAVE_GTK2)
+ # Do not pollute user-CPPFLAGS with configure-CPPFLAGS
+ save_CPPFLAGS="$CPPFLAGS"
+ save_LIBS="$LIBS"
+ CPPFLAGS="$GTK2_CFLAGS $CPPFLAGS"
+ LIBS="$GTK2_LIBS $LIBS"
AC_SUBST(GTK2_CFLAGS)
AC_SUBST(GTK2_LIBS)
+ CPPFLAGS="$save_CPPFLAGS"
+ LIBS="$save_LIBS"
else
# UGR
# r="lib$1-dev or $1-devel"
@@ -1117,11 +1143,11 @@ AC_DEFUN(STEPMAKE_PANGO, [
PKG_CHECK_MODULES(PANGO, $1 >= $3, have_pango16=yes, true)
if test "$have_pango16" = yes ; then
AC_DEFINE(HAVE_PANGO16)
- PANGO_CFLAGS="$PANGO_CFLAGS $GTK2_CFLAGS"
- PANGO_LIBS="$PANGO_LIBS $GTK2_LIBS"
# Do not pollute user-CPPFLAGS with configure-CPPFLAGS
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
+ CPPFLAGS="$PANGO_CFLAGS $CPPFLAGS"
+ LIBS="$PANGO_LIBS $LIBS"
AC_CHECK_HEADERS([pango/pangofc-fontmap.h])
AC_CHECK_FUNCS([pango_fc_font_map_add_decoder_find_func])
AC_SUBST(PANGO_CFLAGS)
@@ -1142,8 +1168,6 @@ AC_DEFUN(STEPMAKE_PANGO_FT2, [
if test "$have_pangoft2" = yes ; then
AC_DEFINE(HAVE_PANGO16)
AC_DEFINE(HAVE_PANGO_FT2)
- PANGO_FT2_CFLAGS="$PANGO_FT2_CFLAGS $GTK2_CFLAGS"
- PANGO_FT2_LIBS="$PANGO_FT2_LIBS $GTK2_LIBS"
# Do not pollute user-CPPFLAGS with configure-CPPFLAGS
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
@@ -1168,12 +1192,10 @@ AC_DEFUN(STEPMAKE_FONTCONFIG, [
PKG_CHECK_MODULES(FONTCONFIG, $1 >= $3, have_fontconfig=yes, true)
if test "$have_fontconfig" = yes ; then
AC_DEFINE(HAVE_FONTCONFIG)
- FONTCONFIG_CFLAGS="$FONTCONFIG_CFLAGS"
- FONTCONFIG_LIBS="$FONTCONFIG_LIBS"
# Do not pollute user-CPPFLAGS with configure-CPPFLAGS
save_CPPFLAGS="$CPPFLAGS"
save_LIBS="$LIBS"
- CPPFLAGS="$CPPFLAGS $FONTCONFIG_CFLAGS"
+ CPPFLAGS="$FONTCONFIG_CFLAGS $CPPFLAGS"
LIBS="$FONTCONFIG_LIBS $LIBS"
AC_SUBST(FONTCONFIG_CFLAGS)
AC_SUBST(FONTCONFIG_LIBS)
diff --git a/stepmake/autogen.sh b/stepmake/autogen.sh
index 1d4c1b61ef..2fd8bebd5a 100755
--- a/stepmake/autogen.sh
+++ b/stepmake/autogen.sh
@@ -56,10 +56,13 @@ if test -n "$NOCONFIGURE"; then
fi
if test -z "$*"; then
- echo "warning: about to run \`./configure' without arguments."
- echo "arguments on the \`$0\'"
- echo "command line will be passed to \`./configure'."
- echo
+ cat <<EOF
+ Warning: about to run \`configure' without arguments.
+ arguments on the \`$0' command line
+ will be passed to \`configure'.
+
+ Invoke with --noconfigure to skip configure step.
+EOF
fi
echo Running $srcdir/configure $conf_flags "$@" ...
diff --git a/stepmake/stepmake/c++-vars.make b/stepmake/stepmake/c++-vars.make
index 89bce34419..955d5d3773 100644
--- a/stepmake/stepmake/c++-vars.make
+++ b/stepmake/stepmake/c++-vars.make
@@ -1,20 +1,20 @@
include $(stepdir)/compile-vars.make
-EXTRA_CXXFLAGS= -W -Wall -Wconversion
+EXTRA_CXXFLAGS = -W -Wall -Wconversion
#ifeq ($(MY_PATCH_LEVEL),)
#EXTRA_CXXFLAGS += -Werror
#endif
-ALL_CXXFLAGS = $(CXXFLAGS) $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS) $($(PACKAGE)_CFLAGS) $($(PACKAGE)_CXXFLAGS) $(USER_CXXFLAGS) $(EXTRA_CXXFLAGS) $(MODULE_CXXFLAGS)
+ALL_CXXPPFLAGS = $(DEFINES) $(INCLUDES:%=-I%)
+ALL_CXXFLAGS = $(CXXFLAGS) $(ALL_CXXPPFLAGS) $($(PACKAGE)_CXXFLAGS) $(CONFIG_CXXFLAGS) $(MODULE_CXXFLAGS) $(EXTRA_CXXFLAGS)
-# template files:
-TCC_FILES := $(wildcard *.tcc)
-HH_FILES := $(wildcard *.hh)
-CC_FILES := $(wildcard *.cc)
-INL_FILES := $(wildcard *.icc)
-YY_FILES := $(wildcard *.yy)
-LL_FILES := $(wildcard *.ll)
+TCC_FILES := $(call src-wildcard,*.tcc)
+HH_FILES := $(call src-wildcard,*.hh)
+CC_FILES := $(call src-wildcard,*.cc)
+INL_FILES := $(call src-wildcard,*.icc)
+YY_FILES := $(call src-wildcard,*.yy)
+LL_FILES := $(call src-wildcard,*.ll)
SOURCE_FILES+= $(CC_FILES) $(YY_FILES) $(INL_FILES) $(TCC_FILES) $(HH_FILES) $(LL_FILES)
diff --git a/stepmake/stepmake/c-vars.make b/stepmake/stepmake/c-vars.make
index 765ab367cb..5fcc77c409 100644
--- a/stepmake/stepmake/c-vars.make
+++ b/stepmake/stepmake/c-vars.make
@@ -1,9 +1,9 @@
include $(stepdir)/compile-vars.make
-H_FILES := $(wildcard *.h)
-C_FILES := $(wildcard *.c)
-Y_FILES := $(wildcard *.y)
-L_FILES := $(wildcard *.l)
+H_FILES := $(call src-wildcard,*.h)
+C_FILES := $(call src-wildcard,*.c)
+Y_FILES := $(call src-wildcard,*.y)
+L_FILES := $(call src-wildcard,*.l)
SOURCE_FILES+=$(Y_FILES) $(C_FILES) $(L_FILES) $(H_FILES)
@@ -14,4 +14,5 @@ TAGS_HEADERS += $(H_FILES)
ALL_C_SOURCES += $(H_FILES) $(C_FILES) $(Y_FILES) $(L_FILES)
-ALL_CFLAGS = $(CFLAGS) $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS)
+ALL_CPPFLAGS = $(CPPFLAGS) $(CONFIG_CPPFLAGS) $(DEFINES) $(INCLUDES:%=-I%)
+ALL_CFLAGS = $(CFLAGS) $(ALL_CPPFLAGS) $(CONFIG_CFLAGS) $(MODULE_CFLAGS) $(EXTRA_CFLAGS)
diff --git a/stepmake/stepmake/compile-vars.make b/stepmake/stepmake/compile-vars.make
index 085a4363e6..27ec062bfa 100644
--- a/stepmake/stepmake/compile-vars.make
+++ b/stepmake/stepmake/compile-vars.make
@@ -1,6 +1,6 @@
ARFLAGS = ru
-ALL_LDFLAGS = $(LDFLAGS) $(ILDFLAGS) $(EXTRA_LDFLAGS) $($(PACKAGE)_LDFLAGS) $(MODULE_LDFLAGS) $(USER_LDFLAGS)
+ALL_LDFLAGS = $(LDFLAGS) $(CONFIG_LDFLAGS) $($(PACKAGE)_LDFLAGS) $(MODULE_LDFLAGS) $(CONFIG_LDFLAGS)
PIC_FLAGS = -fpic -fPIC
SHARED_FLAGS = -shared
diff --git a/stepmake/stepmake/elisp-vars.make b/stepmake/stepmake/elisp-vars.make
index 14bc8e4d85..5461eaaa3a 100644
--- a/stepmake/stepmake/elisp-vars.make
+++ b/stepmake/stepmake/elisp-vars.make
@@ -1,3 +1,3 @@
-EL_FILES := $(wildcard *.el)
+EL_FILES := $(call src-wildcard,*.el)
SOURCE_FILES += $(EL_FILES)
diff --git a/stepmake/stepmake/executable-vars.make b/stepmake/stepmake/executable-vars.make
index 5ac8fcd982..3825101eb6 100644
--- a/stepmake/stepmake/executable-vars.make
+++ b/stepmake/stepmake/executable-vars.make
@@ -1,5 +1,5 @@
MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix /$(outbase)/library.a, $(MODULE_LIBS)))
-LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES)
+LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(CONFIG_LIBS)
EXECUTABLE = $(outdir)/$(NAME)
EXECUTABLES = $(notdir $(EXECUTABLE))
diff --git a/stepmake/stepmake/generic-targets.make b/stepmake/stepmake/generic-targets.make
index aa4aea291a..75194985a3 100644
--- a/stepmake/stepmake/generic-targets.make
+++ b/stepmake/stepmake/generic-targets.make
@@ -30,7 +30,7 @@ maintainerclean:
# configure:
#
config:
- ./$(depth)/configure
+ ./$(src-depth)/configure
#
@@ -67,10 +67,10 @@ local-help:
local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
mkdir -p $(distdir)/$(localdir)
- $(LN) $(DIST_FILES) $(distdir)/$(localdir)
+ $(LN) $(DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir)
case "$(NON_ESSENTIAL_DIST_FILES)x" in x) ;; *) \
- $(LN) $(NON_ESSENTIAL_DIST_FILES) $(distdir)/$(localdir);; \
+ $(LN) $(NON_ESSENTIAL_DIST_FILES:%=$(src-dir)/%) $(distdir)/$(localdir);; \
esac
case "$(OUT_DIST_FILES)x" in x) ;; *) \
@@ -79,7 +79,7 @@ local-dist: $(DIST_FILES) $(OUT_DIST_FILES) $(NON_ESSENTIAL_DIST_FILES)
esac
# $(foreach i, $(SUBDIRS), $(MAKE) distdir=../$(distdir) localdir=$(localdir)/$(i) -C $(i) local-dist &&) true
# absolute for installed stepmake
- $(foreach i, $(SUBDIRS), $(MAKE) topdir=$(topdir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
+ $(foreach i, $(SUBDIRS), $(MAKE) top-src-dir=$(top-src-dir) distdir=$(distdir) localdir=$(localdir)/$(notdir $(i)) -C $(i) local-dist &&) true
@@ -105,7 +105,7 @@ $(outdir)/config.hh: $(config_h)
cp -p $< $@
configure: configure.in aclocal.m4
- NOCONFIGURE=yes $(srcdir)/autogen.sh
+ NOCONFIGURE=yes $(src-depth)/autogen.sh
chmod +x configure
local-clean:
@@ -152,11 +152,11 @@ check: local-check
local-check:
# ugh. ugh ugh ugh
-$(config_make): $(topdir)/configure
+$(config_make): $(top-src-dir)/configure
@echo "************************************************************"
@echo "configure changed! You should probably reconfigure manually."
@echo "************************************************************"
- (cd $(builddir); ./config.status)
+ (cd $(top-build-dir); ./config.status)
touch $@ # do something for multiple simultaneous configs.
@@ -165,11 +165,11 @@ deb:
cd $(depth) && debuild
diff:
- $(PYTHON) $(step-bindir)/package-diff.py --outdir=$(topdir)/$(outdir) --package=$(topdir) $(makeflags)
+ $(PYTHON) $(step-bindir)/package-diff.py --outdir=$(top-src-dir)/$(outdir) --package=$(top-src-dir) $(makeflags)
-ln -f $(depth)/$(outdir)/$(distname).diff.gz $(patch-dir)
release:
- $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)
+ $(PYTHON) $(step-bindir)/release.py --outdir=$(top-src-dir)/$(outdir) --package=$(top-src-dir)
################ website.
diff --git a/stepmake/stepmake/generic-vars.make b/stepmake/stepmake/generic-vars.make
index d228d5f9f2..1e8d39353a 100644
--- a/stepmake/stepmake/generic-vars.make
+++ b/stepmake/stepmake/generic-vars.make
@@ -1,72 +1,57 @@
-# directory names:
+top-build-dir = $(shell cd $(depth) && pwd)
+build-dir = $(shell cd . && pwd)
+tree-dir = $(subst $(top-build-dir),,$(build-dir))
-# depth from group-dir
-# internal, not normally used
-DEPTH = $(depth)/$(package-depth)
-
-#ifeq ($(topdir),)
-#abs-srcdir := $(shell cd $(depth); pwd)
-##deprecated
-#topdir := $(abs-srcdir)
-#endif
-
-## `which pwd` is to prevent symlink resolving intelligence
-pwd:=$(shell `which pwd`)
-current-relative-dir:=$(subst $(strip $(shell cd $(depth); `which pwd`)),,$(pwd))
+ifneq ($(configure-srcdir),.)
+srcdir-build = 1
+endif
-ifeq ($(srcdir),.)
+ifndef srcdir-build
src-depth = $(depth)
else
-src-depth = $(srcdir)
+src-depth = $(configure-srcdir)
endif
-ifeq ($(topdir),)
-abs-srcdir := $(shell cd $(src-depth); pwd)
-topdir := $(abs-srcdir)
+top-src-dir := $(shell cd $(src-depth); pwd)
+
+ifndef srcdir-build
+src-dir = .
+else
+src-dir = $(top-src-dir)$(tree-dir)
+VPATH = $(src-dir)
endif
-# derived names
+.UNEXPORT: build-dir src-dir tree-dir
+
+src-wildcard = $(subst $(src-dir)/,,$(wildcard $(src-dir)/$(1)))
+
ifeq ($(distdir),)
- distdir = $(topdir)/$(outdir)/$(DIST_NAME)
+ distdir = $(top-src-dir)/$(outdir)/$(DIST_NAME)
DIST_NAME = $(package)-$(TOPLEVEL_VERSION)
endif
distname = $(package)-$(TOPLEVEL_VERSION)
doc-dir = $(src-depth)/Documentation
po-dir = $(src-depth)/po
-
-# sort-out which of these are still needed
-#
-$(package)_bindir = $(depth)/bin
step-bindir = $(stepmake)/bin
+# stepmake package support.
+DEPTH = $(depth)/$(package-depth)
+
group-dir = $(shell cd $(DEPTH);pwd)/..
release-dir = $(group-dir)/releases
patch-dir = $(group-dir)/patches
-#
-# i have in $HOME/.rpmrc
-# topdir: /home/fred/usr/src/Redhat
-#
rpm-sources = $(release-dir)
rpm-build = $(group-dir)/RedHat/BUILD
-#
-
-# package-icon=$(outdir)/$(package)-icon.gif
-package-icon=$(outdir)/$(package)-icon.xpm
+package-icon = $(outdir)/$(package)-icon.xpm
-
-# need to be defined in local Makefiles:
-#
-FOOBAR =
-# the version:
-#
-ifneq ($(MY_PATCH_LEVEL),$(FOOBAR))
+ifneq ($(strip $(MY_PATCH_LEVEL)),)
VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL).$(MY_PATCH_LEVEL)
else
VERSION=$(MAJOR_VERSION).$(MINOR_VERSION).$(PATCH_LEVEL)
endif
-ifneq ($(TOPLEVEL_MY_PATCH_LEVEL),$(FOOBAR))
+ifneq ($(strip $(TOPLEVEL_MY_PATCH_LEVEL)),)
TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL).$(TOPLEVEL_MY_PATCH_LEVEL)
else
TOPLEVEL_VERSION=$(TOPLEVEL_MAJOR_VERSION).$(TOPLEVEL_MINOR_VERSION).$(TOPLEVEL_PATCH_LEVEL)
@@ -83,20 +68,18 @@ ERROR_LOG = 2> /dev/null
SILENT_LOG = 2>&1 > /dev/null
date := $(shell date +%x) #duplicated?
-INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
+INCLUDES = $(src-dir)/include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
M4 = m4
-#replace to do stripping of certain objects
-STRIPDEBUG=true
-
-DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(wildcard SConscript)
+DIST_FILES=$(EXTRA_DIST_FILES) GNUmakefile $(ALL_SOURCES) $(src-wildcard,SConscript)
DOCDIR=$(depth)/$(outdir)
+#?
+STRIPDEBUG=true
STRIP=strip --strip-debug
-
-# substitute $(STRIP) in Site.make if you want stripping
DO_STRIP=true
+
LOOP=$(foreach i, $(SUBDIRS), $(MAKE) PACKAGE=$(PACKAGE) package=$(package) -C $(i) $@ &&) true
ETAGS_FLAGS =
@@ -104,7 +87,7 @@ CTAGS_FLAGS =
makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
-IN_FILES := $(wildcard *.in)
+IN_FILES := $(call src-wildcard,*.in)
SOURCE_FILES += $(IN_FILES)
# Preprocessed .in documentation _FILES:
@@ -118,8 +101,6 @@ HOST_ARCH=$(shell $(CC) -dumpmachine)
ifeq ($(HOST_ARCH),i686-pc-cygwin)
CYGWIN_BUILD = yes
endif
-#
-# ugh-- what if someone decides on: 'i568-pc-cygwin-gnu'
ifeq ($(HOST_ARCH),i686-cygwin)
CYGWIN_BUILD = yes
endif
diff --git a/stepmake/stepmake/help2man-rules.make b/stepmake/stepmake/help2man-rules.make
index bdc00ac737..51073c20b1 100644
--- a/stepmake/stepmake/help2man-rules.make
+++ b/stepmake/stepmake/help2man-rules.make
@@ -15,7 +15,7 @@
# cases. Four more explaining what a line comment is, and that it may
# be parsed, same here.
-HELP2MAN_COMMAND = $(PERL) $(builddir)/buildscripts/$(outbase)/help2man $< > $@
+HELP2MAN_COMMAND = $(PERL) $(top-build-dir)/buildscripts/$(outbase)/help2man $< > $@
ifeq ($(strip $(CROSS)),no)
$(outdir)/%.1: $(outdir)/%
diff --git a/stepmake/stepmake/makedir-vars.make b/stepmake/stepmake/makedir-vars.make
index 3be7d7f87e..0145a270bb 100644
--- a/stepmake/stepmake/makedir-vars.make
+++ b/stepmake/stepmake/makedir-vars.make
@@ -1,8 +1,9 @@
-MAKE_FILES := $(wildcard *.make)
-LSM_FILES:= $(wildcard *.lsm.in)
+MAKE_FILES := $(call src-wildcard,*.make)
+LSM_FILES:= $(call src-wildcard,*.lsm.in)
+SPEC_FILES:= $(call src-wildcard,*.spec.in)
+
OUTLSM_FILES=$(addprefix $(outdir)/,$(basename $(LSM_FILES)))
-SPEC_FILES:= $(wildcard *.spec.in)
OUTSPEC_FILES=$(addprefix $(outdir)/,$(basename $(SPEC_FILES)))
OUT_DIST_FILES= $(strip $(OUTLSM_FILES) $(OUTSPEC_FILES))
diff --git a/stepmake/stepmake/metafont-rules.make b/stepmake/stepmake/metafont-rules.make
index d1bbc418d5..cd61be5907 100644
--- a/stepmake/stepmake/metafont-rules.make
+++ b/stepmake/stepmake/metafont-rules.make
@@ -3,25 +3,25 @@
# we want to see botched results as well.
$(outdir)/%.dvi: %.mf
- -$(METAFONT) "\scrollmode; input $<;"
- gftodvi $(basename $<)
+ -MFINPUTS=$(src-dir) $(METAFONT) "\scrollmode; input $<;"
+ gftodvi $(basename $<)
mv $(basename $<).dvi $(outdir)
rm $(basename $<).*gf
# This is not metafont, this is feta-specific
$(outdir)/%.log: %.mf
- $(METAFONT) "\mode:=$(MFMODE); nonstopmode; input $<;"
+ MFINPUTS=$(src-dir) $(METAFONT) "\mode:=$(MFMODE); nonstopmode; input $<;"
mv $(@F) $@
rm $(basename $(@F)).*gf
$(outdir)/%.tfm $(outdir)%.log: %.mf
- $(METAFONT) "\mode:=$(MFMODE); nonstopmode; input $<;"
+ MFINPUTS=$(src-dir) $(METAFONT) "\mode:=$(MFMODE); nonstopmode; input $<;"
# Let's keep this log output, it saves another mf run.
mv $(basename $(@F)).log $(basename $(@F)).tfm $(outdir)
rm $(basename $(@F)).*gf
$(outdir)/%.$(XPM_RESOLUTION)gf: %.mf
- $(METAFONT) "\\mode=$(XPM_MODE); \\input $<"
+ MFINPUTS=$(src-dir) $(METAFONT) "\\mode=$(XPM_MODE); \\input $<"
# Let's keep this log output, it saves another mf run.
mv $(@F) $(basename $(@F)).log $(basename $(@F)).tfm $(outdir)
@@ -31,7 +31,7 @@ $(outdir)/%.$(XPM_RESOLUTION)pk: $(outdir)/%.$(XPM_RESOLUTION)gf
MFTRACE_FORMATS = pfa pfb svg
$(outdir)/%.pfb $(outdir)/%.svg $(outdir)/%.pfa: %.mf
- $(MFTRACE) $(MFTRACE_FLAGS) -I $(outdir)/ --formats=pfa,pfb,svg $(basename $(@F))
+ MFINPUTS=$(src-dir) $(MFTRACE) $(MFTRACE_FLAGS) -I $(src-dir) -I $(outdir)/ --formats=pfa,pfb,svg $(basename $(@F))
# -mv $(MFTRACE_FORMATS:%=$(basename $(@F).%)) $(outdir)
-mv $(basename $(@F)).pfa $(outdir)
-mv $(basename $(@F)).pfb $(outdir)
diff --git a/stepmake/stepmake/metafont-vars.make b/stepmake/stepmake/metafont-vars.make
index 96af147311..c1636f1c9f 100644
--- a/stepmake/stepmake/metafont-vars.make
+++ b/stepmake/stepmake/metafont-vars.make
@@ -1,5 +1,5 @@
-MF_FILES := $(wildcard *.mf)
+MF_FILES := $(call src-wildcard,*.mf)
EXTRA_DIST_FILES += $(MF_FILES)
MF_TFM_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.tfm))
MF_DVI_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.dvi))
diff --git a/stepmake/stepmake/metapost-vars.make b/stepmake/stepmake/metapost-vars.make
index c8c73d2168..1dae6a2171 100644
--- a/stepmake/stepmake/metapost-vars.make
+++ b/stepmake/stepmake/metapost-vars.make
@@ -1,7 +1,4 @@
-# MF_FILES := $(wildcard *.mf)
-# FONT_FILES = $(wildcard *[0-9].mf)
-# EXTRA_DIST_FILES += $(MF_FILES)
MP_PFA_FILES = $(addprefix $(outdir)/, $(FONT_FILES:.mf=.pfa))
PFA_FILES += $(MP_PFA_FILES)
diff --git a/stepmake/stepmake/pod-vars.make b/stepmake/stepmake/pod-vars.make
index 541da42c94..af195dc475 100644
--- a/stepmake/stepmake/pod-vars.make
+++ b/stepmake/stepmake/pod-vars.make
@@ -1,3 +1,3 @@
+POD_FILES := $(call src-wildcard,*.pod)
-POD_FILES := $(wildcard *.pod)
OUTPOD_FILES = $(addprefix $(outdir)/,$(POD_FILES))
diff --git a/stepmake/stepmake/python-module-vars.make b/stepmake/stepmake/python-module-vars.make
index be7985f27b..1bed3158c7 100644
--- a/stepmake/stepmake/python-module-vars.make
+++ b/stepmake/stepmake/python-module-vars.make
@@ -1,4 +1,4 @@
-PY_MODULES_IN = $(wildcard *.py)
+PY_MODULES_IN = $(call src-wildcard,*.py)
OUT_PY_MODULES = $(PY_MODULES_IN:%=$(outdir)/%)
OUT_PYC_MODULES = $(OUT_PY_MODULES:%.py=%.pyc)
ifneq ($(CYGWIN_BUILD),)
diff --git a/stepmake/stepmake/scm-vars.make b/stepmake/stepmake/scm-vars.make
index 9a53ec0723..294964e74e 100644
--- a/stepmake/stepmake/scm-vars.make
+++ b/stepmake/stepmake/scm-vars.make
@@ -1,5 +1,5 @@
-SCM_FILES := $(wildcard *.scm)
+SCM_FILES := $(call src-wildcard,*.scm)
SOURCE_FILES += $(SCM_FILES)
diff --git a/stepmake/stepmake/script-vars.make b/stepmake/stepmake/script-vars.make
index e325882478..fbe149cfeb 100644
--- a/stepmake/stepmake/script-vars.make
+++ b/stepmake/stepmake/script-vars.make
@@ -1,15 +1,15 @@
-PERL_SCRIPTS_IN := $(wildcard *.pl)
+PERL_SCRIPTS_IN := $(call src-wildcard,*.pl)
+BASH_SCRIPTS_IN := $(call src-wildcard,*.bash)
+EXPECT_SCRIPTS_IN := $(call src-wildcard,*.expect)
+SCM_SCRIPTS_IN := $(call src-wildcard,*.scm)
+SH_SCRIPTS_IN := $(call src-wildcard,*.sh)
+
PERL_SCRIPTS = $(addprefix $(outdir)/, $(PERL_SCRIPTS_IN:.pl=))
-BASH_SCRIPTS_IN := $(wildcard *.bash)
BASH_SCRIPTS = $(addprefix $(outdir)/, $(BASH_SCRIPTS_IN:.bash=))
-EXPECT_SCRIPTS_IN := $(wildcard *.expect)
EXPECT_SCRIPTS = $(addprefix $(outdir)/, $(EXPECT_SCRIPTS_IN:.expect=))
-SCM_SCRIPTS_IN := $(wildcard *.scm)
SCM_SCRIPTS = $(addprefix $(outdir)/, $(SCM_SCRIPTS_IN:.scm=))
-SH_SCRIPTS_IN := $(wildcard *.sh)
SH_SCRIPTS = $(addprefix $(outdir)/, $(SH_SCRIPTS_IN:.sh=))
-PYTHON_SCRIPTS_IN := $(wildcard *.py)
PYTHON_SCRIPTS = $(addprefix $(outdir)/, $(PYTHON_SCRIPTS_IN:.py=))
ALL_SCRIPTS_IN = $(BASH_SCRIPTS_IN) $(EXPECT_SCRIPTS_IN) $(PERL_SCRIPTS_IN) $(PYTHON_SCRIPTS_IN) $(SCM_SCRIPTS_IN) $(SH_SCRIPTS_IN)
EXTRA_DIST_FILES += $(ALL_SCRIPTS_IN)
diff --git a/stepmake/stepmake/shared-library-vars.make b/stepmake/stepmake/shared-library-vars.make
index a8ea9a9935..d7afa17544 100644
--- a/stepmake/stepmake/shared-library-vars.make
+++ b/stepmake/stepmake/shared-library-vars.make
@@ -20,4 +20,3 @@ lo-dep-out = $(outdir)/$(subst .lo,.dep,$(notdir $@))#
DO_LO_DEP = rm -f $(lo-dep-out); DEPENDENCIES_OUTPUT="$(lo-dep-out) $(outdir)/$(notdir $@)"
LO_FILES += $(addprefix $(outdir)/, $(Y_FILES:.y=.lo) $(C_FILES:.c=.lo) $(L_FILES:.l=.lo))
-
diff --git a/stepmake/stepmake/texinfo-rules.make b/stepmake/stepmake/texinfo-rules.make
index c43ec1aef0..874cc7fe30 100644
--- a/stepmake/stepmake/texinfo-rules.make
+++ b/stepmake/stepmake/texinfo-rules.make
@@ -5,7 +5,7 @@ $(outdir)/%.info: $(outdir)/%.texi
$(MAKEINFO) -I $(outdir) --output=$@ $<
$(outdir)/%.html: $(outdir)/%.texi
- $(MAKEINFO) -I $(outdir) --output=$@ --css-include=$(abs-srcdir)/Documentation/texinfo.css --html --no-split --no-headers $<
+ $(MAKEINFO) -I $(outdir) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html --no-split --no-headers $<
$(outdir)/%.html.omf: %.texi
$(call GENERATE_OMF,html)
@@ -18,14 +18,14 @@ $(outdir)/%.ps.gz.omf: %.texi
# Generic rule not possible?
$(outdir)/%/%.html: $(outdir)/%.texi
- $(MAKEINFO) --output=$@ --css-include=$(abs-srcdir)/Documentation/texinfo.css --html $<
+ $(MAKEINFO) --output=$@ --css-include=$(top-src-dir)/Documentation/texinfo.css --html $<
$(outdir)/%.dvi: $(outdir)/%.texi
cd $(outdir); texi2dvi --batch $(TEXINFO_PAPERSIZE_OPTION) $(<F)
$(outdir)/%.txt: $(outdir)/%.texi
- $(MAKEINFO) -I $(pwd) -I $(outdir) --no-split --no-headers --output $@ $<
+ $(MAKEINFO) -I $(src-dir) -I $(outdir) --no-split --no-headers --output $@ $<
$(outdir)/%.texi: %.texi
rm -f $@
diff --git a/stepmake/stepmake/texinfo-vars.make b/stepmake/stepmake/texinfo-vars.make
index 50ebb5bfb0..b66e47897c 100644
--- a/stepmake/stepmake/texinfo-vars.make
+++ b/stepmake/stepmake/texinfo-vars.make
@@ -1,5 +1,5 @@
-TEXI_FILES = $(wildcard *.texi)
+TEXI_FILES = $(call src-wildcard,*.texi)
ALL_SOURCES += $(TEXI_FILES)
@@ -7,7 +7,7 @@ TEXINFO_SOURCES = $(TEXI_FILES)
OUTTXT_FILES += $(addprefix $(outdir)/,$(TEXI_FILES:.texi=.txt))
-GENERATE_OMF = $(PYTHON) $(depth)/buildscripts/texi2omf.py --format $(1) --location $(webdir)/$(current-relative-dir)/out-www/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@
+GENERATE_OMF = $(PYTHON) $(depth)/buildscripts/texi2omf.py --format $(1) --location $(webdir)/$(tree-dir)/out-www/$(notdir $(basename $@)) --version $(TOPLEVEL_VERSION) $< > $@
TEXINFO_PAPERSIZE_OPTION= $(if $(findstring $(PAPERSIZE),a4),,-t @afourpaper)
diff --git a/stepmake/stepmake/topdocs-targets.make b/stepmake/stepmake/topdocs-targets.make
index 32d9a0b920..4297e38857 100644
--- a/stepmake/stepmake/topdocs-targets.make
+++ b/stepmake/stepmake/topdocs-targets.make
@@ -3,7 +3,7 @@ default: local-doc
copy-to-top: $(TO_TOP_FILES)
$(foreach i, $(TO_TOP_FILES), \
- cp $(i) $(builddir) && ) true
+ cp $(i) $(top-build-dir) && ) true
local-WWW: $(HTML_FILES) $(PDF_FILES) copy-to-top
diff --git a/stepmake/stepmake/toplevel-targets.make b/stepmake/stepmake/toplevel-targets.make
index 4633f8be1a..c59d971b85 100644
--- a/stepmake/stepmake/toplevel-targets.make
+++ b/stepmake/stepmake/toplevel-targets.make
@@ -6,6 +6,7 @@ local-distclean:
rm -f config.hh config.make Makefile GNUmakefile \
config.cache config.status config.log index.html \
stepmake/stepmake/stepmake stepmake/stepmake/bin
+ rm -rf autom4te.cache
local-maintainerclean:
rm -f configure
@@ -67,12 +68,13 @@ local-help:
. release==\n\
. to=0.1.74.jcn2\n\
dist roll tarball: $(depth)/$(outdir)/$(distname).tar.gz\n\
- distclean cleaner than clean (duh)\n\
+ distclean also remove configure output\n\
doc update all documentation\n\
- release roll tarball and generate patch\n\
+ maintainerclean also remove distributed generated files\n\
po make new translation Portable Object database\n\
po-replace do po-update and replace catalogs with msgmerged versions\n\
po-update update translation Portable Object database\n\
+ release roll tarball and generate patch\n\
\n\
Some of these top level targets (diff, dist, release) can be issued\n\
from anywhere in the source tree.\n\
diff --git a/vim/GNUmakefile b/vim/GNUmakefile
index c33f0b02de..565b7c80e6 100644
--- a/vim/GNUmakefile
+++ b/vim/GNUmakefile
@@ -8,10 +8,10 @@ EXTRA_DIST_FILES=$(wildcard *.vim) vimrc
LILYPOND_WORDS = $(outdir)/lilypond-words $(outdir)/lilypond-words.vim
LILYPOND_WORDS_DEPENDS =\
- $(topdir)/lily/lily-lexer.cc \
+ $(top-src-dir)/lily/lily-lexer.cc \
$(buildscript-dir)/lilypond-words.py \
- $(topdir)/scm/markup.scm \
- $(topdir)/ly/engraver-init.ly
+ $(top-src-dir)/scm/markup.scm \
+ $(top-src-dir)/ly/engraver-init.ly
STEPMAKE_TEMPLATES=install-out
@@ -51,7 +51,7 @@ local-uninstall:
-rmdir -p $(DESTDIR)$(vimdir)/syntax
$(LILYPOND_WORDS):
- cd $(topdir) && $(PYTHON) buildscripts/lilypond-words.py --words --vim --dir=$(builddir)/vim/$(outconfbase)
+ cd $(top-src-dir) && $(PYTHON) buildscripts/lilypond-words.py --words --vim --dir=$(top-build-dir)/vim/$(outconfbase)
all: $(LILYPOND_WORDS)