# Makefile for the AF manpages.
MANDIR = $(LIBMANDIR)
MANSUFFIX = $(LIBMANSUFFIX)

# Manual pages are currently listed twice. "Real" pages are listed
# MANPAGES and with an 'InstallManPage()' command.
# Aliases (i.e., multiple entries on the same page) are listed in
# an 'InstallManPageAliases()' command.

MANPAGES = AFMakeTab.man \
	AFOneTone.man \
	AFTwoTone.man \
	AF_comp_u.man \
	AF_exp_u.man \
	AF_gain_u.man \
	AF_mix_u.man \
	AF_power.man \
	AF_samps.man \
	AF_sine.man \
	AoD.man \
	AFdBtoLin.man \
	AFLintodB.man \
        AFSilence.man \
	AFFindEnc.man \
        libAFUtil.man

#if ExpandManNames

# Note: no commas in the aliases list!

InstallManPageLong(AFMakeTab, $(MANDIR),AFMakeGainTableU)
InstallManPageAliases(AFMakeGainTableU, $(MANDIR), AFMakeGainTableA)
InstallManPageLong(AFOneTone, $(MANDIR),AFSingleTone)
InstallManPageLong(AFTwoTone, $(MANDIR),AFTonePair)
InstallManPage(AF_comp_u, $(MANDIR))
InstallManPageAliases(AF_comp_u, $(MANDIR), AF_comp_a)
InstallManPage(AF_exp_u, $(MANDIR))
InstallManPageAliases(AF_exp_u, $(MANDIR), AF_exp_a AF_cvt_u2a \
	AF_cvt_u2s AF_cvt_u2f \
	AF_cvt_a2s AF_cvt_a2f)
InstallManPage(AF_gain_u, $(MANDIR))
InstallManPageAliases(AF_gain_u, $(MANDIR), AF_gain_a \
	AF_gain_table_u AF_gain_table_a AF_gain_min_a AF_gain_max_a \
	AF_gain_min_u AF_gain_max_u)
InstallManPage(AF_mix_u, $(MANDIR))
InstallManPageAliases(AF_mix_u, $(MANDIR), AF_mix_a)
InstallManPageLong(AF_power, $(MANDIR),AF_power_uf)
InstallManPageAliases(AF_power_uf, $(MANDIR), AF_power_af)
InstallManPageLong(AF_samps, $(MANDIR),AF_sample_sizes)
InstallManPageLong(AF_sine, $(MANDIR),AF_sine_int)
InstallManPageAliases(AF_sine_int, $(MANDIR), AF_sine_float)
InstallManPage(AoD, $(MANDIR))
InstallManPage(AFdBtoLin, $(MANDIR))
InstallManPage(AFLintodB, $(MANDIR))
InstallManPage(AFSilence, $(MANDIR))
InstallManPageLong(AFFindEnc, $(MANDIR),AFFindEncodeType)
InstallManPageAliases(AFFindEncodeType, $(MANDIR), AFPrintKnownEncodeTypes)
InstallManPage(libAFUtil, $(MANDIR))

#else

InstallManPage(AFMakeTab, $(MANDIR))
InstallManPageAliases(AFMakeGainTableU, $(MANDIR), AFMakeGainTableA)
InstallManPage(AFOneTone, $(MANDIR))
InstallManPage(AFTwoTone, $(MANDIR),AFTonePair)
InstallManPage(AF_comp_u, $(MANDIR))
InstallManPageAliases(AF_comp_u, $(MANDIR), AF_comp_a)
InstallManPage(AF_exp_u, $(MANDIR))
InstallManPageAliases(AF_exp_u, $(MANDIR), AF_exp_a AF_cvt_u2a \
	AF_cvt_u2s AF_cvt_u2f \
	AF_cvt_a2s AF_cvt_a2f)
InstallManPage(AF_gain_u, $(MANDIR))
InstallManPageAliases(AF_gain_u, $(MANDIR), AF_gain_a \
	AF_gain_table_u AF_gain_table_a AF_gain_min_a AF_gain_max_a \
	AF_gain_min_u AF_gain_max_u)
InstallManPage(AF_mix_u, $(MANDIR))
InstallManPageAliases(AF_mix_u, $(MANDIR), AF_mix_a)
InstallManPage(AF_power, $(MANDIR))
InstallManPageAliases(AF_power_uf, $(MANDIR), AF_power_af)
InstallManPage(AF_samps, $(MANDIR))
InstallManPage(AF_sine, $(MANDIR))
InstallManPageAliases(AF_sine_int, $(MANDIR), AF_sine_float)
InstallManPage(AoD, $(MANDIR))
InstallManPage(AFdBtoLin, $(MANDIR))
InstallManPage(AFLintodB, $(MANDIR))
InstallManPage(AFSilence, $(MANDIR))
InstallManPage(AFFindEnc, $(MANDIR))
InstallManPageAliases(AFFindEncodeType, $(MANDIR), AFPrintKnownEncodeTypes)
InstallManPage(libAFUtil, $(MANDIR))

#endif

#
TROFF= groff
PRINTER= lpr
INSTALLFLAGS = $(INSTMANFLAGS)

all: # nothing to do

PS:
	@case '${MFLAGS}' in *[ik]*) set +e;; esac; \
	for i in $(MANPAGES) ; \
	do \
	echo formatting $$i ; \
	tbl $$i  | $(TROFF) -man -t - > `basename $$i .3AF`.ps ; \
	done

onePS:
	tbl $(MANPAGES)  | $(TROFF) -man - > $(FILE).ps


techreport:
	tbl $(MANPAGES)  | $(TROFF) -man crltr intro.r - > AF-manual.ps

clean::
	rm -f *.PS *.ps

# InstallMultipleMan($(MANPAGES),$(LIBMANDIR))

depend:

