aboutsummaryrefslogtreecommitdiff
path: root/bfd/doc/scanit
blob: a989c786dc5f676df4c568cc43d240b27098c2d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
# Script to coordinate parsing of S. Chamberlain source-embedded 
# documentation markup language.

# Four passes:
#	1) awk discards lines not intended for docn, and marks blocks of
#	   text with comments identifying source file;
#	2) first sed pass interprets Chamberlain markup;
#	3) second sed pass does cleanup that involves merging lines
#	4) third sed pass does remaining cleans up---making {}
#	   printable within examples, and eliminating empty index entries and
#          headings.
#Third and second sed passes are separate because order of execution is hard
#to control otherwise, making one or another of the things involving @example
#inoperative.

base=`echo $1 | cut -d '.' -f 1`
out=`echo $2 | cut -d '.' -f 1`

awk -f $3/awkscan $1 | \
sed -f $3/sedscript | \
sed -f $3/unPROTO | \
sed -f $3/exmerge  | \
sed -f $3/exfilter  >$out.texi