2 # project LilyPond -- the musical typesetter
6 # Copyright (c) 1997 by
7 # Jan Nieuwenhuizen <jan@digicash.com>
8 # Han-Wen Nienhuys <hanwen@stack.nl>
9 # ...your sort order here, or how to comment-out a comment
21 # list of distribution files:
23 # two outdir files are distributed, since they make sense to have without running
25 IN_FILES = $(wildcard *.in)
26 EXTRA_DISTFILES = $(IN_FILES) $(outdir)/lilypond.spec $(outdir)/lilypond.lsm $(outdir)/lelievijver.lsm
31 include ./$(depth)/make/Variables.make
32 include ./$(depth)/make/Files.make
35 # generic targets and rules:
37 include ./$(depth)/make/Targets.make
38 include ./$(depth)/make/Rules.make
41 spec: $(outdir)/lilypond.spec
43 rpmdocs=$(addprefix Documentation/out/, $(notdir $(shell ls $(depth)/Documentation/$(outdir)/*.txt)))\
44 BUGS TODO NEWS DEDICATION ANNOUNCE README
45 rpmmudocs=$(addprefix Documentation/, $(notdir $(shell ls $(depth)/Documentation/*.doc)))
46 rpmdvis=$(rpmmudocs:.doc=.dvi)
47 rpmexamples= $(addprefix input/, $(notdir $(shell ls $(depth)/input/*.{ly,tex})))
50 date = $(shell date '+%d%b%y'|tr a-z A-Z)
51 sed-version= sed 's!@TOPLEVEL_VERSION@!${TOPLEVEL_VERSION}!g'
52 sed-date=sed 's!@DATE@!${date}!g'
53 sed-examples = sed 's!@EXAMPLE_LYS@!${rpmexamples} ${rpmmudocs}!g'
54 sed-docs=sed 's!@TEXT_DOCS@!${rpmdocs}!g'
56 $(outdir)/lilypond.spec: lilypond.spec.in $(depth)/VERSION
57 cat $< | $(sed-version) | $(sed-docs) | $(sed-examples) > $@
59 $(outdir)/%.lsm: %.lsm.in $(depth)/VERSION
60 cat $< | $(sed-version) | $(sed-date) > $@