]> git.donarmstrong.com Git - lilypond.git/blob - website.make
Remove bogus weight (design size) from SetFontNames() argument when
[lilypond.git] / website.make
1 ################################################################
2 # website (without the rest of the docs)
3
4 ################################################################
5 #####  SECURITY -- check these values for lilypond.org #########
6 ################################################################
7 ifeq ($(WEBSITE_ONLY_BUILD),1)
8   ### for lilypond.org
9   top-src-dir=$(HOME)/src/lilypond
10   depth=.
11   trusted-dir=$(HOME)/lilypond/trusted-scripts
12   script-dir=$(trusted-dir)
13   texi2html-init-file=$(trusted-dir)/lilypond-texi2html.init
14   TEXI2HTML_PROGRAM=$(HOME)/usr/bin/texi2html
15   EXAMPLES=$(HOME)/media/ly-examples/
16   PICTURES=$(HOME)/media/pictures
17 else
18   ### for normal git
19   script-dir=$(top-src-dir)/scripts/build/
20   texi2html-init-file=$(top-src-dir)/Documentation/lilypond-texi2html.init
21   include $(config_make)
22   # I assume this is run from top-build-dir
23   EXAMPLES=Documentation/web/ly-examples/out-www/
24   PICTURES=Documentation/pictures/out-www/
25 endif
26
27
28 ################################################################
29 OUT=out-website
30 WEB_LANGS=es
31
32
33 TEXI2HTML=ONLY_WEB=1 TOP_SRC_DIR=$(top-src-dir) DEPTH=$(depth) PERL_UNICODE=SD $(TEXI2HTML_PROGRAM)
34
35 EXTRACT_TEXI_FILENAMES=python $(script-dir)/extract_texi_filenames.py
36 CREATE_VERSION=python $(script-dir)/create-version-itexi.py
37 CREATE_WEBLINKS=python $(script-dir)/create-weblinks-itexi.py
38 MASS_LINK=python $(script-dir)/mass-link.py
39 WEB_POST=python $(script-dir)/website_post.py
40
41 SERVER_FILES=$(top-src-dir)/Documentation/web/server/
42
43 # don't include web
44 MANUALS=$(wildcard $(top-src-dir)/Documentation/*.tely)
45 MANUALS+=$(top-src-dir)/Documentation/contributor.texi
46
47 website-test:
48         echo $(TEXI2HTML)
49
50 website-version:
51         mkdir -p $(OUT)
52         $(CREATE_VERSION) $(top-src-dir) > $(OUT)/version.itexi
53         $(CREATE_WEBLINKS) $(top-src-dir) > $(OUT)/weblinks.itexi
54
55 website-xrefs: website-version
56         $(EXTRACT_TEXI_FILENAMES) -I $(top-src-dir)/Documentation/ \
57                 -I $(OUT) -o $(OUT) --split=node \
58                 $(top-src-dir)/Documentation/web.texi
59         # normal manuals
60         for m in $(MANUALS); do \
61                 b=`basename "$$m" .texi`; \
62                 d=`basename "$$b" .tely`; \
63                 $(EXTRACT_TEXI_FILENAMES) \
64                         -I $(top-src-dir)/Documentation/ \
65                         -I $(top-src-dir)/Documentation/"$$d"/ \
66                         -I $(OUT) -o $(OUT) "$$m" ; \
67         done
68         # translations
69         for l in $(WEB_LANGS); do \
70                 $(EXTRACT_TEXI_FILENAMES) \
71                         -I $(top-src-dir)/Documentation/ \
72                         -I $(top-src-dir)/Documentation/"$$l" \
73                         -I $(OUT) -o $(OUT) --split=node \
74                         $(top-src-dir)/Documentation/"$$l"/web.texi ;\
75                 for m in $(MANUALS); do \
76                         n=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
77                         b=`basename "$$n" .texi`; \
78                         d=`basename "$$b" .tely`; \
79                         if [ -e "$$n" ] ; then \
80                                 $(EXTRACT_TEXI_FILENAMES) \
81                                 -I $(top-src-dir)/Documentation/ \
82                                 -I $(top-src-dir)/Documentation/"$$l" \
83                                 -I $(top-src-dir)/Documentation/"$$l"/"$$d"/ \
84                                 -I $(OUT) -o $(OUT) "$$n" ; \
85                         fi ; \
86                 done; \
87         done;
88
89
90
91 website-texinfo: website-version website-xrefs
92         $(TEXI2HTML) --prefix=index \
93                 --split=section \
94                 --I=$(top-src-dir)/Documentation/ \
95                 --I=$(OUT) \
96                 --init-file=$(texi2html-init-file) \
97                 -D web_version \
98                 --output=$(OUT)/website/ \
99                 $(top-src-dir)/Documentation/web.texi
100         # translations
101         for l in $(WEB_LANGS); do \
102                 $(TEXI2HTML) --prefix=index \
103                         --split=section \
104                         --I=$(top-src-dir)/Documentation/"$$l" \
105                         --I=$(top-src-dir)/Documentation/ \
106                         --I=$(OUT) \
107                         --lang="$$l" \
108                         --init-file=$(texi2html-init-file) \
109                         -D web_version \
110                         --output=$(OUT)/"$$l" \
111                         $(top-src-dir)/Documentation/"$$l"/web.texi ; \
112                 find $(OUT)/$$l/ -name '*.html' | xargs grep -L 'UNTRANSLATED NODE: IGNORE ME' | sed 's!$(OUT)/'$$l'/!!g' | xargs $(MASS_LINK) --prepend-suffix .$$l hard $(OUT)/$$l/ $(OUT)/website/ ; \
113         done
114
115
116 website-css:
117         cp $(top-src-dir)/Documentation/css/*.css $(OUT)/website/
118
119 website-pictures:
120         mkdir -p $(OUT)/website/pictures/
121         cp $(PICTURES)/* $(OUT)/website/pictures/
122         ln -sf website/pictures $(OUT)/pictures
123
124 website-examples:
125         mkdir -p $(OUT)/website/ly-examples
126         cp $(EXAMPLES)/* $(OUT)/website/ly-examples
127
128 web-post:
129         $(WEB_POST) $(OUT)/website/
130
131 website: website-texinfo website-css website-pictures website-examples web-post
132         cp $(SERVER_FILES)/favicon.ico $(OUT)/website/
133         cp $(SERVER_FILES)/lilypond.org.htaccess $(OUT)/website/.htaccess
134         cp $(SERVER_FILES)/robots.txt $(OUT)/website/
135
136