Create a dynamic man page.

This commit is contained in:
Stefan Luethje 1997-06-26 21:00:29 +00:00
parent c84e1b0d22
commit 2974dbb4f1
2 changed files with 46 additions and 3 deletions

View File

@ -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

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

@ -1,3 +1,39 @@
#!/bin/sh
# $Id$
#
# Makefile for iprofd
# (C) 1997 Fritz Elfert
#
#
# $Log$
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 +278,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 +488,7 @@ PPPBIND = 0
ENCAP = syncppp
PPPBIND = 0
}
#endif
@ -493,3 +531,7 @@ Volker Goetz <volker@oops.franken.de>
.I isdninfo\c
\&(4).
EOF
echo " ready."
rm -f $AWKFILE