Skip to content

Commit

Permalink
Generate tmux.1 using mdoc2man.awk on Solaris, issue brought up and c…
Browse files Browse the repository at this point in the history
…hanges

tested by Dagobert Michelsen.
  • Loading branch information
nicm committed Apr 16, 2013
1 parent 9e537c8 commit c24b58e
Show file tree
Hide file tree
Showing 5 changed files with 388 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -15,3 +15,4 @@ tmux
Makefile
Makefile.in
configure
tmux.1
14 changes: 12 additions & 2 deletions Makefile.am
Expand Up @@ -2,12 +2,14 @@

# Obvious program stuff.
bin_PROGRAMS = tmux
dist_man1_MANS = tmux.1
nodist_man1_MANS = tmux.1
CLEANFILES = tmux.1

# Distribution tarball options.
EXTRA_DIST = \
CHANGES FAQ README TODO examples compat \
array.h compat.h tmux.h osdep-*.c
array.h compat.h tmux.h osdep-*.c mdoc2man.awk \
tmux.1.in
dist-hook:
grep "^#found_debug=" configure
find $(distdir) -name .svn -type d|xargs rm -Rf
Expand Down Expand Up @@ -232,6 +234,14 @@ if NO_B64_NTOP
nodist_tmux_SOURCES += compat/b64_ntop.c
endif

# Build tmux.1 in the right format.
tmux.1: tmux.1.in
if test x@MANFORMAT@ = xmdoc; then \
cp tmux.1.in tmux.1; \
else \
$(AWK) -fmdoc2man.awk tmux.1.in >tmux.1; \
fi

# Update SF web site.
upload-index.html: update-index.html
scp www/index.html www/main.css www/images/*.png \
Expand Down
5 changes: 5 additions & 0 deletions configure.ac
Expand Up @@ -416,6 +416,10 @@ else
AC_MSG_RESULT(no)
fi

# Man page defaults to mdoc.
MANFORMAT=mdoc
AC_SUBST(MANFORMAT)

# Figure out the platform for osdep-*.c and forkpty-*.c.
AC_MSG_CHECKING(platform)
case "$host_os" in
Expand Down Expand Up @@ -455,6 +459,7 @@ case "$host_os" in
*solaris*)
AC_MSG_RESULT(sunos)
PLATFORM=sunos
MANFORMAT=man
;;
*hpux*)
AC_MSG_RESULT(hpux)
Expand Down

0 comments on commit c24b58e

Please sign in to comment.