diff --git a/mlocal/frags/Makefile.stub b/mlocal/frags/Makefile.stub index 2764c23f32..dfceaa7014 100644 --- a/mlocal/frags/Makefile.stub +++ b/mlocal/frags/Makefile.stub @@ -5,13 +5,6 @@ all: $(ALL) -.PHONY: man -man: singularity - @printf " MAN\n" - mkdir -p $(DESTDIR)$(MANDIR)/man1 - $(V)$(GO) run $(GO_MODFLAGS) -tags "$(GO_TAGS)" $(GO_GCFLAGS) $(GO_ASMFLAGS) \ - $(SOURCEDIR)/cmd/docs/docs.go man --dir $(DESTDIR)$(MANDIR)/man1 - .PHONY: collect collect: @printf " DEPENDS\n" @@ -129,7 +122,7 @@ clean: $(V)rm -rf $(BUILDDIR)/mergeddeps cscope.* $(CLEANFILES) .PHONY: install -install: $(INSTALLFILES) man +install: $(INSTALLFILES) @echo " DONE" -include $(BUILDDIR)/mergeddeps diff --git a/mlocal/frags/build_cli.mk b/mlocal/frags/build_cli.mk index 634e9a8b26..3793a30af5 100644 --- a/mlocal/frags/build_cli.mk +++ b/mlocal/frags/build_cli.mk @@ -85,3 +85,19 @@ $(remote_config_INSTALL): $(remote_config) $(V)install -m 0644 $< $@ INSTALLFILES += $(remote_config_INSTALL) + +man_pages := $(BUILDDIR)$(MANDIR)/man1 +$(man_pages): singularity + @echo " MAN" $@ + mkdir -p $@ + $(V)$(GO) run $(GO_MODFLAGS) -tags "$(GO_TAGS)" $(GO_GCFLAGS) $(GO_ASMFLAGS) \ + $(SOURCEDIR)/cmd/docs/docs.go man --dir $@ + +man_pages_INSTALL := $(DESTDIR)$(MANDIR)/man1 +$(man_pages_INSTALL): $(man_pages) + @echo " INSTALL" $@ + $(V)umask 0022 && mkdir -p $@ + $(V)install -m 0644 -t $@ $(man_pages)/* + +INSTALLFILES += $(man_pages_INSTALL) +ALL += $(man_pages)