From 99ca8abacf61a7195e227704984ff96a0a868bc3 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 21 Aug 2010 17:54:04 +0200 Subject: [PATCH] Add version information to manpages --- .gitignore | 1 + Makefile | 10 ++++++++-- man/Makefile | 16 ++++++++++++++++ man/{feh-cam.1 => feh-cam.pre} | 3 +++ man/{feh.1 => feh.pre} | 4 ++++ man/{gen-cam-menu.1 => gen-cam-menu.pre} | 3 +++ 6 files changed, 35 insertions(+), 2 deletions(-) create mode 100644 man/Makefile rename man/{feh-cam.1 => feh-cam.pre} (91%) rename man/{feh.1 => feh.pre} (99%) rename man/{gen-cam-menu.1 => gen-cam-menu.pre} (80%) diff --git a/.gitignore b/.gitignore index 654402f..54df9de 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /src/*.o /src/*.inc /src/feh +/man/*.1 diff --git a/Makefile b/Makefile index 13d2bc0..05a3d83 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,13 @@ include config.mk -all: +all: build-src build-man + +build-src: @${MAKE} -C src +build-man: + @${MAKE} -C man + test: all @PACKAGE=${PACKAGE} VERSION=${VERSION} prove test @@ -14,7 +19,7 @@ install: install-man install-doc install-bin install-font install-img install-man: @echo installing manuals to ${man_dir} @mkdir -p ${man_dir}/man1 - @cp man/* ${man_dir}/man1 + @cp man/*.1 ${man_dir}/man1 @chmod 644 ${man_dir}/man1/feh.1 ${man_dir}/man1/feh-cam.1 \ ${man_dir}/man1/gen-cam-menu.1 @@ -54,6 +59,7 @@ uninstall: clean: @${MAKE} -C src clean + @${MAKE} -C man clean .PHONY: all test test-x11 install uninstall clean install-man install-doc \ install-bin install-font install-img diff --git a/man/Makefile b/man/Makefile new file mode 100644 index 0000000..35a21b7 --- /dev/null +++ b/man/Makefile @@ -0,0 +1,16 @@ +include ../config.mk + +SOURCES = ${shell echo *.pre} +TARGETS = ${SOURCES:.pre=.1} + +all: ${TARGETS} + +.pre.1: + sed 's/\$$VERSION\$$/${VERSION}/g' < ${@:.1=.pre} > $@ + +clean: + rm *.1 + +.SUFFIXES: .pre .1 + +.PHONY: clean diff --git a/man/feh-cam.1 b/man/feh-cam.pre similarity index 91% rename from man/feh-cam.1 rename to man/feh-cam.pre index a8b01f3..ad21341 100644 --- a/man/feh-cam.1 +++ b/man/feh-cam.pre @@ -10,6 +10,9 @@ .Op Ar options .Ar keys . +.Sh VERSION +This manual documents feh-cam, shipped with feh version $VERSION$ +. .Sh DESCRIPTION .Nm is a perl wrapper for feh which simplifies viewing webcams using keyed diff --git a/man/feh.1 b/man/feh.pre similarity index 99% rename from man/feh.1 rename to man/feh.pre index 88fd49d..3ddc291 100644 --- a/man/feh.1 +++ b/man/feh.pre @@ -14,6 +14,10 @@ .Ar files or directories ... . . +.Sh VERSION +This manual documents feh $VERSION$ +. +. .Sh DESCRIPTION .Nm is a mode-based image viewer. It is especially aimed at commandline users who diff --git a/man/gen-cam-menu.1 b/man/gen-cam-menu.pre similarity index 80% rename from man/gen-cam-menu.1 rename to man/gen-cam-menu.pre index c8929eb..67460e8 100644 --- a/man/gen-cam-menu.1 +++ b/man/gen-cam-menu.pre @@ -8,6 +8,9 @@ .Sh SYNOPSIS .Nm . +.Sh VERSION +This manual documents gen-cam-menu, shipped with feh version $VERSION$ +. .Sh DESCRIPTION .Nm is a shell script which creates Enlightenment user menu entries for the -- GitLab