Paste #Zff6U1mDW5RMepwTy8vz

branches/xubuntu-docs/Makefile [2015-03-23 21:44:04.000000000 +0100]
build/xubuntu-docs/Makefile [2015-04-18 01:32:04.000000000 +0200]
1 1 # Makefile for the Xubuntu Documentation
2 # Ubuntu Documentation Project <ubuntu-doc@lists.ubuntu.com>
2 # Xubuntu Project <xubuntu-devel@lists.ubuntu.com>
3 3
4 # Include revision number
4 5 ifneq ($(REVNO),)
5 6 VERSION =
6 7 VERSION += (Rev. $(REVNO))
7 8 endif
8 9
10 # All available translations
11 TRANSALL = $(shell basename -s .po -a desktop-guide/po/*.po)
12
9 13 all: clean startpage html translate
10 14
11 15 startpage: get-translations
20 24 done >> build/index.html
21 25 cat startpage/xubuntu-index-end.htx >> build/index.html
22 26
23 get-translations:
24 ifneq ($(wildcard desktop-guide/po/LINGUAS),)
25 cd desktop-guide; \
26 ../scripts/translate.sh -u
27 export TRANSLATIONS := $(shell cat desktop-guide/po/LINGUAS)
28 export TRANSOPTS = -g
29 else
30 export TRANSLATIONS := $(shell basename -s .po -a desktop-guide/po/*.po)
31 endif
27 update-translations:
28 ifeq ($(TRANSLATIONS),)
29 ifneq ($(wildcard desktop-guide/po/LINGUAS),)
30 cd desktop-guide; \
31 ../scripts/translate.sh -u
32 endif
33 endif
34
35 get-translations: update-translations
36 ifeq ($(TRANSLATIONS),)
37 ifneq ($(wildcard desktop-guide/po/LINGUAS),)
38 export TRANSLATIONS = $(shell cat desktop-guide/po/LINGUAS)
39 export TRANSOPTS = -g
40 else
41 export TRANSLATIONS := $(TRANSALL)
42 export TRANSOPTS := -l "$(TRANSLATIONS)"
43 endif
44 else
45 export TRANSLATIONS
46 export TRANSOPTS := -l "$(TRANSLATIONS)"
47 endif
32 48
33 49 html:
34 make -C desktop-guide html
50 $(MAKE) -C desktop-guide html
35 51
36 52 epub:
37 make -C desktop-guide epub
53 $(MAKE) -C desktop-guide epub
38 54
39 translate:
40 make -C desktop-guide translate
55 translate: get-translations
56 $(MAKE) -C desktop-guide translate
41 57
42 58 test:
43 make -C desktop-guide test
59 $(MAKE) -C desktop-guide test
44 60
45 61 src-tarball:
46 62 # exclude archive, backup, and bzr files
47 63 tar cvfz xubuntu-doc.tar.gz --exclude="*.tar.gz" --exclude="*~" --exclude "*.bzr*" *
48 64
49 65 clean:
50 make -C desktop-guide clean
66 $(MAKE) -C desktop-guide clean
51 67 rm -rf build
52 68
53 69 .PHONY: startpage
branches/xubuntu-docs/desktop-guide/Makefile [2015-03-23 21:44:04.000000000 +0100]
build/xubuntu-docs/desktop-guide/Makefile [2015-04-18 01:32:04.000000000 +0200]
1 1 # Makefile for the Xubuntu Documentation
2 # Ubuntu Documentation Project <ubuntu-doc@lists.ubuntu.com>
3 # Public domain
2 # Xubuntu Project <xubuntu-devel@lists.ubuntu.com>
4 3
5 4 # Xubuntu Docbook Customization Layer
6 5 XUBUNTUXSL = libs/xubuntu-docbook-conf.xsl
55 54 ../scripts/validate.sh $$dir/index.xml; \
56 55 done
57 56
58 get-translations:
59 ifeq ($(TRANSLATIONS),)
60 ifneq ($(wildcard po/LINGUAS),)
61 ../scripts/translate.sh -u
62 TRANSLATIONS := $(shell cat po/LINGUAS)
63 TRANSOPTS = -g
57 update-translations:
58 ifeq ($(TRANSLATIONS),)
59 ifneq ($(wildcard po/LINGUAS),)
60 ../scripts/translate.sh -u
61 endif
62 endif
63
64 get-translations: update-translations
65 ifeq ($(TRANSLATIONS),)
66 ifneq ($(wildcard po/LINGUAS),)
67 TRANSLATIONS = $(shell cat po/LINGUAS)
68 TRANSOPTS = -g
69 else
70 TRANSLATIONS := $(TRANSALL)
71 TRANSOPTS := -l "$(TRANSLATIONS)"
72 endif
64 73 else
65 TRANSLATIONS := $(TRANSALL)
74 ifeq ($(TRANSOPTS),)
75 TRANSOPTS := -l "$(TRANSLATIONS)"
76 endif
66 77 endif
67 endif
68 78
69 79 clean:
70 ${RM} -r $(TRANSALL) C/translators.xml
80 rm -rf $(TRANSALL) C/translators.xml