cleanup makefile and update for 3.0.3

Sun, 06 Oct 2019 11:09:29 +0200

author
David Demelier <markand@malikania.fr>
date
Sun, 06 Oct 2019 11:09:29 +0200
changeset 26
89a5b4240372
parent 25
2549facbedfb
child 27
7789ed37d13d

cleanup makefile and update for 3.0.3

Makefile file | annotate | diff | comparison | revisions
index.md file | annotate | diff | comparison | revisions
--- a/Makefile	Sun Sep 01 17:53:01 2019 +0200
+++ b/Makefile	Sun Oct 06 11:09:29 2019 +0200
@@ -16,85 +16,95 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #
 
-FILES=          index.html \
-                versioning.html
 PANDOC=         pandoc
 PANDOC_FLAGS=   -f markdown -t html5 --template templates/template.html
 MANDOC=         mandoc
 MANDOC_PDF=     -T pdf
 MANDOC_HTML=    -T html -O man=%N.html
-RM=             rm -f
-VERSION=        3.0.1
+VERSION=        3.0.3
 SOURCE=         irccd-${VERSION}.tar.xz
-MANSRCS=        irccd-api.7 \
-                irccd-ipc.7 \
-                irccd-templates.7 \
-                irccd-test.1 \
-                irccd.1 \
-                irccd.conf.5 \
-                irccdctl.1 \
-                irccdctl.conf.5
-PLUGINS=        ask \
-                auth \
-                hangman \
-                history \
-                joke \
-                links \
-                logger \
-                plugin \
-                roulette \
-                tictactoe
+WRKDIR=         irccd-${VERSION}
 
-.SUFFIXES: .html .md
+MAN1=           irccd-${VERSION}/man/irccd.1 \
+                irccd-${VERSION}/man/irccdctl.1 \
+                irccd-${VERSION}/man/irccd-test.1
+MAN5=           irccd-${VERSION}/man/irccd.conf.5 \
+                irccd-${VERSION}/man/irccdctl.conf.5
+MAN7=           irccd-${VERSION}/man/irccd-api.7 \
+                irccd-${VERSION}/man/irccd-ipc.7 \
+                irccd-${VERSION}/man/irccd-templates.7 \
+                irccd-${VERSION}/plugins/ask/ask.7 \
+                irccd-${VERSION}/plugins/auth/auth.7 \
+                irccd-${VERSION}/plugins/hangman/hangman.7 \
+                irccd-${VERSION}/plugins/history/history.7 \
+                irccd-${VERSION}/plugins/joke/joke.7 \
+                irccd-${VERSION}/plugins/links/links.7 \
+                irccd-${VERSION}/plugins/logger/logger.7 \
+                irccd-${VERSION}/plugins/plugin/plugin.7 \
+                irccd-${VERSION}/plugins/roulette/roulette.7 \
+                irccd-${VERSION}/plugins/tictactoe/tictactoe.7
+
+MAN1HTML=       ${MAN1:.1=.html}
+MAN1PDF=        ${MAN1:.1=.pdf}
+MAN5HTML=       ${MAN5:.5=.html}
+MAN5PDF=        ${MAN5:.5=.pdf}
+MAN7HTML=       ${MAN7:.7=.html}
+MAN7PDF=        ${MAN7:.7=.pdf}
+
+SITE_SRCS=      index.md \
+                versioning.md
+SITE_HTML=      ${SITE_SRCS:.md=.html}
+
+.SUFFIXES:
+.SUFFIXES: .html .pdf .md .1 .5 .7
 
 all: site man doxygen
 
-${FILES}: templates/template.html
+${SITE_HTML}: templates/template.html
 
 ${SOURCE}:
-	@wget -q http://releases.malikania.fr/irccd/${VERSION}/$@ -O $@
+	wget -q http://releases.malikania.fr/irccd/${VERSION}/$@ -O $@
+
+${WRKDIR}: ${SOURCE}
+	tar xJf ${SOURCE}
+
+.md.html:
+	${PANDOC} ${PANDOC_FLAGS} -o $@ $<
 
-site: ${FILES}
+.1.html .5.html .7.html:
+	sed "s/@IRCCD_MAN_DATE@/October 06, 2019/" $< | ${MANDOC} ${MANDOC_HTML} > $@
+
+.1.pdf .5.pdf .7.pdf:
+	sed "s/@IRCCD_MAN_DATE@/October 06, 2019/" $< | ${MANDOC} ${MANDOC_PDF} > $@
+
+site: ${SITE_HTML}
+
+man: ${WRKDIR} ${MAN1HTML} ${MAN5HTML} ${MAN7HTML} ${MAN1PDF} ${MAN5PDF} ${MAN7PDF}
 
