]> git.notmuchmail.org Git - notmuch/blob - doc/mkdocdeps.py
doc: build man pages at build time; introduce HAVE_SPHINX, HAVE_RST2MAN
[notmuch] / doc / mkdocdeps.py
1 from sys import argv
2 conffile = argv[1]
3 builddir = argv[2]
4 outfile = argv[3]
5
6 execfile(conffile)
7
8 roff_files = []
9 rst_files = []
10 out=open(outfile,'w')
11 for page in man_pages:
12     rst_files = rst_files + ["doc/{0:s}.rst".format(page[0])]
13     roff_files = roff_files + ["{0:s}/man/{1:s}.{2:d}".format(builddir,page[1],page[4])]
14
15 out.write ('MAN_ROFF_FILES := ' + ' \\\n\t'.join(roff_files)+'\n')
16 out.write ('MAN_RST_FILES := ' + ' \\\n\t'.join(rst_files)+'\n')