-# title makefile for lilypond
-# file lily/Makefile
depth = ..
--- /dev/null
+
+$(outdir)/%.afm: %.af
+ grep '[[:cntrl:]]' $< | sed 's/^[[:cntrl:]] *//' > $@
+# grep '[[:cntrl:]]' $< | sed 's/^. *//' > $@
--- /dev/null
+AF_FILES := $(wildcard *.af)
+EXTRA_DIST_FILES += $(AF_FILES)
-# mf/Makefile
-
depth = ..
-STEPMAKE_TEMPLATES=metafont metapost asciifont install install-out
+STEPMAKE_TEMPLATES=metafont metapost install install-out
+LOCALSTEPMAKE_TEMPLATES=asciifont
include $(depth)/make/stepmake.make
AF_FILES = $(wildcard *.af)
-# bin/Makefile
-
depth = ..
SEXECUTABLES=convert-ly lilypond-book ly2dvi abc2ly as2text etf2ly musedata2ly pmx2ly mup2ly
header_tag = '<!-- header_tag -->'
footer_tag = '<!-- footer_tag -->'
+# Python < 1.5.2 compatibility
+#
+# On most platforms, this is equivalent to
+#`normpath(join(os.getcwd()), PATH)'. *Added in Python version 1.5.2*
+if os.path.__dict__.has_key ('abspath'):
+ abspath = os.path.abspath
+else:
+ def abspath (path):
+ return os.path.normpath (os.path.join (os.getcwd (), path))
+
+
+def remove_self_ref (s):
+ self_url = abspath (os.getcwd () + '/' + f)
+ #sys.stderr.write ('url0: %s\n' % self_url)
+ self_url = re.sub ('.*' + string.lower (package_name) + '[^/]*/',
+ '', self_url)
+ #sys.stderr.write ('url1: %s\n' % self_url)
+
+ #urg, ugly lily-specific toplevel index hack
+ self_url = re.sub ('.*topdocs/out-www/index.html', 'index.html', self_url)
+ #sys.stderr.write ('url2: %s\n' % self_url)
+
+ m = re.match ('.*?(<a href="[\./]*' + self_url + '#?[^"]*">)([^<]*)(</a>)',
+ s, re.DOTALL)
+ while m:
+ #sys.stderr.write ('self: %s\n' % m.group (2))
+ s = s[:m.start (1)] + m.group (2) + s[m.end (3):]
+ m = re.match ('.*?(<a href="[\./]*' + self_url + '#?[^"]*">)([^<]*)(</a>)',
+ s, re.DOTALL)
+ return s
+
def do_file (f):
s = gulp_file (f)
s = re.sub ('@LOCALTIME@', localtime, s)
s = re.sub ('@MAIL_ADDRESS@', mail_address, s)
+ m = re.match ('.*?<!-- (@[a-zA-Z0-9_-]*@)=(.*?) -->', s, re.DOTALL)
+ while m:
+ at_var = m.group (1)
+ at_val = m.group (2)
+ #sys.stderr.write ('at: %s -> %s\n' % (at_var, at_val))
+ s = re.sub (at_var, at_val, s)
+ m = re.match ('.*?<!-- (@[a-zA-Z0-9_-]*@)=(.*?) -->', s, re.DOTALL)
+
+ # urg
+ # maybe find first node?
+ fallback_web_title = '-- --'
+ m = re.match ('.*?<title>\(.*?\)</title>', s, re.DOTALL)
+ if m:
+ fallback_web_title = m.group (1)
+ s = re.sub ('@WEB-TITLE@', fallback_web_title, s)
+
+ s = remove_self_ref (s)
+
open (f, 'w').write (s)
-# title C++ rules
-# file make/C++_rules.make
-
.SUFFIXES: .cc .o .hh .yy .ll .dep
# compile rules:
-# stepmake/C_rules.make
-
.SUFFIXES: .c .o .h .y .l .dep
$(outdir)/%.o: %.c
-
# header files:
H_FILES := $(wildcard *.h)
C_FILES := $(wildcard *.c)
-# Docrules.make
-
# special rules for the documentation section.
# There are too many to add to the general rules
-# Documentation files
AT_FILES = $(BLURBS) #
at-dir = $(doc-dir)/
at-ext = .in
-# Executable.make
-
-# dependency list of executable:
-#
-
default: $(EXECUTABLE)
$(EXECUTABLE): $(outdir)/config.h $(O_FILES) $(outdir)/version.hh
$(foreach a, $(SEXECUTABLES), rm -f $(bindir)/$(a) &&) true
-# Piss off. Use MODULE_LIBS
-#
-# UGH. fucks up if $(outdir) not created.
-#
-#%/$(outdir)/library.a:
-# $(MAKE) -C $(dir $@)/.. default
-# empty
LDFLAGS = $(ILDFLAGS) $(EXTRA_LDFLAGS) $(MODULE_LDFLAGS) $($(PACKAGE)_LDFLAGS)
## urg, silly name: library.a
MODULE_LIBES =$(addprefix $(outdir)/../, $(addsuffix /$(outbase)/library.a, $(MODULE_LIBS)))
LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES)
+
+EXECUTABLE = $(outdir)/$(NAME)
+EXECUTABLES = $(notdir $(EXECUTABLE))
+
+
-# title generic make rules
-# file make/Rules.make
-
-# this is supposed to clear all suffixes:
-.SUFFIXES:
-
-
-
$(outdir)/%: %.m4
$(M4) $< > $@
-# title generic make targets
-# file make/Targets.make
-
.PHONY : all clean config default diff dist doc exe help html lib TAGS\
po
Note that all commands recurse into SUBDIRS;\n\
prepend \`local-' to do only cwd, eg: local-clean\n\
"\
-#
local-help:
$(foreach i, $(EXTRA_DOC_FILES),\
cp -r $(i) $(prefix)/doc/$(package) &&) true
-include $(stepdir)/package.make
-
include $(outdir)/dummy.dep $(DEP_FILES)
$(outdir)/dummy.dep:
@echo "************************************************************"
(cd $(depth); ./config.status)
touch $@ # do something for multiple simultaneous configs.
+
+
+deb:
+ $(MAKE) -C $(depth)/debian
+ cd $(depth) && debuild
+
+diff:
+ $(PYTHON) $(step-bindir)/package-diff.py --outdir=$(topdir)/$(outdir) --package=$(topdir) $(makeflags)
+ -ln -f $(depth)/$(outdir)/$(distname).diff.gz $(patch-dir)
+
+release:
+ $(PYTHON) $(step-bindir)/release.py --outdir=$(topdir)/$(outdir) --package=$(topdir)
+
+rpm: $(depth)/$(package-icon) dist
+ @echo "Assuming Red Hat system" #FIXME: check distro, then issue rpm
+ $(MAKE) -C $(depth)/make
+ cd $(depth) && rmp -bb make/$(outdir)/lilypond.redhat.spec
+# su -c 'rpm -tb $(depth)/$(outdir)/$(distname).tar.gz'
+
-# title generic variables
-# file make/Variables.make
-#
-# do not change this file for site-wide extensions; please use
-# make/$(outdir)/Site.make;
-#
-# Any change in files in this directory (make/) would be distributed, if
-# you do make dist
-
# directory names:
# depth from group-dir
DODEP=rm -f $(depfile); DEPENDENCIES_OUTPUT="$(depfile) $(outdir)/$(notdir $@)"
#
-
-# generic target names:
-#
-ifdef NAME
-EXECUTABLE = $(outdir)/$(NAME)
-else
-EXECUTABLE =
-endif
-
-EXECUTABLES = $(notdir $(EXECUTABLE))
-
-
#
#replace to do stripping of certain objects
ETAGS_FLAGS= # -CT
CTAGS_FLAGS=-h
-include $(stepdir)/files.make
+makeflags=$(patsubst %==, %, $(patsubst ---%,,$(patsubst ----%,,$(MAKEFLAGS:%=--%))))
+
+DEP_FILES := $(wildcard $(outdir)/*.dep)
+
+IN_FILES := $(wildcard *.in)
+SOURCE_FILES += $(IN_FILES)
+
+# Preprocessed .in documentation _FILES:
+OUTIN_FILES = $(addprefix $(outdir)/, $(IN_FILES:%.in=%))
+
+ALL_SOURCES = $(SOURCE_FILES)
+
-# install-out-targets.make
local-install: local-install-files local-install-outfiles
-# install-out.sub.make
include $(depth)/make/stepmake.make
include $(stepdir)/install-out-targets.make
-# install-targets.make
local-install: local-install-files local-install-outfiles
-# install.sub.make
include $(depth)/make/stepmake.make
include $(stepdir)/install-targets.make
-# dependency list of library:
-#
-
default: $(LIBRARY)
-
spec: $(OUTSPEC_FILES)
$(OUTSPEC_FILES): $(depth)/VERSION
-
-# stepmake/makedir.shared.make
-# urg: stuff shared between yodl/lily/stepmake
-
MAKE_FILES := $(wildcard *.make)
LSM_FILES:= $(wildcard *.lsm.in)
OUTLSM_FILES=$(addprefix $(outdir)/,$(basename $(LSM_FILES)))
-
tfm: $(TFM_FILES)
dvi: $(DVI_FILES)
-
# Don't remove $(outdir)/.log's. Logs are a target!
$(outdir)/%.0: %.mf $(outdir)/mfplain.mem
$(MAKE) -C $(po-dir) po-changes
po-replace: po
- $(MAKE) -C $(po-dir) po-replace
\ No newline at end of file
+ $(MAKE) -C $(po-dir) po-replace
-# Pod_rules.make
.SUFFIXES: .1 .5 .html .pod .txt
-# Porules.make
.SUFFIXES: .po .pot .mo
-
PERL_SCRIPTS_IN := $(wildcard *.pl)
PERL_SCRIPTS = $(addprefix $(outdir)/, $(PERL_SCRIPTS_IN:.pl=))
BASH_SCRIPTS_IN := $(wildcard *.bash)
-# Substitute.make
sed-endline = sed 's!$$!\\!'
sed-newline = sed 's!$$!\n!'
-#empty
export TEXPICTS:=$(outdir)$(PATHSEP)$(TEXPICTS)
-# Texinfo_rules.make
.SUFFIXES: .html .info .texi .texinfo
-#epmty
\ No newline at end of file
+# empty
-# -*-Makefile-*-
-# title Toplevel_targets.make
-
include $(stepdir)/www-targets.make
local-dist: configure
local-clean:
-###check-top-web:
-### $(MAKE) -C Documentation/topdocs WWW
-#####
-
-####index.html: check-top-web NEWS
-
local-dist: do-top-doc
dist:
distclean cleaner than clean (duh)\n\
doc update all documentation\n\
release roll tarball and generate patch\n\
- rpm build Red Hat package\n\
+ rpm build rpm (Red Hat) package\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\
-#empty
\ No newline at end of file
+# empty
-#empty
\ No newline at end of file
+# empty