From b4e69ef7fab0ba21540e05e71893ee2ad86b9f89 Mon Sep 17 00:00:00 2001 From: Attila Kovacs Date: Tue, 12 Nov 2024 22:57:38 +0100 Subject: [PATCH] Makefile: install only what was built --- .github/workflows/install.yml | 6 ++++++ Makefile | 12 ++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 4a2da9f..e36da29 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -40,9 +40,15 @@ jobs: repository: Smithsonian/xchange path: xchange + - name: Build xchange dependency + run: make -C xchange shared + - name: Install xchange dependency run: sudo make -C xchange install + - name: Build RedisX distro + run: make distro + - name: Install RedisX in default location run: sudo make install diff --git a/Makefile b/Makefile index b6dd2dd..c9a4006 100644 --- a/Makefile +++ b/Makefile @@ -115,10 +115,14 @@ htmldir ?= $(docdir)/html install: install-libs install-headers install-apidoc .PHONY: install-libs -install-libs: shared +install-libs: +ifneq ($(wildcard $(LIB)/*),) @echo "installing libraries to $(libdir)" install -d $(libdir) install -m 755 -D $(LIB)/lib*.so* $(libdir)/ +else + @echo "WARNING! Skipping libs install: needs 'shared' and/or 'static'" +endif .PHONY: install-headers install-headers: @@ -127,7 +131,8 @@ install-headers: install -m 644 -D include/* $(includedir)/ .PHONY: install-apidoc -install-apidoc: $(DOC_TARGETS) +install-apidoc: +ifneq ($(wildcard apidoc/html/search/*),) @echo "installing API documentation to $(htmldir)" install -d $(htmldir)/search install -m 644 -D apidoc/html/search/* $(htmldir)/search/ @@ -135,6 +140,9 @@ install-apidoc: $(DOC_TARGETS) @echo "installing Doxygen tag file to $(docdir)" install -d $(docdir) install -m 644 -D apidoc/*.tag $(docdir)/ +else + @echo "WARNING! Skipping apidoc install: needs doxygen and 'local-dox'" +endif # Built-in help screen for `make help` .PHONY: help