Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 151C3431FBF for ; Mon, 10 Mar 2014 15:41:05 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=0 tagged_above=-999 required=5 tests=[none] autolearn=disabled Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nLxKSpB9EqdO for ; Mon, 10 Mar 2014 15:41:01 -0700 (PDT) Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34]) by olra.theworths.org (Postfix) with ESMTP id 6EE9E431FBD for ; Mon, 10 Mar 2014 15:41:01 -0700 (PDT) Received: from guru.guru-group.fi (localhost [IPv6:::1]) by guru.guru-group.fi (Postfix) with ESMTP id F139810008C; Tue, 11 Mar 2014 00:40:56 +0200 (EET) From: Tomi Ollila To: Jani Nikula , David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] doc: build man pages at build time, not install In-Reply-To: <87y50ij7y4.fsf@nikula.org> References: <1394449633-14737-1-git-send-email-david@tethera.net> <87y50ij7y4.fsf@nikula.org> User-Agent: Notmuch/0.17+112~g4e0c1d5 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-unknown-linux-gnu) X-Face: HhBM'cA~ MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 Mar 2014 22:41:05 -0000 On Mon, Mar 10 2014, Jani Nikula wrote: > > Because build-man is a .PHONY target, it'll get done also on > install-man, and one still ends up with root owned files on 'sudo make > install'. The improvement to previous is that doc/_build/man directory > is now created in the build phase and the files can be removed by the > regular user. > > An actual non-phony dependency chain from .gz to man page to rst would > be awesome, but I don't know how hard it would be with the > sphinx/rst2man targets. instead of having the targets as .PHONY those should depend on all source files... ... perhaps better alternative is to have those still as .PHONY so those can be neat make targets, but greate new *.stamp targets that depend on the source files (and these *.stamp targets have the recipes) (actually, after I added the stuff below, sphinx-man doesn't need to be PHONY anymore). something like: sphinx-man: $(DOCBUILDDIR)/man.stamp $(DOCBUILDDIR)/man.stamp: $(MAN_SRC_FILES) ifeq($(HAVE_SPHINX), 1) $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(DOCBUILDDIR)/man touch $@ else ifeq($(HAVE_RST2HTML), 1) $(prerst2man) $(DOCBUILDDIR)/.. $(DOCBUILDDIR)/man touch $@ endif endif mkdocdeps.py could create $(MAN_SRC_FILES) and friends pretty easily. (sphinx-man could be changed to just 'man', and if anyone wanted to make manual pages from command line using rst2man that could work as `make man HAVE_SPHINX=0 HAVE_RST2HTML=1') > BR, > Jani. Tomi