#!/bin/awk -f
#
# SYNOPSIS
#
# make_dummy_refs DOC-FILE...
#
# DESCRIPTION
#
# Generate a file containing dummy link definitions for each API
# entry found.  e.g. for "# API: foo" we generate:
#
#   [foo]: DUMMY_REF
#
# Then a reference in a source document will expand to something containing
# "DUMMY_REF" in the output.  That makes it possible to post-process generated
# TexInfo and LaTeX documents to fix up cross-references.  It's unfortunately
# necessary as Pandoc currently doesn't have very good cross-reference
# support.
#

/^\#+ API: / {
    print "["$3"]: DUMMY_REF"
}

# vim: set et:
