From bb4daf280cbae9f37a44d3b8893a3b933134cddc Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 29 Jul 2017 14:35:30 +0200 Subject: Switch to using utility library for web/ --- build/root.build | 4 +++- mod/buildfile | 22 ++++++---------------- tests/web/xhtml/buildfile | 10 ++-------- web/buildfile | 19 +++++++++++++++++++ 4 files changed, 30 insertions(+), 25 deletions(-) create mode 100644 web/buildfile 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 -- cgit v1.1