summaryrefslogtreecommitdiff
path: root/build-system/configure.py
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-05-04 20:56:15 +0200
committerFlorian Dold <florian@dold.me>2021-05-04 20:56:15 +0200
commit56a2b320b55319de9f8e6239a1ead91d9fb655c0 (patch)
treecb76e4f523184d784138a4ccc6bf8830d85d6ba9 /build-system/configure.py
parent8231924a24f9ee2594744e26670205eeabe4d0d6 (diff)
downloadwww-56a2b320b55319de9f8e6239a1ead91d9fb655c0.tar.gz
www-56a2b320b55319de9f8e6239a1ead91d9fb655c0.tar.bz2
www-56a2b320b55319de9f8e6239a1ead91d9fb655c0.zip
pass base URL to site generator
Diffstat (limited to 'build-system/configure.py')
-rw-r--r--build-system/configure.py35
1 files changed, 20 insertions, 15 deletions
diff --git a/build-system/configure.py b/build-system/configure.py
index 6b13143..0f9274e 100644
--- a/build-system/configure.py
+++ b/build-system/configure.py
@@ -4,20 +4,25 @@ from talerbuildconfig import *
b = BuildConfig()
b.enable_prefix()
-b.enable_variant()
b.enable_configmk()
-b.add_tool(PythonTool())
-b.add_tool(PyBabelTool())
-b.add_tool(PosixTool("cp"))
-b.add_tool(PosixTool("echo"))
-b.add_tool(PosixTool("env"))
-b.add_tool(PosixTool("printf"))
-b.add_tool(PosixTool("grep"))
-b.add_tool(PosixTool("mkdir"))
-b.add_tool(PosixTool("rm"))
-b.add_tool(PosixTool("sh"))
-b.add_tool(PosixTool("msgmerge"))
-b.add_tool(PosixTool("tsc"))
-b.add_tool(PosixTool("git"))
-b.add_tool(BrowserTool())
+b.use(Option("variant", "Variant (used as output directory)"))
+
+# Base URL for the site. Per default, the URL is the protocol-relative
+# root path.
+b.use(Option("baseurl", "Base URL that the site will run on", default="//", required=False))
+
+b.use(PythonTool())
+b.use(PyBabelTool())
+b.use(PosixTool("cp"))
+b.use(PosixTool("echo"))
+b.use(PosixTool("env"))
+b.use(PosixTool("printf"))
+b.use(PosixTool("grep"))
+b.use(PosixTool("mkdir"))
+b.use(PosixTool("rm"))
+b.use(PosixTool("sh"))
+b.use(PosixTool("msgmerge"))
+b.use(PosixTool("tsc"))
+b.use(PosixTool("git"))
+b.use(BrowserTool())
b.run()