1 ################################################################
2 # website (without the rest of the docs)
4 ################################################################
5 ##### SECURITY -- check these values for lilypond.org #########
6 ################################################################
7 ifeq ($(WEBSITE_ONLY_BUILD
),1)
9 top-src-dir
=$(HOME
)/src
/lilypond
11 trusted-dir
=$(HOME
)/lilypond
/trusted-scripts
12 script-dir
=$(trusted-dir
)
13 texi2html-init-file
=$(trusted-dir
)/lilypond-texi2html.init
14 top-htaccess
=$(trusted-dir
)/lilypond.org.htaccess
15 dir-htaccess
=$(trusted-dir
)/website-dir.htaccess
16 TEXI2HTML_PROGRAM
=$(HOME
)/usr
/bin
/texi2html
17 EXAMPLES
=$(HOME
)/media
/ly-examples
/
18 PICTURES
=$(HOME
)/media
/pictures
21 script-dir
=$(top-src-dir
)/scripts
/build
/
22 texi2html-init-file
=$(top-src-dir
)/Documentation
/lilypond-texi2html.init
23 top-htaccess
=$(top-src-dir
)/Documentation
/web
/server
/lilypond.org.htaccess
24 dir-htaccess
=$(top-src-dir
)/Documentation
/web
/server
/website-dir.htaccess
25 include $(config_make
)
26 # I assume this is run from top-build-dir
27 EXAMPLES
=Documentation
/web
/ly-examples
/out-www
/
28 PICTURES
=Documentation
/pictures
/out-www
/
32 ################################################################
37 TEXI2HTML
=ONLY_WEB
=1 TOP_SRC_DIR
=$(top-src-dir
) DEPTH
=$(depth
) PERL_UNICODE
=SD
$(TEXI2HTML_PROGRAM
)
39 EXTRACT_TEXI_FILENAMES
=python
$(script-dir
)/extract_texi_filenames.py
40 CREATE_VERSION
=python
$(script-dir
)/create-version-itexi.py
41 CREATE_WEBLINKS
=python
$(script-dir
)/create-weblinks-itexi.py
42 MASS_LINK
=python
$(script-dir
)/mass-link.py
43 WEB_POST
=python
$(script-dir
)/website_post.py
45 SERVER_FILES
=$(top-src-dir
)/Documentation
/web
/server
/
48 MANUALS
=$(wildcard $(top-src-dir
)/Documentation
/*.tely
)
49 MANUALS
+=$(top-src-dir
)/Documentation
/contributor.texi
56 $(CREATE_VERSION
) $(top-src-dir
) > $(OUT
)/version.itexi
57 $(CREATE_WEBLINKS
) $(top-src-dir
) > $(OUT
)/weblinks.itexi
59 website-xrefs
: website-version
60 $(EXTRACT_TEXI_FILENAMES
) -I
$(top-src-dir
)/Documentation
/ \
61 -I
$(OUT
) -o
$(OUT
) --split
=node \
62 $(top-src-dir
)/Documentation
/web.texi
64 for m in
$(MANUALS
); do \
65 b
=`basename "$$m" .texi`; \
66 d
=`basename "$$b" .tely`; \
67 $(EXTRACT_TEXI_FILENAMES
) \
68 -I
$(top-src-dir
)/Documentation
/ \
69 -I
$(top-src-dir
)/Documentation
/"$$d"/ \
70 -I
$(OUT
) -o
$(OUT
) "$$m" ; \
73 for l in
$(WEB_LANGS
); do \
74 $(EXTRACT_TEXI_FILENAMES
) \
75 -I
$(top-src-dir
)/Documentation
/ \
76 -I
$(top-src-dir
)/Documentation
/"$$l" \
77 -I
$(OUT
) -o
$(OUT
) --split
=node \
78 $(top-src-dir
)/Documentation
/"$$l"/web.texi
;\
79 for m in
$(MANUALS
); do \
80 n
=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
81 b
=`basename "$$n" .texi`; \
82 d
=`basename "$$b" .tely`; \
83 if
[ -e
"$$n" ] ; then \
84 $(EXTRACT_TEXI_FILENAMES
) \
85 -I
$(top-src-dir
)/Documentation
/ \
86 -I
$(top-src-dir
)/Documentation
/"$$l" \
87 -I
$(top-src-dir
)/Documentation
/"$$l"/"$$d"/ \
88 -I
$(OUT
) -o
$(OUT
) "$$n" ; \
95 website-texinfo
: website-version website-xrefs
96 $(TEXI2HTML
) --prefix=index \
98 --I
=$(top-src-dir
)/Documentation
/ \
100 --init-file
=$(texi2html-init-file
) \
102 --output
=$(OUT
)/website
/ \
103 $(top-src-dir
)/Documentation
/web.texi
105 for l in
$(WEB_LANGS
); do \
106 $(TEXI2HTML
) --prefix=index \
108 --I
=$(top-src-dir
)/Documentation
/"$$l" \
109 --I
=$(top-src-dir
)/Documentation
/ \
112 --init-file
=$(texi2html-init-file
) \
114 --output
=$(OUT
)/"$$l" \
115 $(top-src-dir
)/Documentation
/"$$l"/web.texi
; \
116 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
/ ; \
121 cp
$(top-src-dir
)/Documentation
/css
/*.css
$(OUT
)/website
/
124 mkdir
-p
$(OUT
)/website
/pictures
/
125 cp
$(PICTURES
)/* $(OUT
)/website
/pictures
/
126 ln
-sf website
/pictures
$(OUT
)/pictures
129 mkdir
-p
$(OUT
)/website
/ly-examples
130 cp
$(EXAMPLES
)/* $(OUT
)/website
/ly-examples
133 $(WEB_POST
) $(OUT
)/website
/
135 website
: website-texinfo website-css website-pictures website-examples web-post
136 cp
$(SERVER_FILES
)/favicon.ico
$(OUT
)/website
/
137 cp
$(SERVER_FILES
)/robots.txt
$(OUT
)/website
/
138 cp
$(top-htaccess
) $(OUT
)/.htaccess
139 cp
$(dir-htaccess
) $(OUT
)/website
/.htaccess