summaryrefslogtreecommitdiff
path: root/examples/features
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2016-11-17 01:35:29 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2016-11-22 18:52:21 +0300
commitd52c1fb406b1cef82c5f5a28fc1804d7d99a49d8 (patch)
tree89236d3dcdf6245c75d761fde09040d9d2a56480 /examples/features
parentbe3dc4cee63da92cfa1fa44a0bf90ab11ec7aaca (diff)
Add support for build2 for tests and examples
Diffstat (limited to 'examples/features')
-rw-r--r--examples/features/.gitignore1
-rw-r--r--examples/features/buildfile11
-rw-r--r--examples/features/makefile72
3 files changed, 12 insertions, 72 deletions
diff --git a/examples/features/.gitignore b/examples/features/.gitignore
new file mode 100644
index 0000000..c6e608b
--- /dev/null
+++ b/examples/features/.gitignore
@@ -0,0 +1 @@
+options.?xx
diff --git a/examples/features/buildfile b/examples/features/buildfile
new file mode 100644
index 0000000..3b7b1dc
--- /dev/null
+++ b/examples/features/buildfile
@@ -0,0 +1,11 @@
+# file : examples/features/buildfile
+# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC
+# license : MIT; see accompanying LICENSE file
+
+exe{driver}: cxx{driver} {hxx ixx cxx}{options} doc{README}
+
+cxx.poptions =+ -I$out_base
+
+# Generated options parser.
+#
+{hxx ixx cxx}{options}: cli{options}
diff --git a/examples/features/makefile b/examples/features/makefile
deleted file mode 100644
index 9b7ceac..0000000
--- a/examples/features/makefile
+++ /dev/null
@@ -1,72 +0,0 @@
-# file : examples/features/makefile
-# author : Boris Kolpackov <boris@codesynthesis.com>
-# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC
-# license : MIT; see accompanying LICENSE file
-
-include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make
-
-cli := options.cli
-cxx := driver.cxx
-
-obj := $(addprefix $(out_base)/,$(cxx:.cxx=.o) $(cli:.cli=.o))
-dep := $(obj:.o=.o.d)
-
-driver := $(out_base)/driver
-install := $(out_base)/.install
-clean := $(out_base)/.clean
-
-# Build.
-#
-$(driver): $(obj)
-
-$(obj) $(dep): cpp_options := -I$(out_base)
-
-genf := $(cli:.cli=.hxx) $(cli:.cli=.ixx) $(cli:.cli=.cxx)
-gen := $(addprefix $(out_base)/,$(genf))
-
-$(gen): cli := $(out_root)/cli/cli
-$(gen): $(out_root)/cli/cli
-
-$(call include-dep,$(dep),$(obj),$(gen))
-
-# Convenience alias for default target.
-#
-$(out_base)/: $(driver)
-
-# Install
-#
-$(install): path := $(subst $(src_root)/,,$(src_base))
-$(install):
- $(call install-data,$(src_base)/driver.cxx,$(install_doc_dir)/cli/$(path)/driver.cxx)
- $(call install-data,$(src_base)/options.cli,$(install_doc_dir)/cli/$(path)/options.cli)
- $(call install-data,$(src_base)/README,$(install_doc_dir)/cli/$(path)/README)
-
-# Clean.
-#
-$(clean): $(driver).o.clean \
- $(addsuffix .cxx.clean,$(obj)) \
- $(addsuffix .cxx.clean,$(dep)) \
- $(addprefix $(out_base)/,$(cli:.cli=.cxx.cli.clean))
-
-# Generated .gitignore.
-#
-ifeq ($(out_base),$(src_base))
-$(gen): | $(out_base)/.gitignore
-$(driver): | $(out_base)/.gitignore
-
-$(out_base)/.gitignore: files := driver $(genf)
-$(clean): $(out_base)/.gitignore.clean
-
-$(call include,$(bld_root)/git/gitignore.make)
-endif
-
-# How to.
-#
-$(call include,$(bld_root)/cxx/o-e.make)
-$(call include,$(bld_root)/cxx/cxx-o.make)
-$(call include,$(bld_root)/cxx/cxx-d.make)
-$(call include,$(scf_root)/cli/cli-cxx.make)
-
-# Dependencies.
-#
-$(call import,$(src_root)/cli/makefile)