Create a dynamic man page.

This commit is contained in:
luethje 1997-06-26 21:00:28 +00:00
parent 4a92297ceb
commit ac70068c8a
2 changed files with 50 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $Id: Makefile.in,v 1.3 1997/06/24 23:35:20 luethje Exp $
# $Id: Makefile.in,v 1.4 1997/06/26 21:00:28 luethje Exp $
#
# Makefile for iprofd
# (C) 1997 Fritz Elfert
@ -47,6 +47,7 @@ $(PROGRAM): $(MODULES)
$(CC) $(CFLAGS) $(MODULES) $(LDFLAGS) -o $@
install-man: isdnctrl.man
isdnctrl.man.in
$(INSTALL) -d $(MAN8DIR)
$(INSTALL_MAN) $< $(MAN8DIR)/$(MANPAGE)
@ -62,7 +63,7 @@ uninstall:
rm -f $(SBINDIR)/$(PROGRAM) $(MAN8DIR)/$(MANPAGE)
clean:
rm -f *.o *~ $(PROGRAM)
rm -f *.o *~ $(PROGRAM) isdnctrl.man
distclean: clean
rm -f config.status config.cache config.log Makefile

49
isdnctrl/isdnctrl.man → isdnctrl/isdnctrl.man.in Normal file → Executable file
View File

@ -1,3 +1,42 @@
#!/bin/sh
# $Id: isdnctrl.man.in,v 1.1 1997/06/26 21:00:29 luethje Exp $
#
# Makefile for iprofd
# (C) 1997 Fritz Elfert
#
#
# $Log: isdnctrl.man.in,v $
# Revision 1.1 1997/06/26 21:00:29 luethje
# Create a dynamic man page.
#
AWKFILE=/tmp/`basename $0`.$$
MANOUTFILE=isdnctrl.man
source ../.config
echo -n "Create isdnctrl manpage ..."
cat >$AWKFILE << EOF
BEGIN {printall=1}
{
if (\$1 == "#ifdef") {
if ("\$2" != "CONFIG_CTRL_CONF" && "$CONFIG_CTRL_CONF" != "")
printall=1
else
printall=0
}
else
if (\$1 == "#endif") {
printall=1
}
else
if (printall == 1) {
print
}
}
EOF
awk -f $AWKFILE >$MANOUTFILE << EOF
.TH ISDNCTRL 8 "25. June 1997"
.UC 4
.SH NAME
@ -242,14 +281,15 @@ Force dialing of interface "name".
.TP 5
.B mapping driverId MSN0[,MSN1[,MSN2]] ... [,MSN9]
Installs a mapping-table for MSN<->EAZ-mapping. See README for details.
#ifdef CONFIG_CTRL_CONF
.TP 5
.B writeconf [file]
Writes the configuration into a file. If "file" is omitted, the default file
/etc/isdn/isdn.conf will be used.
${CONFIG_I4LCONFDIR}/${CONFIG_CONFFILE} will be used.
.TP 5
.B readconf [file]
Reads the configuration from a file. If "file" is omitted, the default file
/etc/isdn/isdn.conf will be used.
${CONFIG_I4LCONFDIR}/${CONFIG_CONFFILE} will be used.
.SS Syntax of the configuration file
This syntax will be used for the options
@ -451,6 +491,7 @@ PPPBIND = 0
ENCAP = syncppp
PPPBIND = 0
}
#endif
@ -493,3 +534,7 @@ Volker Goetz <volker@oops.franken.de>
.I isdninfo\c
\&(4).
EOF
echo " ready."
rm -f $AWKFILE