Skip to content

Commit 50bdaa1

Browse files
authored
Merge pull request #8978 from oech3/manpage-direct
GNUmakefile: Simplify installing mans and completions
2 parents e615ea6 + a8d8516 commit 50bdaa1

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

GNUmakefile

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -410,38 +410,25 @@ ifeq ($(MANPAGES),y)
410410
build-uudoc:
411411
${CARGO} build ${CARGOFLAGS} --bin uudoc --features "uudoc ${EXES}" ${PROFILE_CMD} --no-default-features
412412

413-
manpages: build-coreutils build-uudoc
414-
mkdir -p $(BUILDDIR)/man/
415-
$(foreach prog, $(INSTALLEES) $(HASHSUM_PROGS), \
416-
$(BUILDDIR)/uudoc manpage $(prog) > $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1 $(newline) \
417-
)
418-
419-
install-manpages: manpages
413+
install-manpages: build-uudoc
420414
mkdir -p $(DESTDIR)$(DATAROOTDIR)/man/man1
421415
$(foreach prog, $(INSTALLEES) $(HASHSUM_PROGS), \
422-
$(INSTALL) -m 644 $(BUILDDIR)/man/$(PROG_PREFIX)$(prog).1 $(DESTDIR)$(DATAROOTDIR)/man/man1/ $(newline) \
416+
$(BUILDDIR)/uudoc manpage $(prog) > $(DESTDIR)$(DATAROOTDIR)/man/man1/$(PROG_PREFIX)$(prog).1 $(newline) \
423417
)
424418
else
425419
install-manpages:
426420
endif
427421

428422
ifeq ($(COMPLETIONS),y)
429-
completions: build-coreutils build-uudoc
430-
mkdir -p $(BUILDDIR)/completions/zsh $(BUILDDIR)/completions/bash $(BUILDDIR)/completions/fish
431-
$(foreach prog, $(INSTALLEES) $(HASHSUM_PROGS) , \
432-
$(BUILDDIR)/uudoc completion $(prog) zsh > $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog) $(newline) \
433-
$(BUILDDIR)/uudoc completion $(prog) bash > $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog) $(newline) \
434-
$(BUILDDIR)/uudoc completion $(prog) fish > $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish $(newline) \
435-
)
436423

437-
install-completions: completions
424+
install-completions: build-uudoc
438425
mkdir -p $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions
439426
mkdir -p $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions
440427
mkdir -p $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d
441428
$(foreach prog, $(INSTALLEES) $(HASHSUM_PROGS) , \
442-
$(INSTALL) -m 644 $(BUILDDIR)/completions/zsh/_$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/ $(newline) \
443-
$(INSTALL) -m 644 $(BUILDDIR)/completions/bash/$(PROG_PREFIX)$(prog) $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/ $(newline) \
444-
$(INSTALL) -m 644 $(BUILDDIR)/completions/fish/$(PROG_PREFIX)$(prog).fish $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/ $(newline) \
429+
$(BUILDDIR)/uudoc completion $(prog) zsh > $(DESTDIR)$(DATAROOTDIR)/zsh/site-functions/_$(PROG_PREFIX)$(prog) $(newline) \
430+
$(BUILDDIR)/uudoc completion $(prog) bash > $(DESTDIR)$(DATAROOTDIR)/bash-completion/completions/$(PROG_PREFIX)$(prog) $(newline) \
431+
$(BUILDDIR)/uudoc completion $(prog) fish > $(DESTDIR)$(DATAROOTDIR)/fish/vendor_completions.d/$(PROG_PREFIX)$(prog).fish $(newline) \
445432
)
446433
else
447434
install-completions:

0 commit comments

Comments
 (0)