Skip to content

Commit

Permalink
Makefile: install only what was built
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Nov 12, 2024
1 parent 6100bee commit b4e69ef
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -127,14 +131,18 @@ 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/
install -m 644 -D apidoc/html/*.* $(htmldir)/
@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
Expand Down

0 comments on commit b4e69ef

Please sign in to comment.