]> git.donarmstrong.com Git - lilypond.git/blob - input/lsr/GNUmakefile
Clean up buildscripts
[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 IN_ITELY_FILES = $(call src-wildcard,*-intro.itely)
22 GENERATED_ITELY_FILES = $(IN_ITELY_FILES:%-intro.itely=$(outdir)/%.itely)
23
24 $(outdir)/%.itely: %-intro.itely %.snippet-list
25         xargs $(LYS_TO_TELY) -f doctitle,texidoc,verbatim --name=$@ --template=$< < $(filter %.snippet-list, $^)
26
27 $(outdir)/lilypond-snippets.texi: $(GENERATED_ITELY_FILES) $(LY_FILES)
28
29 source-links = $(outdir)/source $(outdir)/lilypond-snippets/source
30
31 $(outdir)/source:
32         @rm -f $(@)
33         ln -sf $(depth) $(@)
34
35 $(outdir)/%/source:
36         @rm -f $(@)
37         mkdir -p $(dir $@)
38         ln -sf $(depth)/.. $(@)
39
40 info: $(INFO_FILES)
41
42 ifneq ($(out),www)
43 # cancel install-info target and $(INFO_FILES) 'default' target
44 # (there is no lilypond-snippets.info without images)
45 local-install-info:
46
47 $(INFO_FILES):
48         true
49 endif
50
51 # All web targets, except info image symlinks and info docs are
52 # installed in non-recursing target from TOP-SRC-DIR
53 local-install-WWW: local-install-info
54 local-uninstall-WWW: local-uninstall-info
55
56 local-clean:
57         rm -f $(INFO_IMAGES_DIR)
58
59 local-WWW-1: info $(outdir)/lilypond-snippets.pdf \
60   $(outdir)/lilypond-snippets.texi
61
62 local-WWW-2: $(outdir)/lilypond-snippets/index.html \
63   $(outdir)/lilypond-snippets-big-page.html \
64   $(source-links)
65
66 .SECONDARY: