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