2023-07-03 21:27:44 +02:00
|
|
|
# This Makefile has been placed in the public domain.
|
|
|
|
|
|
|
|
ifeq ($(TOPLEVEL), yes)
|
|
|
|
$(info top-level build)
|
|
|
|
-include ../../.config.mk
|
2023-09-28 17:50:53 +02:00
|
|
|
override DESTDIR := $(TOP_DESTDIR)
|
2023-07-03 21:27:44 +02:00
|
|
|
else
|
|
|
|
$(info package-level build)
|
|
|
|
-include ../../.config.mk
|
|
|
|
-include .config.mk
|
|
|
|
endif
|
|
|
|
|
|
|
|
$(info prefix is $(prefix))
|
|
|
|
|
|
|
|
all:
|
|
|
|
@echo use 'make install' to build and install anastasis-cli
|
|
|
|
|
|
|
|
ifndef prefix
|
|
|
|
.PHONY: warn-noprefix install
|
|
|
|
warn-noprefix:
|
|
|
|
@echo "no prefix configured, did you run ./configure?"
|
|
|
|
install: warn-noprefix
|
|
|
|
else
|
2023-09-28 18:42:14 +02:00
|
|
|
bindir = $(prefix)/bin
|
|
|
|
libdir = $(prefix)/lib/anastasis-cli
|
2023-09-28 17:50:53 +02:00
|
|
|
nodedir = $(libdir)/node_modules/anastasis-cli
|
2023-07-03 21:27:44 +02:00
|
|
|
.PHONY: install install-nodeps deps
|
|
|
|
install-nodeps:
|
|
|
|
./build-node.mjs
|
2023-09-28 18:42:14 +02:00
|
|
|
install -d $(DESTDIR)$(bindir)
|
|
|
|
install -d $(DESTDIR)$(nodedir)/bin
|
|
|
|
install -d $(DESTDIR)$(nodedir)/dist
|
|
|
|
install ./dist/anastasis-cli-bundled.cjs $(DESTDIR)$(nodedir)/dist/
|
|
|
|
install ./dist/anastasis-cli-bundled.cjs.map $(DESTDIR)$(nodedir)/dist/
|
|
|
|
install ./bin/anastasis-cli.mjs $(DESTDIR)$(nodedir)/bin/
|
|
|
|
ln -sf ../lib/anastasis-cli/node_modules/anastasis-cli/bin/anastasis-cli.mjs $(DESTDIR)$(bindir)/anastasis-cli
|
2023-07-03 21:27:44 +02:00
|
|
|
deps:
|
|
|
|
pnpm install --frozen-lockfile --filter @gnu-taler/anastasis-cli...
|
|
|
|
install:
|
|
|
|
$(MAKE) deps
|
|
|
|
$(MAKE) install-nodeps
|
|
|
|
endif
|