Skip to content

Commit

Permalink
Added mostly autogenerated man page. Dependency on executable is broken.
Browse files Browse the repository at this point in the history
  • Loading branch information
mschuerig committed Jan 10, 2009
1 parent e90d75d commit 23a3427
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Makefile.am
Expand Up @@ -2,4 +2,21 @@ SUBDIRS = po src tests


ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4


EXTRA_DIST = config.rpath m4/ChangeLog man_page = $(PACKAGE).1
man_MANS = $(man_page)
CLEANFILES = $(man_page)

EXTRA_DIST = config.rpath m4/ChangeLog $(man_MANS)

# Create the man page from --help and --version output

common_dep = $(top_srcdir)/configure.ac
### TODO remove the explicit name
$(man_page): $(common_dep) $(srcdir)/hangon.x $(srcdir)/src/hangon.c

SUFFIXES = .x .1
.x.1:
$(HELP2MAN) \
--no-info \
--include=$(srcdir)/$*.x \
--output=$@ src/$*
2 changes: 2 additions & 0 deletions configure.ac
Expand Up @@ -34,5 +34,7 @@ AC_CONFIG_FILES([tests/Makefile])
# but not required for simply building it. # but not required for simply building it.
# autom4te: used for merging tests into a suite # autom4te: used for merging tests into a suite
AM_MISSING_PROG([AUTOM4TE], [autom4te]) AM_MISSING_PROG([AUTOM4TE], [autom4te])
# help2man: used for deriving man pages from --help and --version output
AM_MISSING_PROG([HELP2MAN], [help2man])


AC_OUTPUT AC_OUTPUT
4 changes: 4 additions & 0 deletions hangon.x
@@ -0,0 +1,4 @@
[NAME]
hangon \- restart a command until it finishes
[DESCRIPTION]
.\" Add any additional description here
25 changes: 25 additions & 0 deletions tutorial.texi
Expand Up @@ -79,3 +79,28 @@ $ autoreconf
$ make check $ make check


### Add a man page ### Add a man page

# -> configure.ac
# help2man: used for deriving man pages from --help and --version output
AM_MISSING_PROG([HELP2MAN], [help2man])

# -> Makefile.am

man_page = $(PACKAGE).1
man_MANS = $(man_page)
CLEANFILES = $(man_page)

EXTRA_DIST = config.rpath m4/ChangeLog $(man_MANS)

# Create the man page from --help and --version output

common_dep = $(top_srcdir)/configure.ac
### TODO remove the explicit name
$(man_page): $(common_dep) $(srcdir)/hangon.x $(srcdir)/src/hangon.c

SUFFIXES = .x .1
.x.1:
$(HELP2MAN) \
--no-info \
--include=$(srcdir)/$*.x \
--output=$@ src/$*

0 comments on commit 23a3427

Please sign in to comment.