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
)/lilypond
/lilypond-git
10 TRUSTED_DIR
=$(HOME
)/lilypond
/trusted-scripts
11 top-src-dir
=$(TOP_SRC_DIR
)
13 trusted-dir
=$(TRUSTED_DIR
)
14 script-dir
=$(trusted-dir
)
15 texi2html-init-file
=$(trusted-dir
)/lilypond-texi2html.init
16 top-htaccess
=$(trusted-dir
)/lilypond.org.htaccess
17 dir-htaccess
=$(trusted-dir
)/website-dir.htaccess
18 TEXI2HTML_PROGRAM
=$(HOME
)/usr
/bin
/texi2html
19 EXAMPLES
=$(HOME
)/media
/ly-examples
/
20 PICTURES
=$(HOME
)/media
/pictures
23 script-dir
=$(top-src-dir
)/scripts
/build
/
24 texi2html-init-file
=$(top-src-dir
)/Documentation
/lilypond-texi2html.init
25 top-htaccess
=$(top-src-dir
)/Documentation
/web
/server
/lilypond.org.htaccess
26 dir-htaccess
=$(top-src-dir
)/Documentation
/web
/server
/website-dir.htaccess
27 include $(config_make
)
28 # I assume this is run from top-build-dir
29 EXAMPLES
=Documentation
/web
/ly-examples
/out-www
/
30 PICTURES
=Documentation
/pictures
/out-www
/
34 ################################################################
37 ### only update this when the language compiles correctly!
38 # LANGUAGES = (site, de, es, fr, hu, it, ja, nl)
41 TEXI2HTML
=ONLY_WEB
=1 TOP_SRC_DIR
=$(top-src-dir
) DEPTH
=$(depth
) PERL_UNICODE
=SD
$(TEXI2HTML_PROGRAM
)
43 EXTRACT_TEXI_FILENAMES
=python
$(script-dir
)/extract_texi_filenames.py
44 CREATE_VERSION
=python
$(script-dir
)/create-version-itexi.py
45 CREATE_WEBLINKS
=python
$(script-dir
)/create-weblinks-itexi.py
46 MASS_LINK
=python
$(script-dir
)/mass-link.py
47 WEB_POST
=python
$(script-dir
)/website_post.py
49 SERVER_FILES
=$(top-src-dir
)/Documentation
/web
/server
/
52 MANUALS
=$(wildcard $(top-src-dir
)/Documentation
/*.tely
)
53 MANUALS
+=$(top-src-dir
)/Documentation
/contributor.texi
60 $(CREATE_VERSION
) $(top-src-dir
) > $(OUT
)/version.itexi
61 $(CREATE_WEBLINKS
) $(top-src-dir
) > $(OUT
)/weblinks.itexi
63 website-xrefs
: website-version
64 for l in
'' $(WEB_LANGS
); do \
65 $(EXTRACT_TEXI_FILENAMES
) \
66 -I
$(top-src-dir
)/Documentation
/ \
67 -I
$(top-src-dir
)/Documentation
/"$$l" \
68 -I
$(OUT
) -o
$(OUT
) --split
=node \
69 $(top-src-dir
)/Documentation
/"$$l"/web.texi
;\
70 for m in
$(MANUALS
); do \
71 n
=`echo "$$m" | sed 's/Documentation/Documentation\/'$$l'/'` ; \
72 b
=`basename "$$n" .texi`; \
73 d
=`basename "$$b" .tely`; \
74 if
[ -e
"$$n" ] ; then \
75 $(EXTRACT_TEXI_FILENAMES
) \
76 -I
$(top-src-dir
)/Documentation
/ \
77 -I
$(top-src-dir
)/Documentation
/"$$l" \
78 -I
$(top-src-dir
)/Documentation
/"$$l"/"$$d"/ \
79 -I
$(OUT
) -o
$(OUT
) "$$n" ; \
86 website-texinfo
: website-version website-xrefs
87 for l in
'' $(WEB_LANGS
); do \
88 if
test -n
"$$l"; then \
89 langopt
=--lang
="$$l"; \
92 $(TEXI2HTML
) --prefix=index \
94 --I
=$(top-src-dir
)/Documentation
/"$$l" \
95 --I
=$(top-src-dir
)/Documentation
/ \
98 --init-file
=$(texi2html-init-file
) \
100 --output
=$(OUT
)/"$$l" \
101 $(top-src-dir
)/Documentation
/"$$l"/web.texi
; \
102 ls
$(OUT
)/$$l/*.html | xargs grep
-L
'UNTRANSLATED NODE: IGNORE ME' | sed
's!$(OUT)/'$$l'/!!g' | xargs
$(MASS_LINK
) --prepend-suffix
="$$langsuf" hard
$(OUT
)/$$l/ $(OUT
)/website
/ ; \
107 cp
$(top-src-dir
)/Documentation
/css
/*.css
$(OUT
)/website
/
110 mkdir
-p
$(OUT
)/website
/pictures
/
111 cp
$(PICTURES
)/* $(OUT
)/website
/pictures
/
112 ln
-sf website
/pictures
$(OUT
)/pictures
115 mkdir
-p
$(OUT
)/website
/ly-examples
116 cp
$(EXAMPLES
)/* $(OUT
)/website
/ly-examples
119 $(WEB_POST
) $(OUT
)/website
/
121 website
: website-texinfo website-css website-pictures website-examples web-post
122 cp
$(SERVER_FILES
)/favicon.ico
$(OUT
)/website
/
123 cp
$(SERVER_FILES
)/robots.txt
$(OUT
)/website
/
124 cp
$(top-htaccess
) $(OUT
)/.htaccess
125 cp
$(dir-htaccess
) $(OUT
)/website
/.htaccess