diff --git a/.gitignore b/.gitignore index 654402fb76cacf24d2cfb43cf3ccf1f464e350e8..54df9de28d91f9cc25fa20afaf03acd516afdcf6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /src/*.o /src/*.inc /src/feh +/man/*.1 diff --git a/Makefile b/Makefile index 13d2bc0d095dce049a7bf7a3cfd92553cf6b38a7..05a3d8333694fe8520ab396cf3270d38e80e9ae4 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 0000000000000000000000000000000000000000..35a21b766088424b6a17b2e5282917ea8e88f022 --- /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 a8b01f3f30b2247210ebf62c9b6dfc3562edb30f..ad21341e8c3a123c24b3b9898dcd846d4242555e 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 88fd49def8cf48bb3e040e5836cc23b6098c3661..3ddc291b6c77125c14ef847d708ace3929d4c65d 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 c8929eba724cf520d653b5f0637db7fdc02b79db..67460e88a21ce95fa4bcf0fa7156863ca9a7f37e 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