]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/GNUmakefile
8afa862bb217cfa1666e9099027c2b5e18e50392
[lilypond.git] / input / lsr / GNUmakefile
1 depth = ../..
2
3 # urg, can't name itely templates foo.itely.in because of standard rule
4
5 STEPMAKE_TEMPLATES=documentation texinfo
6 LOCALSTEPMAKE_TEMPLATES=lilypond ly
7 EXTRA_DIST_FILES += README $(call src-wildcard,*.snippet-list)
8
9 default:
10
11 ifneq ($(out),)
12 MAIN_INFO_DOC = lilypond-snippets
13 INFO_DOCS = lilypond-snippets
14 INFO_FILES = $(INFO_DOCS:%=$(outdir)/%.info)
15 INFO_IMAGES_DIR = lilypond-snippets
16 DEST_INFO_IMAGES_SUBDIR = input/lsr
17 endif
18
19 include $(depth)/make/stepmake.make
20
21 TEXI2HTML_FLAGS += -D short_toc
22
23 IN_ITELY_FILES = $(call src-wildcard,*-intro.itely)
24 GENERATED_ITELY_FILES = $(IN_ITELY_FILES:%-intro.itely=$(outdir)/%.itely)
25
26 $(outdir)/%.itely: %-intro.itely %.snippet-list
27         xargs $(LYS_TO_TELY) -f doctitle,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^)
28
29 $(outdir)/lilypond-snippets.texi: $(GENERATED_ITELY_FILES) $(LY_FILES)
30
31 source-links = $(outdir)/source $(outdir)/lilypond-snippets/source
32
33 $(outdir)/source:
34         @rm -f $(@)
35         ln -sf $(depth) $(@)
36
37 $(outdir)/%/source:
38         @rm -f $(@)
39         mkdir -p $(dir $@)
40         ln -sf $(depth)/.. $(@)
41
42 info: $(INFO_FILES)
43
44 ifneq ($(out),www)
45 # cancel install-info target and $(INFO_FILES) 'default' target
46 # (there is no lilypond-snippets.info without images)
47 local-install-info:
48
49 $(INFO_FILES):
50         true
51 endif
52
53 local-clean:
54         rm -f $(INFO_IMAGES_DIR)
55
56 ifeq ($(out),www)
57 # All web targets, except info image symlinks and info docs are
58 # installed in non-recursing target from TOP-SRC-DIR
59 local-install-WWW: local-install-info
60 local-uninstall-WWW: local-uninstall-info
61
62 local-WWW-1: info $(outdir)/lilypond-snippets.pdf \
63   $(outdir)/lilypond-snippets.texi
64
65 local-WWW-2: $(outdir)/lilypond-snippets/index.html \
66   $(outdir)/lilypond-snippets-big-page.html \
67   $(source-links)
68 endif
69
70 .SECONDARY: