Skip to content

Commit

Permalink
docs: make manual page versioning automatic
Browse files Browse the repository at this point in the history
In same go mark the manual page in System Administration selection.
  • Loading branch information
kerolasa committed Aug 27, 2016
1 parent 980858f commit d86c01e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@ stamp-h1*
/ChangeLog
/INSTALL
/mtr
/mtr.8

/mtr-*.tar.gz
17 changes: 17 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,24 @@
EXTRA_DIST = SECURITY img/mtr_icon.xpm

sbin_PROGRAMS = mtr

PATHFILES =
CLEANFILES = $(PATHFILES)
EXTRA_DIST += $(PATHFILES:=.in)
edit_cmd = sed \
-e 's|@VERSION[@]|$(VERSION)|g'

$(PATHFILES): Makefile
@ rm -f $@ $@.tmp
$(AM_V_at) $(MKDIR_P) $$(dirname $@)
$(AM_V_GEN) srcdir=''; \
test -f ./$@.in || srcdir=$(srcdir)/; \
$(edit_cmd) $${srcdir}$@.in >$@.tmp
@ mv $@.tmp $@

dist_man_MANS = mtr.8
PATHFILES += mtr.8

install-exec-hook:
`setcap cap_net_raw+ep $(DESTDIR)$(sbindir)/mtr` \
|| chmod u+s $(DESTDIR)$(sbindir)/mtr
Expand Down
2 changes: 1 addition & 1 deletion mtr.8 → mtr.8.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH MTR 8 "July 12, 2014" "mtr" "mtr"
.TH MTR 8 "@VERSION@" "mtr" "System Administration"
.SH NAME
mtr \- a network diagnostic tool
.SH SYNOPSIS
Expand Down

0 comments on commit d86c01e

Please sign in to comment.