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 8f6605a commit 982dfe3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ jobs:

- uses: actions/checkout@v4

- name: Build distro
run: make distro

- name: Install to default location
run: sudo make install

12 changes: 10 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,14 @@ htmldir ?= $(docdir)/html
install: install-libs install-cio-data install-headers install-apidoc install-examples

.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-cio-data
install-cio-data:
Expand All @@ -218,14 +222,18 @@ install-headers:
install -m 644 -D include/* $(includedir)/

.PHONY: install-apidoc
install-apidoc: local-dox
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 apidoc/supernovas.tag $(docdir)/supernovas.tag
else
@echo "WARNING! Skipping apidocs install: needs doxygen and 'local-dox'"
endif

.PHONY: install-examples
install-examples:
Expand Down

0 comments on commit 982dfe3

Please sign in to comment.