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 072b317 commit 0416a9c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,20 @@ jobs:
repository: Smithsonian/redisx
path: redisx

- name: Build xchange dependency
run: make -C xchange shared

- name: Install xchange dependency
run: sudo make -C xchange install

- name: Build RedisX dependency
run: make -C redisx shared

- name: Install RedisX dependency
run: sudo make -C redisx install

- name: Build smax-clib distro
run: make distro

- name: Install smax-clib in default location
run: sudo make install
13 changes: 10 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,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 @@ -132,15 +136,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 0416a9c

Please sign in to comment.