| 1 | #!/bin/sh |
| 2 | # Script to coordinate parsing of S. Chamberlain source-embedded |
| 3 | # header-file markup language. |
| 4 | |
| 5 | # '-i' option means use *proto-internal* segments, else just *proto* |
| 6 | SFX=p |
| 7 | if [ $1 = "-i" ]; then |
| 8 | SFX=ip |
| 9 | shift |
| 10 | fi |
| 11 | |
| 12 | base=`echo $1 | cut -d '.' -f 1` |
| 13 | |
| 14 | # passes: |
| 15 | # 1) awk discards lines not intended for header, and marks blocks of |
| 16 | # text with comments identifying source file; |
| 17 | # 2) first sed pass interprets Chamberlain markup; |
| 18 | # 3) further sed passes clean up---merging adjacent comments etc. |
| 19 | |
| 20 | awk -f awkscan-$SFX $1 |\ |
| 21 | sed -f sedscript-p |\ |
| 22 | sed -f mergecom-p |\ |
| 23 | sed -f startcom-p |\ |
| 24 | sed -f blins-p |\ |
| 25 | sed -f movecom-p >$base.$SFX |