6aba4583f969c141339084b1513f5e6d57532d1b
Lunar Import build system from pr...

Lunar authored 10 years ago

1) @YELP_HELP_RULES@
2) 
Lunar Add half-working PDF build...

Lunar authored 10 years ago

3) # XXX: turn into ./configure option
4) MAL2LATEX = ../mal2latex
Lunar Rework page about Tor to in...

Lunar authored 9 years ago

5) # XXX: turn into ./configure option
6) TOR_AND_HTTPS = ../tor-and-https
7) 
Lunar Import build system from pr...

Lunar authored 10 years ago

8) HELP_ID = tor-browser-user-manual
Lunar Enable out-of-source-tree b...

Lunar authored 9 years ago

9) HELP_FILES = $(shell cd $(srcdir)/C && git ls-files '*.page')
10) HELP_MEDIA = $(shell cd $(srcdir)/C && git ls-files 'media')
Lunar Restore compatibility with...

Lunar authored 9 years ago

11) HELP_LINGUAS = en-US @TOR_BROWSER_BUNDLE_LOCALES@
Lunar Import build system from pr...

Lunar authored 10 years ago

12) 
13) .PHONY: html
Lunar Add half-working PDF build...

Lunar authored 10 years ago

14) html: all media-symlinks.stamp
Lunar Import build system from pr...

Lunar authored 10 years ago

15) 	set -e && \
Lunar Restore compatibility with...

Lunar authored 9 years ago

16) 		for lc in $(HELP_LINGUAS); do \
17) 			includes="$$(find include -maxdepth 1 -type f)" ; \
18) 			for file in $$includes; do \
19) 				mkdir -p $$(dirname $$file); \
20) 				ln -nsf ../$$file $$lc/$$(basename $$file); \
21) 			done; \
Arthur Edelstein Bug 20739: Use one manual f...

Arthur Edelstein authored 7 years ago

22) 			mkdir -p html/$$lc; \
23) 			yelp-build html -o html/$$lc $$lc; \
24) 			for ttf in $$lc/media/*.ttf; do \
25) 				cp --preserve=timestamps $$ttf html/$$lc/media; \
Lunar Import build system from pr...

Lunar authored 10 years ago

26) 			done; \
Arthur Edelstein Bug 20739: Temporarily main...

Arthur Edelstein authored 7 years ago

27) 		done; \
28) 	mkdir html/windows/
29) 	cp -R html/en-US html/windows/en-US
Lunar Add half-working PDF build...

Lunar authored 10 years ago

30) 
31) .PHONY: pdf
32) pdf: all media-symlinks.stamp
33) 	set -e && \
Lunar Restore compatibility with...

Lunar authored 9 years ago

34) 		for lc in $(HELP_LINGUAS); do \
Arthur Edelstein Bug 20739: Use one manual f...

Arthur Edelstein authored 7 years ago

35) 			PDF_DIR=pdf/$$lc; \
36) 			LATEX_FILE=$(HELP_ID)-$$lc.latex; \
37) 			mkdir -p $$PDF_DIR; \
38) 			yelp-build cache -o $$PDF_DIR/index.cache $$lc; \
39) 			xsltproc --xinclude \
40) 				$(MAL2LATEX)/mal2latex.xsl $$PDF_DIR/index.cache \
41) 				> $$PDF_DIR/$$LATEX_FILE; \
42) 			(cd $$PDF_DIR && lualatex $$LATEX_FILE); \
Lunar Import build system from pr...

Lunar authored 10 years ago

43) 		done;
44) 
Lunar Enable out-of-source-tree b...

Lunar authored 9 years ago

45) media-symlinks.stamp:
Lunar Add half-working PDF build...

Lunar authored 10 years ago

46) 	set -e && \
Lunar Enable out-of-source-tree b...

Lunar authored 9 years ago

47) 		for lc in $(HELP_LINGUAS); do \
Lunar Add half-working PDF build...

Lunar authored 10 years ago

48) 			for media in $(HELP_MEDIA); do \
49) 				if ! [ -f $$lc/$$media ]; then \
50) 					mkdir -p $$(dirname $$lc/$$media); \
Lunar Enable out-of-source-tree b...

Lunar authored 9 years ago

51) 					if [ -f $(srcdir)/$$lc/$$media ]; then \
52) 						ln -nsf $(abs_srcdir)/$$lc/$$media $$lc/$$media; \
53) 					else \
54) 						ln -nsf $(abs_srcdir)/C/$$media $$lc/$$media; \
55) 					fi; \
Lunar Add half-working PDF build...

Lunar authored 10 years ago

56) 				fi; \
57) 			done; \
58) 		done
59) 	touch media-symlinks.stamp
60) 
Lunar Rework page about Tor to in...

Lunar authored 9 years ago

61) .PHONY: update-tor-and-https
62) update-tor-and-https:
63) 	set -e && \
64) 		for lc in C $(HELP_LINGUAS); do \
Lunar Import 'Tor and HTTPS' visu...

Lunar authored 9 years ago

65) 			for file in $$(find $(TOR_AND_HTTPS) \
66) 					-wholename "*/$$(echo $$lc | sed -e 's/^\([^_-]*\).*/\1/')*/tor-and-https.svg"); do \
67) 				cp $$file $$lc/media; \
68) 				git add $$lc/media/$$(basename $$file); \
69) 			done; \
70) 			for ttf in $$(find $(TOR_AND_HTTPS) \
71) 					-wholename "*/$$(echo $$lc | sed -e 's/^\([^_-]*\).*/\1/')*/*.ttf"); do \
72) 				if ! [ -f "C/media/$$(basename $$ttf)" ]; then \
73) 					cp "$$ttf" C/media; \
74) 					git add "C/media/$$(basename $$ttf)"; \
75) 				fi; \
76) 				if [ $$lc != "C" ]; then \
77) 					ln -nsf "../../C/media/$$(basename $$ttf)" $$lc/media;  \
78) 					git add "$$lc/media/$$(basename $$ttf)"; \
79) 				fi; \
80) 			done; \
Lunar Rework page about Tor to in...

Lunar authored 9 years ago

81) 		done
Lunar Import 'Tor and HTTPS' visu...

Lunar authored 9 years ago

82) 	git status --short --untracked-files=no
Lunar Rework page about Tor to in...

Lunar authored 9 years ago

83) 
Lunar Import build system from pr...

Lunar authored 10 years ago

84) clean:
85) 	set -e && \
86) 		for lc in C $(HELP_LINGUAS); do \
87) 			for media in $(HELP_MEDIA); do \
88) 				if [ -L $$lc/$$media ]; then \
89) 					rm $$lc/$$media; \
90) 				fi; \
91) 				rmdir --ignore-fail-on-non-empty $$(dirname $$lc/$$media); \
92) 			done; \
93) 		done;
94) 
95) distclean-local:
96) 	rm -rf html