d97c9d6f1702e66dc719d697214cfcdf65cb5c2c
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
9) HELP_FILES = $(shell cd C && git ls-files '*.page')
10) HELP_MEDIA = $(shell cd C && git ls-files 'media')
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; \
20) 				yelp-build html -x platform-$$platform.xslt \
21) 						-o html/$$platform/$$lc $$lc; \
22) 			done; \
Lunar Add half-working PDF build...

Lunar authored 10 years ago

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

Lunar authored 10 years ago

39) 		done;
40) 
Lunar Add half-working PDF build...

Lunar authored 10 years ago

41) media-symlinks.stamp: all
42) 	set -e && \
43) 		for lc in C $(HELP_LINGUAS); do \
44) 			for media in $(HELP_MEDIA); do \
45) 				if ! [ -f $$lc/$$media ]; then \
46) 					mkdir -p $$(dirname $$lc/$$media); \
47) 					ln -nsf ../../C/$$media $$lc/$$media; \
48) 				fi; \
49) 			done; \
50) 		done
51) 	touch media-symlinks.stamp
52) 
Lunar Rework page about Tor to in...

Lunar authored 10 years ago

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

Lunar authored 10 years ago

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