298acf26d0fdb323caf44355b332e1c2144f60ac
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 Restore compatibility with...

Lunar authored 9 years ago

12) HELP_LINGUAS = en-US @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 && \
Lunar Restore compatibility with...

Lunar authored 9 years ago

17) 		for lc in $(HELP_LINGUAS); do \
18) 			includes="$$(find include -maxdepth 1 -type f)" ; \
19) 			for file in $$includes; do \
20) 				mkdir -p $$(dirname $$file); \
21) 				ln -nsf ../$$file $$lc/$$(basename $$file); \
22) 			done; \
Lunar Import build system from pr...

Lunar authored 10 years ago

23) 			for platform in $(HELP_PLATFORMS); do \
24) 				mkdir -p html/$$platform/$$lc; \
Lunar Restore compatibility with...

Lunar authored 9 years ago

25) 				yelp-build html -x $(srcdir)/platform-$$platform.xslt \
Lunar Import build system from pr...

Lunar authored 10 years ago

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

Lunar authored 9 years ago

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

Lunar authored 10 years ago

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

Lunar authored 10 years ago

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

Lunar authored 9 years ago

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

Lunar authored 10 years ago

37) 			for platform in $(HELP_PLATFORMS); do \
38) 				PDF_DIR=pdf/$$platform/$$lc; \
39) 				LATEX_FILE=$(HELP_ID)-$$lc.latex; \
40) 				mkdir -p $$PDF_DIR; \
41) 				yelp-build cache -o $$PDF_DIR/index.cache $$lc; \
42) 				xsltproc --xinclude \
43) 					$(MAL2LATEX)/mal2latex.xsl $$PDF_DIR/index.cache \
44) 					> $$PDF_DIR/$$LATEX_FILE; \
45) 				(cd $$PDF_DIR && lualatex $$LATEX_FILE); \
46) 			done; \
Lunar Import build system from pr...

Lunar authored 10 years ago

47) 		done;
48) 
Lunar Enable out-of-source-tree b...

Lunar authored 9 years ago

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

Lunar authored 10 years ago

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

Lunar authored 9 years ago

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

Lunar authored 10 years ago

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

Lunar authored 9 years ago

55) 					if [ -f $(srcdir)/$$lc/$$media ]; then \
56) 						ln -nsf $(abs_srcdir)/$$lc/$$media $$lc/$$media; \
57) 					else \
58) 						ln -nsf $(abs_srcdir)/C/$$media $$lc/$$media; \
59) 					fi; \
Lunar Add half-working PDF build...

Lunar authored 10 years ago

60) 				fi; \
61) 			done; \
62) 		done
63) 	touch media-symlinks.stamp
64) 
Lunar Rework page about Tor to in...

Lunar authored 9 years ago

65) .PHONY: update-tor-and-https
66) update-tor-and-https:
67) 	set -e && \
68) 		for lc in C $(HELP_LINGUAS); do \
Lunar Import 'Tor and HTTPS' visu...

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

87) 
Lunar Import build system from pr...

Lunar authored 10 years ago

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