Generate text documentation from the troff source files.
This is done by make, in the 'docs' target, which is now part of the normal build process. Unfortunately, not all the games include troff sources. Getting decent HTML output from groff is still a difficult process which will not be attempted at this time. There are a few bugs in the 'install' and 'uninstall' rules. Not to mention that the documentation is sometimes inaccurate.
This commit is contained in:
parent
eab5aa2ec4
commit
c6f7d67623
16 changed files with 133 additions and 2801 deletions
|
|
@ -45,6 +45,7 @@ CFILES= vers.c extern.c armor.c chase.c command.c daemon.c daemons.c \
|
|||
rooms.c save.c scrolls.c state.c sticks.c things.c weapons.c wizard.c \
|
||||
mach_dep.c xcrypt.c mdport.c
|
||||
MISC= Makefile LICENSE.TXT rogue.6 rogue.me
|
||||
DOCS= $(PROGRAM).cat $(PROGRAM).doc
|
||||
|
||||
CFLAGS=
|
||||
CPPFLAGS=@DEFS@
|
||||
|
|
@ -56,6 +57,10 @@ MKDIR=mkdir
|
|||
CHGRP=chgrp
|
||||
CHMOD=chmod
|
||||
INSTALL=@INSTALL@
|
||||
GROFF=@GROFF@
|
||||
NROFF=@NROFF@
|
||||
COLCRT=@COLCRT@
|
||||
TBL=@TBL@
|
||||
|
||||
SF=
|
||||
NAMELIST=
|
||||
|
|
@ -70,7 +75,9 @@ MACHDEP=
|
|||
# @cc -c $(CFLAGS) x.c
|
||||
# @mv x.o $*.o
|
||||
|
||||
@PROGRAM@: $(HDRS) $(OBJS) # xs.o
|
||||
all: $(PROGRAM) docs
|
||||
|
||||
$(PROGRAM): $(HDRS) $(OBJS) # xs.o
|
||||
# @rm -f x.c
|
||||
# $(CC) $(LDFLAGS) xs.o $(OBJS) $(CRLIB)
|
||||
$(CC) $(LDFLAGS) $(OBJS) $(LIBS) -o $@
|
||||
|
|
@ -100,8 +107,24 @@ prob: prob.o extern.o xs.o
|
|||
prob.o: prob.c rogue.h
|
||||
$(CC) -O -c prob.c
|
||||
|
||||
docs: $(DOCS)
|
||||
|
||||
$(PROGRAM).cat: rogue.6
|
||||
if test "x$(GROFF)" != "x" ; then \
|
||||
$(GROFF) -P-c -P-b -P-u -Tascii -man rogue.6 > $(PROGRAM).cat ;\
|
||||
elif test "x$(NROFF)" != "x" -a "x$(COLCRT)" != "x" ; then \
|
||||
$(NROFF) -man rogue.6 | colcrt - > $(PROGRAM).cat ;\
|
||||
fi
|
||||
|
||||
$(PROGRAM).doc: rogue.me
|
||||
if test "x$(GROFF)" != "x" ; then \
|
||||
$(GROFF) -P-c -P-b -P-u -t -me -Tutf8 rogue.me > $(PROGRAM).doc ;\
|
||||
elif test "x$(NROFF)" != "x" -a "x$(COLCRT)" != "x" -a "x$(TBL)" != "x" ; then \
|
||||
$(TBL) rogue.me | $(NROFF) -me | $(COLCRT) - > $(PROGRAM).doc ;\
|
||||
fi
|
||||
|
||||
clean:
|
||||
rm -f $(POBJS) $(OBJS) core a.out p.out @PROGRAM@ strings make.out rogue.tar vgrind.* x.c x.o xs.c xs.o linterrs findpw distmod.o xs.po xstr rogue rogue.exe rogue.tar.gz rogue.cat rogue.doc xstr.exe
|
||||
rm -f $(POBJS) $(OBJS) core a.out p.out $(PROGRAM) strings make.out rogue.tar vgrind.* x.c x.o xs.c xs.o linterrs findpw distmod.o xs.po xstr rogue rogue.exe rogue.tar.gz $(DOCS) xstr.exe
|
||||
|
||||
maintainer-clean:
|
||||
make clean
|
||||
|
|
@ -137,6 +160,8 @@ install: $(PROGRAM)
|
|||
then $(MKDIR) -p $(DESTDIR)$(docdir) ; fi
|
||||
-$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT
|
||||
-$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me
|
||||
-$(INSTALL) -m 0644 $(PROGRAM).doc $(DESTDIR)$(docdir)/$(PROGRAM).doc
|
||||
-$(INSTALL) -m 0644 $(PROGRAM).cat $(DESTDIR)$(docdir)/$(PROGRAM).cat
|
||||
-if test "x$(LOCKFILE)" != "x" && test ! -f $(DESTDIR)$(LOCKFILE) ; then \
|
||||
$(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE) ; \
|
||||
$(RM) $(DESTDIR)$(LOCKFILE) ; \
|
||||
|
|
@ -146,7 +171,9 @@ install: $(PROGRAM)
|
|||
uninstall:
|
||||
-$(RM) $(DESTDIR)$(bindir)/$(PROGRAM)
|
||||
-$(RM) $(DESTDIR)$(man6dir)/$(PROGRAM).6
|
||||
-$(RM) $(DESTDIR)$(docdir)$(PROGRAM)/$(PROGRAM).doc
|
||||
-$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).doc
|
||||
-$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).cat
|
||||
-$(RM) $(DESTDIR)$(docdir)/$(PROGRAM).me
|
||||
-$(RM) $(DESTDIR)$(LOCKFILE)
|
||||
-$(RMDIR) $(DESTDIR)$(docdir)$(PROGRAM)
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@ AC_PREREQ(2.56)
|
|||
AC_INIT([Rogue],[5.2.2], [yendor@rogueforge.net])
|
||||
AC_CONFIG_SRCDIR([armor.c])
|
||||
AC_CONFIG_HEADERS([config.h])
|
||||
# May not be needed for the documentation
|
||||
AC_CONFIG_FILES([Makefile rogue.6 rogue.me])
|
||||
|
||||
# Checks for programs.
|
||||
|
|
@ -36,7 +35,6 @@ AC_CHECK_PROG([NROFF], [nroff], [nroff],)
|
|||
AC_CHECK_PROG([GROFF], [groff], [groff],)
|
||||
AC_CHECK_PROG([COLCRT], [colcrt], [colcrt],)
|
||||
AC_CHECK_PROG([TBL], [tbl], [tbl],)
|
||||
AC_CHECK_PROG([SED], [sed], [sed],)
|
||||
|
||||
AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue4"] )
|
||||
PROGRAM=$progname
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
.SH NAME
|
||||
rogue \- Exploring The Dungeons of Doom
|
||||
.SH SYNOPSIS
|
||||
.B rogue
|
||||
.B @PROGRAM@
|
||||
[
|
||||
.I save_file
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue