1 #
2 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3 #
4 # Copyright 2017 Olaf Wintermann. All rights reserved.
5 #
6 # Redistribution and use in source and binary forms, with or without
7 # modification, are permitted provided that the following conditions are met:
8 #
9 # 1. Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 #
12 # 2. Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
15 #
16 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 # ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20 # LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 # CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 # SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 # INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 # CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 # POSSIBILITY OF SUCH DAMAGE.
27 #
28
29 PANDOC=pandoc
30 PFLAGS = -c davdoc.css -B header.html -A footer.html
31 PDEPEND = header.html footer.html
32 PFLAGSMAN=-s -t man
33
34 SRC = getting-started.md
35 SRC += commands.md
36 SRC += list.md
37 SRC += get.md
38 SRC += put.md
39 SRC += edit.md
40 SRC += mkdir.md
41 SRC += remove.md
42 SRC += copy.md
43 SRC += move.md
44 SRC += rename.md
45 SRC += export.md
46 SRC += import.md
47 SRC += get-property.md
48 SRC += set-property.md
49 SRC += remove-property.md
50 SRC += lock.md
51 SRC += unlock.md
52 SRC += info.md
53 SRC += date.md
54 SRC += versioncontrol.md
55 SRC += list-versions.md
56 SRC += checkout.md
57 SRC += checkin.md
58 SRC += uncheckout.md
59 SRC += configuration.md
60 SRC += encryption.md
61 SRC += add-repository.md
62 SRC += remove-repository.md
63 SRC += list-repositories.md
64 SRC += repository-url.md
65 SRC += add-user.md
66 SRC += remove-user.md
67 SRC += edit-user.md
68 SRC += list-users.md
69 SRC += check-config.md
70 SRC += introduction.md
71 SRC += sync-commands.md
72 SRC += pull.md
73 SRC += push.md
74 SRC += archive.md
75 SRC += restore.md
76 SRC += list-conflicts.md
77 SRC += resolve-conflicts.md
78 SRC += delete-conflicts.md
79 SRC += trash-info.md
80 SRC += empty-trash.md
81 SRC += add-tag.md
82 SRC += remove-tag.md
83 SRC += set-tags.md
84 SRC += list-tags.md
85 SRC += add-directory.md
86 SRC += list-directories.md
87 SRC += sync-check-config.md
88 SRC += check-repositories.md
89 SRC += sync-configuration.md
90 SRC += sync-list-versions.md
91
92 SRCMAN = dav.1.md
93 SRCMAN += dav-sync.1.md
94
95 HTML = $(SRC:%.md=build/%.html)
96 MAN = $(SRCMAN:%.md=build/%.man)
97
98 DISTHTML = ../html
99 DISTMAN = ../man
100
101 FILES = build/davdoc.css build/index.html
102
103 all: doc manual
104
105 doc: build $(HTML) $(FILES)
106
107 manual: build $(MAN)
108
109 build:
110 mkdir -p build
111
112 build/%.html: %.md $(PDEPEND)
113 $(PANDOC) $(PFLAGS) $< -o $@
114
115 build/%.man: %.md
116 $(PANDOC) $(PFLAGSMAN) $< -o $@
117
118 build/davdoc.css: davdoc.css
119 cp davdoc.css build
120
121 build/index.html: index.html
122 cp index.html build
123
124 dist: doc manual
125 rm -Rf $(DISTHTML) $(DISTMAN)
126 mkdir -p $(DISTHTML) $(DISTMAN)
127 cp build/*.html $(DISTHTML)/
128 cp build/*.css $(DISTHTML)/
129 cp build/*.man $(DISTMAN)/
130
131 clean:
132 rm -Rf build
133
134