Phase 30: complete configurable installation and release qualification
This commit is contained in:
parent
afc049e2c8
commit
90eac33a71
18 changed files with 399 additions and 59 deletions
33
Makefile
33
Makefile
|
|
@ -6,6 +6,18 @@ PKG_CONFIG ?= pkg-config
|
|||
FLTK_CONFIG ?= fltk-config
|
||||
BUILD_DIR ?= build
|
||||
PREFIX ?= /usr/local
|
||||
exec_prefix ?= $(PREFIX)
|
||||
bindir ?= $(exec_prefix)/bin
|
||||
libdir ?= $(exec_prefix)/lib
|
||||
includedir ?= $(PREFIX)/include
|
||||
datarootdir ?= $(PREFIX)/share
|
||||
datadir ?= $(datarootdir)
|
||||
docdir ?= $(datarootdir)/doc/xtc
|
||||
licensedir ?= $(datarootdir)/licenses/xtc
|
||||
examplesdir ?= $(datadir)/xtc/examples
|
||||
desktopdir ?= $(datadir)/applications
|
||||
pkgconfigdir ?= $(libdir)/pkgconfig
|
||||
INSTALL_LAYOUT = --prefix "$(PREFIX)" --destdir "$(DESTDIR)" --bindir "$(bindir)" --libdir "$(libdir)" --includedir "$(includedir)" --docdir "$(docdir)" --licensedir "$(licensedir)" --examplesdir "$(examplesdir)" --desktopdir "$(desktopdir)" --pkgconfigdir "$(pkgconfigdir)"
|
||||
PYTHON ?= python3
|
||||
VERSION := $(shell sed -n 's/^\#define XTC_VERSION_STRING "\([^"]*\)"/\1/p' include/xtc/xtc_version.h)
|
||||
|
||||
|
|
@ -172,27 +184,18 @@ endif
|
|||
# install retains the core-only behavior; install-gui adds the application.
|
||||
.PHONY: install uninstall install-gui dist release test-install test-release test-performance
|
||||
$(BUILD_DIR)/xtc.pc: packaging/xtc.pc.in tools/pkgconfig.py tools/dist.py include/xtc/xtc_version.h FORCE
|
||||
$(PYTHON) tools/pkgconfig.py --prefix "$(PREFIX)" --jack "$(if $(JACK_AVAILABLE),jack)" --output "$@"
|
||||
$(PYTHON) tools/pkgconfig.py --prefix "$(PREFIX)" --exec-prefix "$(exec_prefix)" --libdir "$(libdir)" --includedir "$(includedir)" --jack "$(if $(JACK_AVAILABLE),jack)" --output "$@"
|
||||
.PHONY: FORCE
|
||||
FORCE:
|
||||
|
||||
install: all $(BUILD_DIR)/xtc.pc
|
||||
install -d "$(DESTDIR)$(PREFIX)/include/xtc" "$(DESTDIR)$(PREFIX)/lib/pkgconfig" "$(DESTDIR)$(PREFIX)/bin" "$(DESTDIR)$(PREFIX)/share/doc/xtc/decisions" "$(DESTDIR)$(PREFIX)/share/licenses/xtc"
|
||||
install -m 0644 include/xtc/*.h "$(DESTDIR)$(PREFIX)/include/xtc/"
|
||||
install -m 0644 "$(BUILD_DIR)/libxtc.a" "$(DESTDIR)$(PREFIX)/lib/"
|
||||
install -m 0644 "$(BUILD_DIR)/xtc.pc" "$(DESTDIR)$(PREFIX)/lib/pkgconfig/"
|
||||
install -m 0755 "$(BUILD_DIR)/xtc-check" "$(DESTDIR)$(PREFIX)/bin/"
|
||||
install -m 0644 README.md docs/*.md docs/performance-baseline.json "$(DESTDIR)$(PREFIX)/share/doc/xtc/"
|
||||
install -m 0644 docs/decisions/*.md "$(DESTDIR)$(PREFIX)/share/doc/xtc/decisions/"
|
||||
install -m 0644 LICENSE "$(DESTDIR)$(PREFIX)/share/licenses/xtc/"
|
||||
$(PYTHON) tools/install.py $(INSTALL_LAYOUT) --build-dir "$(BUILD_DIR)"
|
||||
|
||||
install-gui: install gui
|
||||
install -d "$(DESTDIR)$(PREFIX)/share/applications"
|
||||
install -m 0755 "$(BUILD_DIR)/xtc" "$(DESTDIR)$(PREFIX)/bin/"
|
||||
install -m 0644 packaging/xtc.desktop "$(DESTDIR)$(PREFIX)/share/applications/"
|
||||
$(PYTHON) tools/install.py $(INSTALL_LAYOUT) --build-dir "$(BUILD_DIR)" --gui
|
||||
|
||||
uninstall:
|
||||
$(PYTHON) tools/uninstall.py --root "$(DESTDIR)$(PREFIX)"
|
||||
$(PYTHON) tools/uninstall.py $(INSTALL_LAYOUT)
|
||||
|
||||
dist:
|
||||
$(PYTHON) tools/dist.py --output "$(BUILD_DIR)/xtc-$(VERSION).tar.gz"
|
||||
|
|
@ -454,3 +457,7 @@ check-development: test-benchmark-tools
|
|||
.PHONY: test-stress-plugins
|
||||
test-stress-plugins: $(BUILD_DIR)/test_realtime $(BUILD_DIR)/test_reliability $(BUILD_DIR)/test_scale $(BUILD_DIR)/test_portability $(BUILD_DIR)/test_project_diagnostics $(BUILD_DIR)/test_soak $(BACKEND_TEST) $(BUILD_DIR)/test_plugins $(BUILD_DIR)/plugin-fixture.so
|
||||
$(PYTHON) tools/stress.py --build-dir "$(BUILD_DIR)" --rounds "$(STRESS_ROUNDS)" --plugin "$(BUILD_DIR)/plugin-fixture.so"
|
||||
|
||||
.PHONY: test-install-layout
|
||||
test-install-layout: all $(if $(GUI_AVAILABLE),gui)
|
||||
$(PYTHON) tests/integration/test_install.py --build-dir "$(abspath $(BUILD_DIR))" --custom-layout $(if $(GUI_AVAILABLE),--gui)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue