From 4f0e06ea71caab4bb3f7ad8f699fcbaf2c8ca7ff Mon Sep 17 00:00:00 2001 From: Lorenzo Figini Date: Thu, 30 May 2024 17:52:40 +0200 Subject: [PATCH] Makefile: split install target for binaries and documentation --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index ba5d438..29b12fc 100644 --- a/Makefile +++ b/Makefile @@ -116,7 +116,7 @@ endif ## Targets ## -.PHONY: all clean check install docs +.PHONY: all clean check install-bin install-doc install docs # Don't update archives in parallel, it's unsupported .NOTPARALLEL: $(LIBDIR)/libgray.a @@ -135,15 +135,20 @@ tests.%: $(GRAY) python -Bm tests '$@' --binary '$(GRAY)' # Install libraries, binaries and documentation -install: $(BINARIES) $(LIBRARIES) $(SHAREDIR)/doc $(MANPAGES) - mkdir -p $(PREFIX)/{bin,lib,share/{doc/res,man/man{1,5}}} +install-bin: $(BINARIES) $(LIBRARIES) + mkdir -p $(PREFIX)/{bin,lib} install -m555 -t $(PREFIX)/bin $(BINDIR)/* install -m555 -t $(PREFIX)/lib $(LIBDIR)/* + +install-doc: $(SHAREDIR)/doc $(MANPAGES) + mkdir -p $(PREFIX)/share/{doc/res,man/man{1,5}} install -m644 -t $(PREFIX)/share/doc $(SHAREDIR)/doc/manual.* install -m644 -t $(PREFIX)/share/doc/res $(SHAREDIR)/doc/res/* install -m644 -t $(PREFIX)/share/man/man1 $(SHAREDIR)/*.1 install -m644 -t $(PREFIX)/share/man/man5 $(SHAREDIR)/*.5 +install: install-bin install-doc + # dependencies $(OBJDIR)/%.o: $(OBJDIR)/%.d