AUTOMAKE_OPTIONS = gnits
info_TEXINFOS = tar.texi
EXTRA_DIST = convtexi.pl getdate.texi header.texi
CLEANFILES = tmp-*
RENDITION = DISTRIB
tar.info: tar.texi getdate.texi header.texi version.texi
@echo "WARNING: \`makeinfo' will not preprocess Texinfo input properly"
@echo " for expanding Texinfo macros, if it comes from a"
@echo " Texinfo distribution which is earlier than version 3.7."
cd $(srcdir) && $(MAKEINFO) -D$(RENDITION) tar.texi
tar.dvi: tar.texi getdate.texi header.texi version.texi
@echo "WARNING: \`makeinfo' will not preprocess Texinfo input properly"
@echo " for expanding Texinfo macros, if it comes from a"
@echo " Texinfo distribution which is earlier than version 3.7."
$(MAKEINFO) -D$(RENDITION) -Etmp-tar.tmp -otmp-tar.info \
-I$(srcdir) tar.texi
rm -f tmp-tar.sed tmp-tar.info*
test $(RENDITION) = DISTRIB \
|| echo >>tmp-tar.sed 's/^@set DISTRIB/@set $(RENDITION)/'
test $(RENDITION) = PUBLISH \
|| echo >>tmp-tar.sed '/^@smallbook/d'
sed -f tmp-tar.sed tmp-tar.tmp > tmp-tar.texi
rm -f tmp-tar.sed tmp-tar.tmp
TEXINPUTS=$(srcdir):$$TEXINPUTS $(TEXI2DVI) tmp-tar.texi
mv tmp-tar.dvi $@
header.texi: $(top_srcdir)/src/tar.h
sed -n '/Archive Format/,/End of Format/p' $(top_srcdir)/src/tar.h \
| expand | sed 's/\([{}]\)/@\1/g' > $(srcdir)/header.texi