0affda17d18d48a589ae3e4dbd5079b57fe9dbc5
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 10 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 10 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 Import build system from pr...

Lunar authored 10 years ago

11) HELP_PLATFORMS = windows macosx linux
Lunar Retrieve Tor Browser versio...

Lunar authored 10 years ago

12) HELP_LINGUAS = @TOR_BROWSER_BUNDLE_LOCALES@
Lunar Import build system from pr...

Lunar authored 10 years ago

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

Lunar authored 10 years ago

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

Lunar authored 10 years ago

16) 	set -e && \
17) 		for lc in C $(HELP_LINGUAS); do \
18) 			for platform in $(HELP_PLATFORMS); do \
19) 				mkdir -p html/$$platform/$$lc; \
Lunar Enable out-of-source-tree b...

Lunar authored 10 years ago

20) 				yelp-build html -p include \
21) 						-x $(srcdir)/platform-$$platform.xslt \
Lunar Import build system from pr...

Lunar authored 10 years ago

22) 						-o html/$$platform/$$lc $$lc; \
Lunar Import 'Tor and HTTPS' visu...

Lunar authored 10 years ago

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

Lunar authored 10 years ago

26) 			done; \
Lunar Add half-working PDF build...

Lunar authored 10 years ago

27) 		done
28) 
29) .PHONY: pdf
30) pdf: all media-symlinks.stamp
31) 	set -e && \
32) 		for lc in C $(HELP_LINGUAS); do \
33) 			for platform in $(HELP_PLATFORMS); do \
34) 				PDF_DIR=pdf/$$platform/$$lc; \
35) 				LATEX_FILE=$(HELP_ID)-$$lc.latex; \
36) 				mkdir -p $$PDF_DIR; \
37) 				yelp-build cache -o $$PDF_DIR/index.cache $$lc; \
38) 				xsltproc --xinclude \
39) 					$(MAL2LATEX)/mal2latex.xsl $$PDF_DIR/index.cache \
40) 					> $$PDF_DIR/$$LATEX_FILE; \
41) 				(cd $$PDF_DIR && lualatex $$LATEX_FILE); \
42) 			done; \
Lunar Import build system from pr...

Lunar authored 10 years ago

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

Lunar authored 10 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 10 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 10 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 10 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 10 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 10 years ago

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

Lunar authored 10 years ago

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

Lunar authored 10 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