44a3777eb38d94319871ba97b25af8b8aa60e50e
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 Import build system from pr...

Lunar authored 10 years ago

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

Lunar authored 9 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 9 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; \
23) 			done; \
Lunar Add half-working PDF build...

Lunar authored 10 years ago

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

Lunar authored 10 years ago

40) 		done;
41) 
Lunar Enable out-of-source-tree b...

Lunar authored 9 years ago

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

Lunar authored 10 years ago

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

Lunar authored 9 years ago

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

Lunar authored 10 years ago

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

Lunar authored 9 years ago

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

Lunar authored 10 years ago

53) 				fi; \
54) 			done; \
55) 		done
56) 	touch media-symlinks.stamp
57) 
Lunar Rework page about Tor to in...

Lunar authored 9 years ago

58) .PHONY: update-tor-and-https
59) update-tor-and-https:
60) 	set -e && \
61) 		for lc in C $(HELP_LINGUAS); do \
62) 			find $(TOR_AND_HTTPS) \
63) 				-wholename "*/$$(echo $$lc | sed -e 's/^\([^_-]*\).*/\1/')*/tor-and-https.svg" \
64) 				-exec cp {} $$lc/media ';'; \
65) 		done
66) 
Lunar Import build system from pr...

Lunar authored 10 years ago

67) clean:
68) 	set -e && \
69) 		for lc in C $(HELP_LINGUAS); do \
70) 			for media in $(HELP_MEDIA); do \
71) 				if [ -L $$lc/$$media ]; then \
72) 					rm $$lc/$$media; \
73) 				fi; \
74) 				rmdir --ignore-fail-on-non-empty $$(dirname $$lc/$$media); \
75) 			done; \
76) 		done;
77) 
78) distclean-local:
79) 	rm -rf html