aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2017-07-29 14:35:30 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2017-07-29 14:35:30 +0200
commitbb4daf280cbae9f37a44d3b8893a3b933134cddc (patch)
tree2be6657303d72539c2b57bc4624cbb87fc54ed2a
parent2508d4d0e05ef55beb3a4db52aa01424eedb4226 (diff)
Switch to using utility library for web/
-rw-r--r--build/root.build4
-rw-r--r--mod/buildfile22
-rw-r--r--tests/web/xhtml/buildfile10
-rw-r--r--web/buildfile19
4 files changed, 30 insertions, 25 deletions
diff --git a/build/root.build b/build/root.build
index 09a03ce..1a5f7af 100644
--- a/build/root.build
+++ b/build/root.build
@@ -25,9 +25,11 @@ cxx.coptions += -Wno-unknown-pragmas
#
using? cli
-# All exe{} in tests/ are, well, tests.
+# All exe{} in tests/ are, well, tests. Also don't link whole archives
+# by default there.
#
tests/exe{*}: test = true
+tests/libu{*}: bin.whole = false
# Specify the test target for cross-testing.
#
diff --git a/mod/buildfile b/mod/buildfile
index 81a6611..596f3a2 100644
--- a/mod/buildfile
+++ b/mod/buildfile
@@ -6,32 +6,22 @@ define mod: libs
mod{*}: bin.lib.prefix = mod_
mod{*}: install = libexec/
-# While we don't need to link to APR, we need to find its header location.
-#
-import libs = libapr1%lib{apr-1}
-import libs += libstudxml%lib{studxml}
-import libs += libodb%lib{odb}
+import libs = libodb%lib{odb}
import libs += libodb-pgsql%lib{odb-pgsql}
import libs += libbutl%lib{butl}
import libs += libbpkg%lib{bpkg}
import libs += libbbot%lib{bbot}
include ../libbrep/
+include ../web/
-mod{brep}: {hxx ixx txx cxx}{* -options} \
- {hxx ixx cxx}{ options} \
- ../web/{hxx ixx txx cxx}{* -version} \
- ../web/{hxx }{ version} \
-../web/apache/{hxx ixx txx cxx}{* } \
-../libbrep/libs{brep} $libs
-
-../web/hxx{version}: ../web/in{version} $src_root/file{manifest}
-../web/hxx{version}: dist = true
+mod{brep}: {hxx ixx txx cxx}{* -options} \
+ {hxx ixx cxx}{ options} \
+ ../libbrep/libs{brep} ../web/libus{web} $libs
# Don't install any of the module's headers.
#
- {hxx ixx txx}{*}: install = false
-../web/{hxx ixx txx}{*}: install = false
+{hxx ixx txx}{*}: install = false
# Generated options parser.
#
diff --git a/tests/web/xhtml/buildfile b/tests/web/xhtml/buildfile
index 06347dd..09f7619 100644
--- a/tests/web/xhtml/buildfile
+++ b/tests/web/xhtml/buildfile
@@ -2,12 +2,6 @@
# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
# license : MIT; see accompanying LICENSE file
-import libs = libstudxml%lib{studxml}
-
-exe{driver}: {hxx cxx}{*} $libs
+include ../../../web/
+exe{driver}: {hxx cxx}{*} ../../../web/libus{web}
exe{driver}: test.output = test.out
-
-# @@ The rule doesn't trigger the target generating. Will be fixed when we add
-# support for utility library.
-#
-../../../web/hxx{version}: ../../../web/in{version} $src_root/file{manifest}
diff --git a/web/buildfile b/web/buildfile
new file mode 100644
index 0000000..384b533
--- /dev/null
+++ b/web/buildfile
@@ -0,0 +1,19 @@
+# file : web/buildfile
+# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd
+# license : MIT; see accompanying LICENSE file
+
+# This is currently part of the brep apache module but lives in a separate
+# directory. Thus the strange choices: libus{}, no header installation, etc.
+
+# While we don't need to link to APR, we need to find its header location.
+#
+import libs = libapr1%lib{apr-1}
+import libs += libstudxml%lib{studxml}
+import libs += libbutl%lib{butl}
+
+libus{web}: {hxx ixx txx cxx}{** -version} {hxx}{version} $libs
+
+hxx{version}: in{version} $src_root/file{manifest}
+hxx{version}: dist = true
+
+{hxx ixx txx}{*}: install = false