summaryrefslogtreecommitdiff
path: root/configure.py.template
blob: 7edc219d1ce49b40ecdff1e724a390e8a1b948c8 (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
# This configure.py file is places in the public domain.

# Configure the build directory.
# This file is invoked by './configure' and should usually not be invoked
# manually.

import talerbuildconfig as tbc
import sys
import shutil

if getattr(tbc, "serialversion", 0) < 2:
    print("talerbuildconfig outdated, please update the build-common submodule and/or bootstrap")
    sys.exit(1)

b = tbc.BuildConfig()

# Enable the --prefix option
b.enable_prefix()

# Enable generation of the "config.mk" include file for the main "Makefile"
b.enable_configmk()

# Declare dependencies
b.add_tool(tbc.PosixTool("find"))
b.add_tool(tbc.NodeJsTool(version_spec=">=12"))
b.add_tool(tbc.GenericTool("npm"))
b.add_tool(tbc.GenericTool("pnpm", hint="Use 'sudo npm install -g pnpm' to install."))

b.run()

print("copying Makefile")
shutil.copyfile("build-system/Makefile", "Makefile")