-man: ${SOURCE}
-	@rm -rf irccd-${VERSION}
-	@tar xf ${SOURCE}
-.for m in ${MANSRCS}
-	@echo GEN ${m:C/[0-9]$/pdf/:_}
-	@${MANDOC} ${MANDOC_PDF} irccd-${VERSION}/man/$m > ${_}
-.endfor
-.for p in ${PLUGINS}
-	@echo GEN irccd-plugin-${p}.pdf
-	@${MANDOC} ${MANDOC_PDF} irccd-${VERSION}/plugins/${p}/${p}.7 > irccd-plugin-${p}.pdf
-.endfor
-.for m in ${MANSRCS}
-	@echo GEN ${m:C/[0-9]$/html/:_}
-	@${MANDOC} ${MANDOC_HTML} irccd-${VERSION}/man/$m > ${_}
-.endfor
-.for p in ${PLUGINS}
-	@echo GEN irccd-plugin-${p}.html
-	@${MANDOC} ${MANDOC_HTML} irccd-${VERSION}/plugins/${p}/${p}.7 > irccd-plugin-${p}.html
-.endfor
-	@rm -rf irccd-${VERSION}
+doxygen: ${WKRDIR}
+	mkdir -p irccd-${VERSION}/build
+	cmake -S irccd-${VERSION} -B irccd-${VERSION}/build > /dev/null 2>&1
+	cmake --build irccd-${VERSION}/build --target doxygen > /dev/null
+	rsync -a --delete irccd-${VERSION}/build/doc/doxygen/html/ doxygen
+
+publish: site man doxygen
+	rm -rf out
+	mkdir out
+	cp -R css out
+	cp -R webfonts out
+	cp -R doxygen out/api
+	cp ${MAN1HTML} ${MAN5HTML} ${MAN7HTML} out
+	cp ${MAN1PDF} ${MAN5PDF} ${MAN7PDF} out
+	cp ${SITE_HTML} out
+	rsync -av out/ ${DESTINATION}
+	rm -rf out
 
 clean:
-	@${RM} ${SOURCE} *.html *.pdf api
+	rm -f ${MAN1HTML} ${MAN5HTML} ${MAN7HTML}
+	rm -f ${MAN1PDF} ${MAN5PDF} ${MAN7PDF}
+	rm -f ${SITE_HTML}
+	rm -f ${SOURCE}
+	rm -rf doxygen
+	rm -rf ${WRKDIR}
 
-doxygen: ${SOURCE}
-	@echo GEN doxygen
-	@rm -rf irccd-${VERSION}
-	@tar xf ${SOURCE}
-	@mkdir -p irccd-${VERSION}/build
-	@cmake -S irccd-${VERSION} -B irccd-${VERSION}/build > /dev/null 2>&1
-	@cmake --build irccd-${VERSION}/build --target doxygen > /dev/null
-	@rsync -a --delete irccd-${VERSION}/build/doc/doxygen/html/ api
-	@rm -rf irccd-${VERSION}
-
-publish: site man
-	@rsync -av css webfonts *.html *.pdf api ${DESTINATION}
-
-.md.html:
-	@echo GEN $@
-	@${PANDOC} ${PANDOC_FLAGS} -o $@ $<
-
-.PHONY: all clean download man publish site
+.PHONY: all clean man publish site
--- a/index.md	Sun Sep 01 17:53:01 2019 +0200
+++ b/index.md	Sun Oct 06 11:09:29 2019 +0200
@@ -1,6 +1,6 @@
 % irccd - IRC Client Daemon
 % David Demelier <markand@malikania.fr>
-% 2019-07-10
+% 2019-10-06
 
 irccd - IRC Client Daemon
 =========================
@@ -17,6 +17,8 @@
 News
 ----
 
+- (2019-10-06) New release: irccd 3.0.3,
+- (2019-09-22) New release: irccd 3.0.2,
 - (2019-09-01) New release: irccd 3.0.1,
 - (2019-09-01) C++ doxygen documentation is online.
 - (2019-08-16) New release: irccd 3.0.0.
@@ -27,10 +29,10 @@
 Irccd is only distributed as source package on the official website but some
 distributions may provide binary packages.
 
-Current version is 3.0.1
+Current version is 3.0.3
 
