build system: support DESTDIR
This commit is contained in:
parent
61424e2cb5
commit
467f968695
23
Makefile
23
Makefile
@ -9,6 +9,11 @@ git-archive-all = ./build-system/taler-build-scripts/archive-with-submodules/git
|
|||||||
|
|
||||||
include .config.mk
|
include .config.mk
|
||||||
|
|
||||||
|
# Let recursive Makefiles know that they're being invoked
|
||||||
|
# from the top-level makefile.
|
||||||
|
export TOPLEVEL := yes
|
||||||
|
export TOP_DESTDIR := $(abspath $(DESTDIR))
|
||||||
|
|
||||||
.PHONY: compile
|
.PHONY: compile
|
||||||
compile:
|
compile:
|
||||||
pnpm install -r --frozen-lockfile
|
pnpm install -r --frozen-lockfile
|
||||||
@ -121,18 +126,18 @@ lint:
|
|||||||
install:
|
install:
|
||||||
pnpm install --frozen-lockfile
|
pnpm install --frozen-lockfile
|
||||||
pnpm run compile
|
pnpm run compile
|
||||||
make -C packages/taler-wallet-cli TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/taler-wallet-cli install-nodeps
|
||||||
make -C packages/anastasis-cli TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/anastasis-cli install-nodeps
|
||||||
make -C packages/taler-harness TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/taler-harness install-nodeps
|
||||||
make -C packages/demobank-ui TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/demobank-ui install-nodeps
|
||||||
make -C packages/merchant-backoffice-ui TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/merchant-backoffice-ui install-nodeps
|
||||||
make -C packages/aml-backoffice-ui TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/aml-backoffice-ui install-nodeps
|
||||||
|
|
||||||
.PHONY: install-tools
|
.PHONY: install-tools
|
||||||
# Install taler-wallet-cli, anastasis-cli and taler-harness
|
# Install taler-wallet-cli, anastasis-cli and taler-harness
|
||||||
install-tools:
|
install-tools:
|
||||||
pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli... --filter @gnu-taler/anastasis-cli... --filter @gnu-taler/taler-harness...
|
pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli... --filter @gnu-taler/anastasis-cli... --filter @gnu-taler/taler-harness...
|
||||||
pnpm run --filter @gnu-taler/taler-wallet-cli... --filter @gnu-taler/anastasis-cli... --filter @gnu-taler/taler-harness... compile
|
pnpm run --filter @gnu-taler/taler-wallet-cli... --filter @gnu-taler/anastasis-cli... --filter @gnu-taler/taler-harness... compile
|
||||||
make -C packages/taler-wallet-cli TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/taler-wallet-cli install-nodeps
|
||||||
make -C packages/anastasis-cli TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/anastasis-cli install-nodeps
|
||||||
make -C packages/taler-harness TOPLEVEL=yes install-nodeps
|
$(MAKE) -C packages/taler-harness install-nodeps
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
ifeq ($(TOPLEVEL), yes)
|
ifeq ($(TOPLEVEL), yes)
|
||||||
$(info top-level build)
|
$(info top-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
|
override DESTDIR := $(TOP_DESTDIR)
|
||||||
else
|
else
|
||||||
$(info package-level build)
|
$(info package-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
@ -15,7 +16,7 @@ $(info prefix is $(prefix))
|
|||||||
all:
|
all:
|
||||||
@echo run \'make install\' to install
|
@echo run \'make install\' to install
|
||||||
|
|
||||||
spa_dir=$(prefix)/share/taler/aml-backoffice-ui
|
spa_dir=$(DESTDIR)$(prefix)/share/taler/aml-backoffice-ui
|
||||||
|
|
||||||
.PHONY: install-nodeps
|
.PHONY: install-nodeps
|
||||||
install-nodeps:
|
install-nodeps:
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
ifeq ($(TOPLEVEL), yes)
|
ifeq ($(TOPLEVEL), yes)
|
||||||
$(info top-level build)
|
$(info top-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
|
override DESTDIR := $(TOP_DESTDIR)
|
||||||
else
|
else
|
||||||
$(info package-level build)
|
$(info package-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
@ -20,19 +21,19 @@ warn-noprefix:
|
|||||||
@echo "no prefix configured, did you run ./configure?"
|
@echo "no prefix configured, did you run ./configure?"
|
||||||
install: warn-noprefix
|
install: warn-noprefix
|
||||||
else
|
else
|
||||||
install_target = $(prefix)/lib/anastasis-cli
|
bindir = $(DESTDIR)$(prefix)/bin
|
||||||
|
libdir = $(DESTDIR)$(prefix)/lib/anastasis-cli
|
||||||
|
nodedir = $(libdir)/node_modules/anastasis-cli
|
||||||
.PHONY: install install-nodeps deps
|
.PHONY: install install-nodeps deps
|
||||||
install-nodeps:
|
install-nodeps:
|
||||||
./build-node.mjs
|
./build-node.mjs
|
||||||
install -d $(prefix)/bin
|
install -d $(bindir)
|
||||||
install -d $(install_target)/bin
|
install -d $(nodedir)/bin
|
||||||
install -d $(install_target)/node_modules/anastasis-cli
|
install -d $(nodedir)/dist
|
||||||
install -d $(install_target)/node_modules/anastasis-cli/bin
|
install ./dist/anastasis-cli-bundled.cjs $(nodedir)/dist/
|
||||||
install -d $(install_target)/node_modules/anastasis-cli/dist
|
install ./dist/anastasis-cli-bundled.cjs.map $(nodedir)/dist/
|
||||||
install ./dist/anastasis-cli-bundled.cjs $(install_target)/node_modules/anastasis-cli/dist/
|
install ./bin/anastasis-cli.mjs $(nodedir)/bin/
|
||||||
install ./dist/anastasis-cli-bundled.cjs.map $(install_target)/node_modules/anastasis-cli/dist/
|
ln -sf $(nodedir)/bin/anastasis-cli.mjs $(bindir)/anastasis-cli
|
||||||
install ./bin/anastasis-cli.mjs $(install_target)/node_modules/anastasis-cli/bin/
|
|
||||||
ln -sf $(install_target)/node_modules/anastasis-cli/bin/anastasis-cli.mjs $(prefix)/bin/anastasis-cli
|
|
||||||
deps:
|
deps:
|
||||||
pnpm install --frozen-lockfile --filter @gnu-taler/anastasis-cli...
|
pnpm install --frozen-lockfile --filter @gnu-taler/anastasis-cli...
|
||||||
install:
|
install:
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
ifeq ($(TOPLEVEL), yes)
|
ifeq ($(TOPLEVEL), yes)
|
||||||
$(info top-level build)
|
$(info top-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
|
override DESTDIR := $(TOP_DESTDIR)
|
||||||
else
|
else
|
||||||
$(info package-level build)
|
$(info package-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
@ -15,7 +16,7 @@ $(info prefix is $(prefix))
|
|||||||
all:
|
all:
|
||||||
@echo run \'make install\' to install
|
@echo run \'make install\' to install
|
||||||
|
|
||||||
spa_dir=$(prefix)/share/taler/demobank-ui
|
spa_dir=$(DESTDIR)$(prefix)/share/taler/demobank-ui
|
||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps:
|
deps:
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
ifeq ($(TOPLEVEL), yes)
|
ifeq ($(TOPLEVEL), yes)
|
||||||
$(info top-level build)
|
$(info top-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
|
override DESTDIR := $(TOP_DESTDIR)
|
||||||
else
|
else
|
||||||
$(info package-level build)
|
$(info package-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
@ -15,7 +16,7 @@ $(info prefix is $(prefix))
|
|||||||
all:
|
all:
|
||||||
@echo run \'make install\' to install
|
@echo run \'make install\' to install
|
||||||
|
|
||||||
spa_dir=$(prefix)/share/taler/merchant-backoffice
|
spa_dir=$(DESTDIR)$(prefix)/share/taler/merchant-backoffice
|
||||||
|
|
||||||
.PHONY: deps
|
.PHONY: deps
|
||||||
deps:
|
deps:
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
ifeq ($(TOPLEVEL), yes)
|
ifeq ($(TOPLEVEL), yes)
|
||||||
$(info top-level build)
|
$(info top-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
|
override DESTDIR := $(TOP_DESTDIR)
|
||||||
else
|
else
|
||||||
$(info package-level build)
|
$(info package-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
@ -20,19 +21,20 @@ warn-noprefix:
|
|||||||
@echo "no prefix configured, did you run ./configure?"
|
@echo "no prefix configured, did you run ./configure?"
|
||||||
install: warn-noprefix
|
install: warn-noprefix
|
||||||
else
|
else
|
||||||
install_target = $(prefix)/lib/taler-harness
|
BINDIR = $(DESTDIR)$(prefix)/bin
|
||||||
|
LIBDIR = $(DESTDIR)$(prefix)/lib/taler-harness
|
||||||
|
NODEDIR = $(LIBDIR)/node_modules/taler-harness
|
||||||
.PHONY: install deps install-nodeps
|
.PHONY: install deps install-nodeps
|
||||||
install-nodeps:
|
install-nodeps:
|
||||||
./build.mjs
|
./build.mjs
|
||||||
install -d $(prefix)/bin
|
install -d $(BINDIR)
|
||||||
install -d $(install_target)/bin
|
install -d $(NODEDIR)
|
||||||
install -d $(install_target)/node_modules/taler-harness
|
install -d $(NODEDIR)/bin
|
||||||
install -d $(install_target)/node_modules/taler-harness/bin
|
install -d $(NODEDIR)/dist
|
||||||
install -d $(install_target)/node_modules/taler-harness/dist
|
install ./dist/taler-harness-bundled.cjs $(NODEDIR)/dist/
|
||||||
install ./dist/taler-harness-bundled.cjs $(install_target)/node_modules/taler-harness/dist/
|
install ./dist/taler-harness-bundled.cjs.map $(NODEDIR)/dist/
|
||||||
install ./dist/taler-harness-bundled.cjs.map $(install_target)/node_modules/taler-harness/dist/
|
install ./bin/taler-harness.mjs $(NODEDIR)/bin/
|
||||||
install ./bin/taler-harness.mjs $(install_target)/node_modules/taler-harness/bin/
|
ln -sf $(NODEDIR)/bin/taler-harness.mjs $(BINDIR)/taler-harness
|
||||||
ln -sf $(install_target)/node_modules/taler-harness/bin/taler-harness.mjs $(prefix)/bin/taler-harness
|
|
||||||
deps:
|
deps:
|
||||||
pnpm install --frozen-lockfile --filter @gnu-taler/taler-harness...
|
pnpm install --frozen-lockfile --filter @gnu-taler/taler-harness...
|
||||||
install:
|
install:
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
ifeq ($(TOPLEVEL), yes)
|
ifeq ($(TOPLEVEL), yes)
|
||||||
$(info top-level build)
|
$(info top-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
|
override DESTDIR := $(TOP_DESTDIR)
|
||||||
else
|
else
|
||||||
$(info package-level build)
|
$(info package-level build)
|
||||||
-include ../../.config.mk
|
-include ../../.config.mk
|
||||||
@ -20,23 +21,23 @@ warn-noprefix:
|
|||||||
@echo "no prefix configured, did you run ./configure?"
|
@echo "no prefix configured, did you run ./configure?"
|
||||||
install: warn-noprefix
|
install: warn-noprefix
|
||||||
else
|
else
|
||||||
install_target = $(prefix)/lib/taler-wallet-cli
|
LIBDIR = $(DESTDIR)$(prefix)/lib/taler-wallet-cli
|
||||||
|
BINDIR=$(DESTDIR)$(prefix)/bin
|
||||||
|
NODEDIR=$(LIBDIR)/node_modules/taler-wallet-cli
|
||||||
.PHONY: install install-nodeps deps
|
.PHONY: install install-nodeps deps
|
||||||
install-nodeps:
|
install-nodeps:
|
||||||
./build-node.mjs
|
./build-node.mjs
|
||||||
@echo installing wallet CLI to $(install_target)
|
@echo installing wallet CLI to $(DESTDIR)$(prefix)
|
||||||
install -d $(prefix)/bin
|
install -d $(BINDIR)
|
||||||
install -d $(install_target)/build
|
install -d $(LIBDIR)/build
|
||||||
install -d $(install_target)/bin
|
install -d $(NODEDIR)/bin
|
||||||
install -d $(install_target)/node_modules/taler-wallet-cli
|
install -d $(NODEDIR)/dist
|
||||||
install -d $(install_target)/node_modules/taler-wallet-cli/bin
|
install ./dist/taler-wallet-cli-bundled.cjs $(NODEDIR)/dist/
|
||||||
install -d $(install_target)/node_modules/taler-wallet-cli/dist
|
install ./dist/taler-wallet-cli-bundled.cjs.map $(NODEDIR)/dist/
|
||||||
install ./dist/taler-wallet-cli-bundled.cjs $(install_target)/node_modules/taler-wallet-cli/dist/
|
install ./bin/taler-wallet-cli.mjs $(NODEDIR)/bin/
|
||||||
install ./dist/taler-wallet-cli-bundled.cjs.map $(install_target)/node_modules/taler-wallet-cli/dist/
|
install ../idb-bridge/node_modules/better-sqlite3/build/Release/better_sqlite3.node $(LIBDIR)/build/ \
|
||||||
install ./bin/taler-wallet-cli.mjs $(install_target)/node_modules/taler-wallet-cli/bin/
|
|
||||||
install ../idb-bridge/node_modules/better-sqlite3/build/Release/better_sqlite3.node $(install_target)/build/ \
|
|
||||||
|| echo "sqlite3 unavailable, better-sqlite3 native module not found"
|
|| echo "sqlite3 unavailable, better-sqlite3 native module not found"
|
||||||
ln -sf $(install_target)/node_modules/taler-wallet-cli/bin/taler-wallet-cli.mjs $(prefix)/bin/taler-wallet-cli
|
ln -sf $(NODESIR)/bin/taler-wallet-cli.mjs $(BINDIR)/taler-wallet-cli
|
||||||
deps:
|
deps:
|
||||||
pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli...
|
pnpm install --frozen-lockfile --filter @gnu-taler/taler-wallet-cli...
|
||||||
pnpm run --filter @gnu-taler/taler-wallet-cli... compile
|
pnpm run --filter @gnu-taler/taler-wallet-cli... compile
|
||||||
|
Loading…
Reference in New Issue
Block a user