~ubuntu-core-doc/xubuntu-docs/vivid

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: David Pires
  • Date: 2015-04-19 21:42:53 UTC
  • Revision ID: slickymaster@gmail.com-20150419214253-hx8egrwbbp0ny8ws
Applying krytarik's patches to root Makefile, desktop-guide/Makefile and index.xml file. Fix behavior on updating LINGUAS on build time, update LINGUAS on currently shipped translations, correct some data in the general contributor credits and sort those alphabetically.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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
38
 
 
39
 
translate:
40
 
        make -C desktop-guide translate
41
 
 
42
 
test:
43
 
        make -C desktop-guide test
 
53
        $(MAKE) -C desktop-guide epub
 
54
 
 
55
translate: get-translations
 
56
        $(MAKE) -C desktop-guide translate
 
57
 
 
58
test: get-translations
 
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