diff options
author | Jan Nieuwenhuizen <janneke@gnu.org> | 2005-04-06 12:40:33 +0000 |
---|---|---|
committer | Jan Nieuwenhuizen <janneke@gnu.org> | 2005-04-06 12:40:33 +0000 |
commit | f98fe88bc27c4782d56cf5b4091637f188a5f6ce (patch) | |
tree | ba949202769b530c5c42d2fcde77a15ba9f7731b | |
parent | 4683b5716788837fb0bed12f7f0e12d4cf22ef78 (diff) |
Rewrite $addprefix, $addsuffix using % short-forms.
Add PFAaybabtu.pfa dependency on aybabtu.subfonts.
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | mf/GNUmakefile | 15 | ||||
-rw-r--r-- | scripts/lilypond-book.py | 50 |
3 files changed, 41 insertions, 32 deletions
@@ -1,3 +1,8 @@ +2005-04-06 Jan Nieuwenhuizen <jan.nieuwenhuizen@aspiratie.nl> + + * mf/GNUmakefile: Rewrite $addprefix, $addsuffix using % short-forms. + Add PFAaybabtu.pfa dependency on aybabtu.subfonts. + 2005-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl> * scm/framework-ps.scm (ps-font-command): use string-hash for @@ -11,7 +16,8 @@ * GNUmakefile.in: don't put mf/ link in share/ dir. - * lily/staff-spacing.cc: move same-direction-correction to note-spacing-interface + * lily/staff-spacing.cc: move same-direction-correction to + note-spacing-interface * scm/lily.scm (lilypond-main): use variable argument count for exception handler. diff --git a/mf/GNUmakefile b/mf/GNUmakefile index f0d455656e..17034f4733 100644 --- a/mf/GNUmakefile +++ b/mf/GNUmakefile @@ -18,13 +18,13 @@ FETA_MF_FILES = $(wildcard feta[0-9]*.mf)\ STAFF_SIZES = 11 13 14 16 18 20 23 26 BRACES = a b c d e f g h i -OTF_FILES = $(addsuffix .otf, $(addprefix $(outdir)/emmentaler-, $(STAFF_SIZES)))\ +OTF_FILES = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.otf)\ $(outdir)/aybabtu.otf -PFA_OTF_FILES = $(addsuffix .pfa, $(addprefix $(outdir)/PFAemmentaler-, $(STAFF_SIZES)))\ +PFA_OTF_FILES = $(STAFF_SIZES:%=$(outdir)/PFAemmentaler-%.pfa)\ $(outdir)/PFAaybabtu.pfa -PE_SCRIPTS = $(addsuffix .pe, $(addprefix $(outdir)/emmentaler-, $(STAFF_SIZES))) \ - $(addsuffix .dep, $(addprefix $(outdir)/emmentaler-, $(STAFF_SIZES))) -OTF_TABLES = $(addsuffix .otf-table, $(addprefix $(outdir)/feta, $(STAFF_SIZES))) \ +PE_SCRIPTS = $(STAFF_SIZES:%=$(outdir)/emmentaler-%.pe)\ + $(STAFF_SIZES:%=$(outdir)/emmentaler-%.dep) +OTF_TABLES = $(STAFF_SIZES:%=$(outdir)/feta%.otf-table)\ $(BRACES:%=$(outdir)/feta-braces-%.otf-table) FETA_FONTS = $(FETA_MF_FILES:.mf=) SVG_FILES = $(OTF_FILES:%.otf=%.svg) $(ALL_FONTS:%=$(outdir)/%.svg) @@ -42,7 +42,8 @@ LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log) LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp) TEXTABLES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tex) ENC_FILES = $(TEXTABLES:.tex=.enc) $(outdir)/cmr.enc -TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm) $(addprefix $(outdir)/,$(addsuffix .tfm,$(SAUTER_FONTS))) +TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)\ + $(SAUTER_FONTS:%=$(outdir)/%.tfm) FETA_LIST_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%list.ly) @@ -67,7 +68,7 @@ $(outdir)/%.otf-table: $(outdir)/%.lisp $(if $(findstring brace,$<),,$(subst fet $(if $(findstring brace,$<),,$(subst feta,parmesan,$<)) \ $(if $(findstring brace,$<),,$(subst feta,feta-alphabet,$<)) > $@ -$(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts $(outdir)/aybabtu.fontname $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable $(outdir)/aybabtu.pe +$(outdir)/aybabtu.otf $(outdir)/PFAaybabtu.pfa: $(outdir)/aybabtu.subfonts $(outdir)/aybabtu.fontname $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable $(outdir)/aybabtu.pe $(outdir)/aybabtu.fontname: echo -n 'aybabtu' > $@ diff --git a/scripts/lilypond-book.py b/scripts/lilypond-book.py index 06ed89a3bb..db322aa215 100644 --- a/scripts/lilypond-book.py +++ b/scripts/lilypond-book.py @@ -674,7 +674,7 @@ class Lilypond_snippet (Snippet): def __init__ (self, type, match, format, line_number): Snippet.__init__ (self, type, match, format, line_number) os = match.group ('options') - self.do_options(os,self.type) + self.do_options (os,self.type) def ly (self): return self.substring ('code') @@ -688,7 +688,7 @@ class Lilypond_snippet (Snippet): def do_options (self, option_string, type): self.option_dict = {} - options = split_options(option_string) + options = split_options (option_string) for i in options: if string.find (i, '=') > 0: @@ -789,7 +789,7 @@ class Lilypond_snippet (Snippet): for a in compose_types: compose_dict[a] = [] - for (key, value) in self.option_dict.items(): + for (key, value) in self.option_dict.items (): (c_key, c_value) = \ classic_lilypond_book_compatibility (key, value) if c_key: @@ -840,19 +840,19 @@ class Lilypond_snippet (Snippet): program_name = __main__.program_name - paper_string = \ - string.join (compose_dict[PAPER], '\n ') % override - layout_string = \ - string.join (compose_dict[LAYOUT], '\n ') % override - notes_string = \ - string.join (compose_dict[NOTES], '\n ') % vars () - preamble_string = \ - string.join (compose_dict[PREAMBLE], '\n ') % override + paper_string = string.join (compose_dict[PAPER], + '\n ') % override + layout_string = string.join (compose_dict[LAYOUT], + '\n ') % override + notes_string = string.join (compose_dict[NOTES], + '\n ') % vars () + preamble_string = string.join (compose_dict[PREAMBLE], + '\n ') % override font_dump_setting = '' if FONTLOAD in self.option_dict: font_dump_setting = '#(define-public force-eps-font-include #t)\n' - + return (PREAMBLE_LY + body) % vars () # TODO: Use md5? @@ -1045,7 +1045,7 @@ def find_linestarts (s): if i < 0: break - i = i + 1 + i = i + 1 nls.append (i) start = i @@ -1089,7 +1089,7 @@ def find_toplevel_snippets (s, types): if snippet_type_to_class.has_key (type): cl = snippet_type_to_class[type] - + start = index + m.start ('match') line_number = line_start_idx while (line_starts[line_number] < start): @@ -1122,7 +1122,7 @@ def find_toplevel_snippets (s, types): while (start > line_starts[line_start_idx+1]): line_start_idx += 1 - + (start, snip) = found[first] snippets.append (Substring (s, index, start, line_start_idx + 1)) snippets.append (snip) @@ -1262,17 +1262,19 @@ def write_file_map (lys, name): snippet_map = open ('snippet-map.ly', 'w') snippet_map.write ("\n#(ly:add-file-name-alist '(") for ly in lys: - snippet_map.write ('("%s.ly" . "%s:%d (%s.ly)")\n' % (ly.basename(), - name, - ly.line_number, - ly.basename())) + snippet_map.write ('("%s.ly" . "%s:%d (%s.ly)")\n' \ + % (ly.basename (), + name, + ly.line_number, + ly.basename ())) snippet_map.write ('))\n') def do_process_cmd (chunks, input_name): - all_lys = filter(lambda x: is_derived_class (x.__class__, Lilypond_snippet), - chunks) - + all_lys = filter (lambda x: is_derived_class (x.__class__, + Lilypond_snippet), + chunks) + write_file_map (all_lys, input_name) ly_outdated = \ filter (lambda x: is_derived_class (x.__class__, @@ -1497,8 +1499,8 @@ def main (): format = guess_format (files[0]) formats = 'ps' - if format == TEXINFO or format == HTML: - formats += ',png' + if format == TEXINFO or format == HTML: + formats += ',png' if process_cmd == '': process_cmd = lilypond_binary + ' --formats=%s --backend eps ' % formats |