blob: 54fec6dc7a43119d449cb8cbf52d2048ffba251d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
$(eval $(call import.MODULE.rules,DOC))
doc: doc.txt
doc.txt: $(DOC.texi2txt.out)
doc.xml: $(DOC.texi2xml.out)
doc.wiki: $(DOC.xml2wiki.out)
doc.clean:
$(RM.exe) -fr $(DOC.out/)
$(DOC.texi2txt.out): | $(DOC.m4.out)
$(DOC.texi2txt.out): | $(dir $(DOC.texi2txt.out))
$(DOC.texi2txt.out): $(DOC.texi.includes)
$(DOC.texi2txt.out): $(DOC.out.articles/)txt/%.txt: $(DOC.in/)texi/%.texi
$(call MAKEINFO,txt,$<,$@)
@echo $^
$(DOC.texi2xml.out): | $(DOC.m4.out)
$(DOC.texi2xml.out): | $(dir $(DOC.texi2xml.out))
$(DOC.texi2xml.out): $(DOC.texi.includes)
$(DOC.texi2xml.out): $(DOC.out.articles/)xml/%.xml: $(DOC.in/)texi/%.texi
$(call MAKEINFO,xml,$<,$@)
@echo $^
$(DOC.xml2wiki.out): | $(dir $(DOC.xml2wiki.out))
$(DOC.xml2wiki.out): $(DOC.out.articles/)wiki/%.wiki: $(DOC.out.articles/)xml/%.xml
$(call XML2WIKI,$<,$@)
$(DOC.m4.out): | $(dir $(DOC.m4.out))
$(DOC.m4.out): $(DOC.M4.deps)
$(DOC.m4.out): $(DOC.out/)%: $(DOC.in/)%.m4
$(call DOC.M4,$@,$<)
clean: doc.clean
###############################################################################
#.PHONY: wiki.post wiki.sync wiki.rm wiki.add wiki.propset wiki.clean
## main target
wiki.post: $(WIKI.out/) wiki.sync wiki.rm wiki.add wiki.propset
$(WIKI.out/):
svn co --depth immediates $(WIKI.repo.url) $@
svn update --set-depth infinity $(WIKI.out.version/)
## cleanup after post
wiki.clean:
$(RM.exe) -fr $(WIKI.out/)
wiki.sync: | $(WIKI.out.version/)
wiki.sync: $(DOC.xml2wiki.out)
rsync -vrptPL --delete $^ $(WIKI.out.version/)
wiki.rm:
@files=`svn status $(WIKI.out.version/) | grep '^!' | awk '{ print $$2 }'`; \
if [ -n "$$files" ]; then \
svn rm $$files; \
fi
wiki.add:
@files=`svn status $(WIKI.out.version/) | grep '^?' | awk '{ print $$2 }'`; \
if [ -n "$$files" ]; then \
svn add $$files; \
fi
wiki.propset:
find $(WIKI.out.version/) -type f -a -name "*.wiki" -print0 \
| xargs -0 svn propset svn:eol-style native
find $(WIKI.out.version/) -type f -a -name "*.wiki" -print0 \
| xargs -0 svn propset svn:mime-type "text/html"
|