d2c1f1eb3669b7ad33fcb4cd173a75c2060fdae1
Lunar Import build system from pr...

Lunar authored 9 years ago

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

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

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

Lunar authored 9 years ago

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

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

26) 			done; \
Colin Childs No longer maintain a window...

Colin Childs authored 7 years ago

27) 		done
Lunar Add half-working PDF build...

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Arthur Edelstein authored 7 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

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

Lunar authored 9 years ago

81) 
Lunar Import build system from pr...

Lunar authored 9 years ago

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