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 3F585431FBD for ; Mon, 10 Mar 2014 04:07:34 -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 J5ZJ8gB0MR1i for ; Mon, 10 Mar 2014 04:07:30 -0700 (PDT) Received: from yantan.tethera.net (yantan.tethera.net [199.188.72.155]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 5DCD6431FBC for ; Mon, 10 Mar 2014 04:07:30 -0700 (PDT) Received: from remotemail by yantan.tethera.net with local (Exim 4.80) (envelope-from ) id 1WMy3K-0001AH-Fj; Mon, 10 Mar 2014 08:07:26 -0300 Received: (nullmailer pid 14774 invoked by uid 1000); Mon, 10 Mar 2014 11:07:22 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH] doc: build man pages at build time, not install Date: Mon, 10 Mar 2014 08:07:13 -0300 Message-Id: <1394449633-14737-1-git-send-email-david@tethera.net> X-Mailer: git-send-email 1.8.5.3 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 11:07:34 -0000 This helps avoid build artifacts (namely, nroff and gzipped-nroff man pages) owned by root. --- Makefile.local | 2 +- doc/Makefile.local | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile.local b/Makefile.local index 5f797ad..cb7b106 100644 --- a/Makefile.local +++ b/Makefile.local @@ -53,7 +53,7 @@ endif FINAL_LIBNOTMUCH_LDFLAGS = $(LDFLAGS) $(AS_NEEDED_LDFLAGS) $(CONFIGURE_LDFLAGS) .PHONY: all -all: notmuch notmuch-shared +all: notmuch notmuch-shared build-man ifeq ($(MAKECMDGOALS),) ifeq ($(shell cat .first-build-message 2>/dev/null),) @NOTMUCH_FIRST_BUILD=1 $(MAKE) --no-print-directory all diff --git a/doc/Makefile.local b/doc/Makefile.local index fd64f70..5be49dc 100644 --- a/doc/Makefile.local +++ b/doc/Makefile.local @@ -16,7 +16,7 @@ ALLSPHINXOPTS := -d $(DOCBUILDDIR)/doctrees $(SPHINXOPTS) $(dir) .PHONY: sphinx-html sphinx-man sphinx-texinfo sphinx-info .PHONY: rst2man -.PHONY: install-man +.PHONY: install-man build-man %.gz: % rm -f $@ && gzip --stdout $^ > $@ @@ -43,7 +43,9 @@ MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES}) ${MAN_ROFF_FILES} : sphinx-man -install-man: ${MAN_GZIP_FILES} +build-man: ${MAN_GZIP_FILES} + +install-man: build-man mkdir -p "$(DESTDIR)$(mandir)/man1" mkdir -p "$(DESTDIR)$(mandir)/man5" mkdir -p "$(DESTDIR)$(mandir)/man7" -- 1.8.5.3