Makefile: try being compatible with BSDs

This commit is contained in:
Michele Guerini Rocco 2025-03-21 09:45:22 +01:00
parent c3a3972378
commit 20a011414a
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450

View File

@ -125,7 +125,7 @@ ifndef SEMISTATIC
LDFLAGS += -static LDFLAGS += -static
endif endif
else else
LDFLAGS += -Wl,-rpath='$$ORIGIN/../lib/' LDFLAGS += -Wl,-rpath,'$$ORIGIN/../lib/'
endif endif
# Debug build options # Debug build options
@ -162,21 +162,21 @@ tests.%: $(GRAY)
.PHONY: install-bin .PHONY: install-bin
install-bin: $(BINARIES) $(LIBRARIES) install-bin: $(BINARIES) $(LIBRARIES)
mkdir -p $(PREFIX)/{bin,lib} mkdir -p $(PREFIX)/{bin,lib}
install -m555 -t $(PREFIX)/bin $(BINARIES) install -m755 $(BINARIES) $(PREFIX)/bin
cp -fr -t $(PREFIX)/lib $(LIBRARIES) install -m755 $(LIBRARIES) $(PREFIX)/lib
.PHONY: install-python .PHONY: install-python
install-python: scripts/gray install-python: scripts/gray
mkdir -p $(PYTHON_PREFIX) mkdir -p $(PYTHON_PREFIX)/gray
cp -fr -t $(PYTHON_PREFIX) $^ install -m644 $^/*.py $(PYTHON_PREFIX)/gray
.PHONY: install-doc .PHONY: install-doc
install-doc: $(SHAREDIR)/doc $(MANPAGES) install-doc: $(SHAREDIR)/doc $(MANPAGES)
mkdir -p $(PREFIX)/share/{doc/res,man/man{1,5}} mkdir -p $(PREFIX)/share/{doc/res,man/man{1,5}}
install -m644 -t $(PREFIX)/share/doc $(SHAREDIR)/doc/manual.* install -m644 $(SHAREDIR)/doc/manual.* $(PREFIX)/share/doc
install -m644 -t $(PREFIX)/share/doc/res $(SHAREDIR)/doc/res/* install -m644 $(SHAREDIR)/doc/res/* $(PREFIX)/share/doc/res
install -m644 -t $(PREFIX)/share/man/man1 $(SHAREDIR)/*.1 install -m644 $(SHAREDIR)/*.1 $(PREFIX)/share/man/man1
install -m644 -t $(PREFIX)/share/man/man5 $(SHAREDIR)/*.5 install -m644 $(SHAREDIR)/*.5 $(PREFIX)/share/man/man5
.PHONY: install .PHONY: install
install: install-bin install-python install-doc install: install-bin install-python install-doc