From ef4efbab2664232aa35b0111a6d430d2c67ababd Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 18 Jun 2012 15:28:15 +0200 Subject: Initial work on CLI port Add options files with all the documentation. Move documentation and usage to use the new approach. Finally get rid of dependency on libbackend-elements. --- build/import/cli/cli-cxx.make | 48 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 build/import/cli/cli-cxx.make (limited to 'build/import/cli/cli-cxx.make') diff --git a/build/import/cli/cli-cxx.make b/build/import/cli/cli-cxx.make new file mode 100644 index 0000000..cd009d9 --- /dev/null +++ b/build/import/cli/cli-cxx.make @@ -0,0 +1,48 @@ +# file : build/import/cli/cli-cxx.make +# copyright : Copyright (c) 2009-2012 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +# Here we are operating in the importing project's space, not in +# cli's. +# + +# Get the C++ file extensions. +# +$(call include,$(bld_root)/cxx/configuration-static.make) + +cli_pattern := \ +$(out_base)/%.$(cxx_s_suffix) \ +$(out_base)/%.$(cxx_h_suffix) \ +$(out_base)/%.$(cxx_i_suffix) + +$(cli_pattern): cli_options := \ +--hxx-suffix .$(cxx_h_suffix) \ +--ixx-suffix .$(cxx_i_suffix) \ +--cxx-suffix .$(cxx_s_suffix) + +.PRECIOUS: $(cli_pattern) + +ifeq ($(out_base),$(src_base)) + +$(cli_pattern): $(src_base)/%.cli + $(call message,cli $<,$(cli) $(cli_options) --output-dir $(dir $@) $<) + +else + +$(cli_pattern): $(src_base)/%.cli | $$(dir $$@). + $(call message,cli $<,$(cli) $(cli_options) --output-dir $(dir $@) $<) + +$(cli_pattern): $(out_base)/%.cli | $$(dir $$@). + $(call message,cli $<,$(cli) $(cli_options) --output-dir $(dir $@) $<) +endif + +.PHONY: $(out_base)/%.cxx.cli.clean + +$(out_base)/%.cxx.cli.clean: cxx_s_suffix := $(cxx_s_suffix) +$(out_base)/%.cxx.cli.clean: cxx_h_suffix := $(cxx_h_suffix) +$(out_base)/%.cxx.cli.clean: cxx_i_suffix := $(cxx_i_suffix) + +$(out_base)/%.cxx.cli.clean: + $(call message,rm $$1,rm -f $$1,$(@:.cxx.cli.clean=.$(cxx_s_suffix))) + $(call message,rm $$1,rm -f $$1,$(@:.cxx.cli.clean=.$(cxx_h_suffix))) + $(call message,rm $$1,rm -f $$1,$(@:.cxx.cli.clean=.$(cxx_i_suffix))) -- cgit v1.1