Makefile: make use of install portable

install -D on GNU is actually install -d on BSD.
This commit is contained in:
Michele Guerini Rocco 2023-11-26 18:51:38 +01:00
parent 02ade0e2d0
commit 7417d88d73
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -115,11 +115,12 @@ clean:
# Install libraries, binaries and documentation
install: $(BINARIES) $(LIBRARIES) $(SHAREDIR)/doc $(SHAREDIR)/gray.1
install -Dm555 -t $(PREFIX)/bin $(BINDIR)/*
install -Dm555 -t $(PREFIX)/lib $(LIBDIR)/*
install -Dm644 -t $(PREFIX)/share/doc $(SHAREDIR)/doc/manual.*
install -Dm644 -t $(PREFIX)/share/doc/res $(SHAREDIR)/doc/res/*
install -Dm644 -t $(PREFIX)/share/man/man1 $(SHAREDIR)/gray.1
mkdir -p $(PREFIX)/{bin,lib,share/{doc/res,man/man1}}
install -m555 -t $(PREFIX)/bin $(BINDIR)/*
install -m555 -t $(PREFIX)/lib $(LIBDIR)/*
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)/gray.1
# dependencies
$(OBJDIR)/%.o: $(OBJDIR)/%.d
@ -139,7 +140,8 @@ $(LIBDIR)/libgray.a: $(LIBDIR)/libgray.a($(MODULES))
# GRAY static library when compiling from JETTO
-include ../include.mk
$(JLIBDIR)/libgray.a: $(LIBDIR)/libgray.a
install -Dm755 '$<' '$@'
mkdir -p $(LIBDIR)
install -m755 '$<' '$@'
# All documentation
docs: $(SHAREDIR)/gray.1 $(SHAREDIR)/doc