Makefile

Wed, 16 Dec 2020 15:19:17 +0100

author
David Demelier <markand@malikania.fr>
date
Wed, 16 Dec 2020 15:19:17 +0100
changeset 30
0ccb3b76e2ed
parent 29
08131face9d0
child 31
e902ab63f718
permissions
-rw-r--r--

switch to no-class.css

22
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
1 #
23
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
2 # Makefile -- basic BSD Makefile for irccd-www
22
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
3 #
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
4 # Copyright (c) 2013-2019 David Demelier <markand@malikania.fr>
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
5 #
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
6 # Permission to use, copy, modify, and/or distribute this software for any
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
7 # purpose with or without fee is hereby granted, provided that the above
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
8 # copyright notice and this permission notice appear in all copies.
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
9 #
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
10 # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
11 # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
12 # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
13 # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
14 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
15 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
16 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
17 #
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
18
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
19 PANDOC= pandoc
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
20 PANDOC_FLAGS= -f markdown -t html5 --template templates/template.html
23
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
21 MANDOC= mandoc
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
22 MANDOC_PDF= -T pdf
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
23 MANDOC_HTML= -T html -O man=%N.html
28
a8dc1565c470 update for 3.1.0
David Demelier <markand@malikania.fr>
parents: 26
diff changeset
24 VERSION= 3.1.0
23
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
25 SOURCE= irccd-${VERSION}.tar.xz
26
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
26 WRKDIR= irccd-${VERSION}
22
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
27
26
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
28 MAN1= irccd-${VERSION}/man/irccd.1 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
29 irccd-${VERSION}/man/irccdctl.1 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
30 irccd-${VERSION}/man/irccd-test.1
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
31 MAN5= irccd-${VERSION}/man/irccd.conf.5 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
32 irccd-${VERSION}/man/irccdctl.conf.5
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
33 MAN7= irccd-${VERSION}/man/irccd-api.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
34 irccd-${VERSION}/man/irccd-ipc.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
35 irccd-${VERSION}/man/irccd-templates.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
36 irccd-${VERSION}/plugins/ask/ask.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
37 irccd-${VERSION}/plugins/auth/auth.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
38 irccd-${VERSION}/plugins/hangman/hangman.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
39 irccd-${VERSION}/plugins/history/history.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
40 irccd-${VERSION}/plugins/joke/joke.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
41 irccd-${VERSION}/plugins/links/links.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
42 irccd-${VERSION}/plugins/logger/logger.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
43 irccd-${VERSION}/plugins/plugin/plugin.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
44 irccd-${VERSION}/plugins/roulette/roulette.7 \
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
45 irccd-${VERSION}/plugins/tictactoe/tictactoe.7
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
46
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
47 MAN1HTML= ${MAN1:.1=.html}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
48 MAN1PDF= ${MAN1:.1=.pdf}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
49 MAN5HTML= ${MAN5:.5=.html}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
50 MAN5PDF= ${MAN5:.5=.pdf}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
51 MAN7HTML= ${MAN7:.7=.html}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
52 MAN7PDF= ${MAN7:.7=.pdf}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
53
29
08131face9d0 switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 28
diff changeset
54 SITE_SRCS= contribute.md \
08131face9d0 switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 28
diff changeset
55 documentation.md \
08131face9d0 switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 28
diff changeset
56 downloads.md \
08131face9d0 switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 28
diff changeset
57 index.md \
26
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
58 versioning.md
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
59 SITE_HTML= ${SITE_SRCS:.md=.html}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
60
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
61 .SUFFIXES:
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
62 .SUFFIXES: .html .pdf .md .1 .5 .7
23
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
63
25
2549facbedfb add doxygen API
David Demelier <markand@malikania.fr>
parents: 23
diff changeset
64 all: site man doxygen
22
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
65
26
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
66 ${SITE_HTML}: templates/template.html
22
e49c41217e6e create new minimal website
David Demelier <markand@malikania.fr>
parents:
diff changeset
67
23
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
68 ${SOURCE}:
26
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
69 wget -q http://releases.malikania.fr/irccd/${VERSION}/$@ -O $@
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
70
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
71 ${WRKDIR}: ${SOURCE}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
72 tar xJf ${SOURCE}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
73
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
74 .md.html:
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
75 ${PANDOC} ${PANDOC_FLAGS} -o $@ $<
23
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
76
26
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
77 .1.html .5.html .7.html:
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
78 sed "s/@IRCCD_MAN_DATE@/October 06, 2019/" $< | ${MANDOC} ${MANDOC_HTML} > $@
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
79
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
80 .1.pdf .5.pdf .7.pdf:
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
81 sed "s/@IRCCD_MAN_DATE@/October 06, 2019/" $< | ${MANDOC} ${MANDOC_PDF} > $@
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
82
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
83 man: ${WRKDIR} ${MAN1HTML} ${MAN5HTML} ${MAN7HTML} ${MAN1PDF} ${MAN5PDF} ${MAN7PDF}
23
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
84
26
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
85 doxygen: ${WKRDIR}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
86 mkdir -p irccd-${VERSION}/build
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
87 cmake -S irccd-${VERSION} -B irccd-${VERSION}/build > /dev/null 2>&1
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
88 cmake --build irccd-${VERSION}/build --target doxygen > /dev/null
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
89 rsync -a --delete irccd-${VERSION}/build/doc/doxygen/html/ doxygen
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
90
30
0ccb3b76e2ed switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 29
diff changeset
91 www: ${SITE_HTML} man doxygen
0ccb3b76e2ed switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 29
diff changeset
92 mkdir $@
0ccb3b76e2ed switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 29
diff changeset
93 cp -R css $@
0ccb3b76e2ed switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 29
diff changeset
94 cp -R doxygen $@/api
0ccb3b76e2ed switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 29
diff changeset
95 cp ${MAN1HTML} ${MAN5HTML} ${MAN7HTML} $@
0ccb3b76e2ed switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 29
diff changeset
96 cp ${MAN1PDF} ${MAN5PDF} ${MAN7PDF} $@
0ccb3b76e2ed switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 29
diff changeset
97 cp ${SITE_HTML} $@
23
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
98
3e21222edcfd update for 3.0.0
David Demelier <markand@malikania.fr>
parents: 22
diff changeset
99 clean:
26
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
100 rm -f ${MAN1HTML} ${MAN5HTML} ${MAN7HTML}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
101 rm -f ${MAN1PDF} ${MAN5PDF} ${MAN7PDF}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
102 rm -f ${SITE_HTML}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
103 rm -f ${SOURCE}
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
104 rm -rf doxygen
89a5b4240372 cleanup makefile and update for 3.0.3
David Demelier <markand@malikania.fr>
parents: 25
diff changeset
105 rm -rf ${WRKDIR}
25
2549facbedfb add doxygen API
David Demelier <markand@malikania.fr>
parents: 23
diff changeset
106
30
0ccb3b76e2ed switch to no-class.css
David Demelier <markand@malikania.fr>
parents: 29
diff changeset
107 .PHONY: all clean man

mercurial