summaryrefslogtreecommitdiff
path: root/packages/taler-harness/Makefile
blob: f9967419dc2c1df56def22e66104490ecec7af8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# This Makefile has been placed in the public domain.

ifeq ($(TOPLEVEL), yes)
  $(info top-level build)
  -include ../../.config.mk
  override DESTDIR := $(TOP_DESTDIR)
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 taler-harness

ifndef prefix
.PHONY: warn-noprefix install
warn-noprefix:
	@echo "no prefix configured, did you run ./configure?"
install: warn-noprefix
else
BINDIR = $(DESTDIR)$(prefix)/bin
LIBDIR = $(DESTDIR)$(prefix)/lib/taler-harness
NODEDIR = $(LIBDIR)/node_modules/taler-harness
.PHONY: install deps install-nodeps
install-nodeps:
	./build.mjs
	install -d $(BINDIR)
	install -d $(NODEDIR)
	install -d $(NODEDIR)/bin
	install -d $(NODEDIR)/dist
	install ./dist/taler-harness-bundled.cjs $(NODEDIR)/dist/
	install ./dist/taler-harness-bundled.cjs.map $(NODEDIR)/dist/
	install ./bin/taler-harness.mjs $(NODEDIR)/bin/
	ln -sf $(NODEDIR)/bin/taler-harness.mjs $(BINDIR)/taler-harness
deps:
	pnpm install --frozen-lockfile --filter @gnu-taler/taler-harness...
install:
	$(MAKE) deps
	$(MAKE) install-nodeps
endif