-- [irccd-3.0.1.tar.xz][] ([signature][irccd-3.0.1.tar.xz.asc])
-- [irccd-3.0.1.zip][] ([signature][irccd-3.0.1.zip.asc])
+- [irccd-3.0.3.tar.xz][] ([signature][irccd-3.0.3.tar.xz.asc])
+- [irccd-3.0.3.zip][] ([signature][irccd-3.0.3.zip.asc])
 
 For those who wants to use the development version, it is available in the
 Mercurial [repository](http://hg.malikania.fr/irccd):
@@ -103,32 +105,32 @@
 - [RFC2810](https://tools.ietf.org/html/rfc2810)
 - [RFC2813](https://tools.ietf.org/html/rfc2813)
 
-[irccd-3.0.1.tar.xz.asc]: http://releases.malikania.fr/irccd/3.0.1/irccd-3.0.1.tar.xz.asc
-[irccd-3.0.1.tar.xz]: http://releases.malikania.fr/irccd/3.0.1/irccd-3.0.1.tar.xz
-[irccd-3.0.1.zip.asc]: http://releases.malikania.fr/irccd/3.0.1/irccd-3.0.1.zip.asc
-[irccd-3.0.1.zip]: http://releases.malikania.fr/irccd/3.0.1/irccd-3.0.1.zip
+[irccd-3.0.3.tar.xz.asc]: http://releases.malikania.fr/irccd/3.0.3/irccd-3.0.3.tar.xz.asc
+[irccd-3.0.3.tar.xz]: http://releases.malikania.fr/irccd/3.0.3/irccd-3.0.3.tar.xz
+[irccd-3.0.3.zip.asc]: http://releases.malikania.fr/irccd/3.0.3/irccd-3.0.3.zip.asc
+[irccd-3.0.3.zip]: http://releases.malikania.fr/irccd/3.0.3/irccd-3.0.3.zip
 [irccd-api.7.pdf]: irccd-api.pdf
 [irccd-api.7]: irccd-api.html
-[irccd-plugin-ask.7.pdf]: irccd-plugin-ask.pdf
-[irccd-plugin-ask.7]: irccd-plugin-ask.html
-[irccd-plugin-auth.7.pdf]: irccd-plugin-auth.pdf
-[irccd-plugin-auth.7]: irccd-plugin-auth.html
-[irccd-plugin-hangman.7.pdf]: irccd-plugin-hangman.pdf
-[irccd-plugin-hangman.7]: irccd-plugin-hangman.html
-[irccd-plugin-history.7.pdf]: irccd-plugin-history.pdf
-[irccd-plugin-history.7]: irccd-plugin-history.html
-[irccd-plugin-joke.7.pdf]: irccd-plugin-joke.pdf
-[irccd-plugin-joke.7]: irccd-plugin-joke.html
-[irccd-plugin-links.7.pdf]: irccd-plugin-links.pdf
-[irccd-plugin-links.7]: irccd-plugin-links.html
-[irccd-plugin-logger.7.pdf]: irccd-plugin-logger.pdf
-[irccd-plugin-logger.7]: irccd-plugin-logger.html
-[irccd-plugin-plugin.7.pdf]: irccd-plugin-plugin.pdf
-[irccd-plugin-plugin.7]: irccd-plugin-plugin.html
-[irccd-plugin-roulette.7.pdf]: irccd-plugin-roulette.pdf
-[irccd-plugin-roulette.7]: irccd-plugin-roulette.html
-[irccd-plugin-tictactoe.7.pdf]: irccd-plugin-tictactoe.pdf
-[irccd-plugin-tictactoe.7]: irccd-plugin-tictactoe.html
+[irccd-plugin-ask.7.pdf]: ask.pdf
+[irccd-plugin-ask.7]: ask.html
+[irccd-plugin-auth.7.pdf]: auth.pdf
+[irccd-plugin-auth.7]: auth.html
+[irccd-plugin-hangman.7.pdf]: hangman.pdf
+[irccd-plugin-hangman.7]: hangman.html
+[irccd-plugin-history.7.pdf]: history.pdf
+[irccd-plugin-history.7]: history.html
+[irccd-plugin-joke.7.pdf]: joke.pdf
+[irccd-plugin-joke.7]: joke.html
+[irccd-plugin-links.7.pdf]: links.pdf
+[irccd-plugin-links.7]: links.html
+[irccd-plugin-logger.7.pdf]: logger.pdf
+[irccd-plugin-logger.7]: logger.html
+[irccd-plugin-plugin.7.pdf]: plugin.pdf
+[irccd-plugin-plugin.7]: plugin.html
+[irccd-plugin-roulette.7.pdf]: roulette.pdf
+[irccd-plugin-roulette.7]: roulette.html
+[irccd-plugin-tictactoe.7.pdf]: tictactoe.pdf
+[irccd-plugin-tictactoe.7]: tictactoe.html
 [irccd-templates.7.pdf]: irccd-templates.pdf
 [irccd-templates.7]: irccd-templates.html
 [irccd-test.1.pdf]: irccd-test.pdf
@@ -139,5 +141,5 @@
 [irccd.conf.5]: irccd.conf.html
 [irccdctl.1.pdf]: irccdctl.pdf
 [irccdctl.1]: irccdctl.html
-[irccdctl.conf.5.pdf]: irccdctl-conf.pdf
-[irccdctl.conf.5]: irccdctl-conf.html
+[irccdctl.conf.5.pdf]: irccdctl.conf.pdf
+[irccdctl.conf.5]: irccdctl.conf.html

mercurial