diff options
author | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
---|---|---|
committer | Norbert Preining <norbert@preining.info> | 2019-09-02 13:46:59 +0900 |
commit | e0c6872cf40896c7be36b11dcc744620f10adf1d (patch) | |
tree | 60335e10d2f4354b0674ec22d7b53f0f8abee672 /dviware/beebe/utils/xref |
Initial commit
Diffstat (limited to 'dviware/beebe/utils/xref')
-rw-r--r-- | dviware/beebe/utils/xref | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/dviware/beebe/utils/xref b/dviware/beebe/utils/xref new file mode 100644 index 0000000000..f45093cd3b --- /dev/null +++ b/dviware/beebe/utils/xref @@ -0,0 +1,25 @@ +#!/bin/csh +# Make a libref "references" and "referenced-by" pair of cross +# reference tables on stdout from a list of C sources files. +# +# Usage: +# xref filelist >foo.xref +# +# [09-Sep-87] + +set TEMPFILE = xref$$ + +# Make "name<tab>file" list in $TEMPFILE +cxref $* | awk -f xref1.awk | sort -u > $TEMPFILE + +# Make "references" libref-style map +echo Created `date` on `hostname` +echo xref $* +sort $TEMPFILE | awk -f xref2.awk + +# Make "referenced-by" libref-style map +echo "Created" `date` on `hostname` +echo xref $* +awk '{if ($2 != "") printf "%s\t%s\n",$2,$1;}' $TEMPFILE | sort | awk -f xref3.awk + +/bin/rm -f $TEMPFILE |