On Mon, 10 Mar 2014, David Bremner <david@tethera.net> wrote: > 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 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. BR, Jani. > mkdir -p "$(DESTDIR)$(mandir)/man1" > mkdir -p "$(DESTDIR)$(mandir)/man5" > mkdir -p "$(DESTDIR)$(mandir)/man7" > -- > 1.8.5.3 > > _______________________________________________ > notmuch mailing list > notmuch@notmuchmail.org > http://notmuchmail.org/mailman/listinfo/notmuch