From be3dc4cee63da92cfa1fa44a0bf90ab11ec7aaca Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 15 Nov 2016 16:57:48 +0200 Subject: Start switch to build2 --- .gitignore | 25 +- README | 2 +- build/.gitignore | 1 + build/bootstrap.build | 18 ++ build/bootstrap.make | 86 ------ build/cli/cli-cxx.make | 46 --- build/export/cli/stub.make | 13 - build/import/cli/LICENSE | 1 - build/import/cli/cli-cxx.make | 49 ---- build/import/cli/configuration-rules.make | 15 - build/import/cli/configure | 55 ---- build/import/cli/stub.make | 30 -- build/import/libcutl/LICENSE | 21 -- build/import/libcutl/configuration-rules.make | 15 - build/import/libcutl/configure | 55 ---- build/import/libcutl/stub.make | 30 -- build/root.build | 22 ++ buildfile | 11 +- cli/.gitignore | 1 + cli/buildfile | 59 +++- cli/cli-8.0.sln | 20 -- cli/cli-8.0.vcproj | 391 -------------------------- cli/cli-9.0.sln | 20 -- cli/cli-9.0.vcproj | 377 ------------------------- cli/cli.cxx | 12 +- cli/context.cxx | 2 +- cli/context.hxx | 6 +- cli/generator.cxx | 24 +- cli/generator.hxx | 4 +- cli/header.cxx | 2 +- cli/header.hxx | 2 +- cli/html.cxx | 2 +- cli/html.hxx | 2 +- cli/inline.cxx | 2 +- cli/inline.hxx | 2 +- cli/lexer.cxx | 2 +- cli/lexer.hxx | 4 +- cli/makefile | 108 ------- cli/man.cxx | 2 +- cli/man.hxx | 2 +- cli/name-processor.cxx | 4 +- cli/name-processor.hxx | 2 +- cli/option-types.cxx | 2 +- cli/options.cli | 2 +- cli/options.cxx | 2 +- cli/options.hxx | 4 +- cli/parser.cxx | 53 ++-- cli/parser.hxx | 8 +- cli/runtime-header.cxx | 2 +- cli/runtime-header.hxx | 2 +- cli/runtime-inline.cxx | 2 +- cli/runtime-inline.hxx | 2 +- cli/runtime-source.cxx | 2 +- cli/runtime-source.hxx | 2 +- cli/semantics.hxx | 14 +- cli/semantics/class.cxx | 2 +- cli/semantics/class.hxx | 2 +- cli/semantics/doc.cxx | 2 +- cli/semantics/doc.hxx | 2 +- cli/semantics/elements.cxx | 2 +- cli/semantics/expression.cxx | 2 +- cli/semantics/expression.hxx | 2 +- cli/semantics/namespace.cxx | 2 +- cli/semantics/namespace.hxx | 2 +- cli/semantics/option.cxx | 2 +- cli/semantics/option.hxx | 2 +- cli/semantics/unit.cxx | 2 +- cli/semantics/unit.hxx | 6 +- cli/source.cxx | 4 +- cli/source.hxx | 2 +- cli/token.hxx | 2 +- cli/traversal.hxx | 14 +- cli/traversal/class.cxx | 2 +- cli/traversal/class.hxx | 4 +- cli/traversal/doc.hxx | 4 +- cli/traversal/elements.cxx | 2 +- cli/traversal/elements.hxx | 2 +- cli/traversal/expression.hxx | 4 +- cli/traversal/namespace.cxx | 2 +- cli/traversal/namespace.hxx | 4 +- cli/traversal/option.cxx | 4 +- cli/traversal/option.hxx | 4 +- cli/traversal/unit.cxx | 2 +- cli/traversal/unit.hxx | 4 +- cli/txt.cxx | 2 +- cli/txt.hxx | 2 +- examples/examples-8.0.sln | 32 --- examples/examples-9.0.sln | 32 --- examples/features/features-8.0.vcproj | 237 ---------------- examples/features/features-9.0.vcproj | 233 --------------- examples/file/file-8.0.vcproj | 237 ---------------- examples/file/file-9.0.vcproj | 233 --------------- examples/hello/hello-8.0.vcproj | 237 ---------------- examples/hello/hello-9.0.vcproj | 233 --------------- examples/makefile | 19 -- makefile | 48 ---- manifest | 14 + tests/makefile | 18 -- 98 files changed, 271 insertions(+), 3040 deletions(-) create mode 100644 build/.gitignore delete mode 100644 build/bootstrap.make delete mode 100644 build/cli/cli-cxx.make delete mode 100644 build/export/cli/stub.make delete mode 120000 build/import/cli/LICENSE delete mode 100644 build/import/cli/cli-cxx.make delete mode 100644 build/import/cli/configuration-rules.make delete mode 100755 build/import/cli/configure delete mode 100644 build/import/cli/stub.make delete mode 100644 build/import/libcutl/LICENSE delete mode 100644 build/import/libcutl/configuration-rules.make delete mode 100755 build/import/libcutl/configure delete mode 100644 build/import/libcutl/stub.make create mode 100644 cli/.gitignore delete mode 100644 cli/cli-8.0.sln delete mode 100644 cli/cli-8.0.vcproj delete mode 100644 cli/cli-9.0.sln delete mode 100644 cli/cli-9.0.vcproj delete mode 100644 cli/makefile delete mode 100644 examples/examples-8.0.sln delete mode 100644 examples/examples-9.0.sln delete mode 100644 examples/features/features-8.0.vcproj delete mode 100644 examples/features/features-9.0.vcproj delete mode 100644 examples/file/file-8.0.vcproj delete mode 100644 examples/file/file-9.0.vcproj delete mode 100644 examples/hello/hello-8.0.vcproj delete mode 100644 examples/hello/hello-9.0.vcproj delete mode 100644 examples/makefile delete mode 100644 makefile create mode 100644 manifest delete mode 100644 tests/makefile diff --git a/.gitignore b/.gitignore index d4c59ec..01994ef 100644 --- a/.gitignore +++ b/.gitignore @@ -1,22 +1,13 @@ # Compiler/linker output. # +*.d *.o -*.o.d +*.obj *.so +*.dll *.a -*.l -*.l.cpp-options - -# Generated documentation. -# -*.pdf -*.ps - -# Generated build system files. -# -*-dynamic.make -config.build - -# Generated .gitignore files. -# -.gitignore +*.lib +*.exp +*.exe +*.exe.dlls/ +*.exe.manifest diff --git a/README b/README index 2404043..d2c6a02 100644 --- a/README +++ b/README @@ -11,5 +11,5 @@ See the doc/ directory for documentation. The project page is at http://codesynthesis.com/projects/cli/. -Send questions, bug reports, or any other feedback to +Send questions, bug reports, or any other feedback to cli-users@codesynthesis.com. diff --git a/build/.gitignore b/build/.gitignore new file mode 100644 index 0000000..225c27f --- /dev/null +++ b/build/.gitignore @@ -0,0 +1 @@ +config.build diff --git a/build/bootstrap.build b/build/bootstrap.build index 262791b..7c5dd61 100644 --- a/build/bootstrap.build +++ b/build/bootstrap.build @@ -1,2 +1,20 @@ +# file : build/bootstrap.build +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + project = cli + +using build@0.4.0 + +version = 1.2.0-a2 +revision = 0 + +dist.package = $project-$version + +if ($revision != 0) + dist.package += +$revision + using config +using dist +using test +using install diff --git a/build/bootstrap.make b/build/bootstrap.make deleted file mode 100644 index 97c276a..0000000 --- a/build/bootstrap.make +++ /dev/null @@ -1,86 +0,0 @@ -# file : build/bootstrap.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -project_name := cli - -# First try to include the bundled bootstrap.make if it exist. If that -# fails, let make search for the external bootstrap.make. -# -build := build-0.3 - --include $(dir $(lastword $(MAKEFILE_LIST)))../../$(build)/bootstrap.make - -ifeq ($(patsubst %build/bootstrap.make,,$(lastword $(MAKEFILE_LIST))),) -include $(build)/bootstrap.make -endif - -def_goal := $(.DEFAULT_GOAL) - -# Include C++ configuration. We need to know if we are using the generic -# C++ compiler in which case we need to compensate for missing dependency -# auto-generation (see below). -# -$(call include,$(bld_root)/cxx/configuration.make) - -# Aliases -# -.PHONY: $(out_base)/ \ - $(out_base)/.test \ - $(out_base)/.install \ - $(out_base)/.clean \ - $(out_base)/.cleandoc - -ifdef %interactive% - -.PHONY: test install clean cleandoc - -test: $(out_base)/.test -install: $(out_base)/.install -clean: $(out_base)/.clean -cleandoc: $(out_base)/.cleandoc - -endif - -# If we don't have dependency auto-generation then we need to manually -# make sure that CLI files are compiled before C++ file. To do this we -# make the object files ($2) depend in order-only on generated files -# ($3). -# -ifeq ($(cxx_id),generic) - -define include-dep -$(if $2,$(eval $2: | $3)) -endef - -else - -define include-dep -$(call -include,$1) -endef - -endif - - -# Don't include dependency info for certain targets. -# -ifneq ($(filter $(MAKECMDGOALS),clean cleandoc disfigure),) -include-dep = -endif - -# For install, don't include dependecies in examples, and tests. -# -ifneq ($(filter $(MAKECMDGOALS),install),) - -ifneq ($(subst $(src_root)/tests/,,$(src_base)),$(src_base)) -include-dep = -endif - -ifneq ($(subst $(src_root)/examples/,,$(src_base)),$(src_base)) -include-dep = -endif - -endif - -.DEFAULT_GOAL := $(def_goal) diff --git a/build/cli/cli-cxx.make b/build/cli/cli-cxx.make deleted file mode 100644 index 263f6f3..0000000 --- a/build/cli/cli-cxx.make +++ /dev/null @@ -1,46 +0,0 @@ -# file : build/cli/cli-cxx.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -# 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 := cli -$(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))) diff --git a/build/export/cli/stub.make b/build/export/cli/stub.make deleted file mode 100644 index 70e3641..0000000 --- a/build/export/cli/stub.make +++ /dev/null @@ -1,13 +0,0 @@ -# file : build/export/cli/stub.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -$(call include-once,$(src_root)/cli/makefile,$(out_root)) - -# Use the rules file from cli's import directory instead of the -# importing project's one. -# -$(call export,\ - cli: $(out_root)/cli/cli,\ - cli-rules: $(scf_root)/import/cli/cli-cxx.make) diff --git a/build/import/cli/LICENSE b/build/import/cli/LICENSE deleted file mode 120000 index 5853aae..0000000 --- a/build/import/cli/LICENSE +++ /dev/null @@ -1 +0,0 @@ -../../../LICENSE \ No newline at end of file diff --git a/build/import/cli/cli-cxx.make b/build/import/cli/cli-cxx.make deleted file mode 100644 index 5d4293e..0000000 --- a/build/import/cli/cli-cxx.make +++ /dev/null @@ -1,49 +0,0 @@ -# file : build/import/cli/cli-cxx.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 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))) diff --git a/build/import/cli/configuration-rules.make b/build/import/cli/configuration-rules.make deleted file mode 100644 index e5a77f2..0000000 --- a/build/import/cli/configuration-rules.make +++ /dev/null @@ -1,15 +0,0 @@ -# file : build/import/cli/configuration-rules.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -$(dcf_root)/import/cli/configuration-dynamic.make: | $(dcf_root)/import/cli/. - $(call message,,$(scf_root)/import/cli/configure $@) - -ifndef %foreign% - -$(dcf_root)/.disfigure:: - $(call message,rm $(dcf_root)/import/cli/configuration-dynamic.make,\ -rm -f $(dcf_root)/import/cli/configuration-dynamic.make) - -endif diff --git a/build/import/cli/configure b/build/import/cli/configure deleted file mode 100755 index 612301c..0000000 --- a/build/import/cli/configure +++ /dev/null @@ -1,55 +0,0 @@ -#! /usr/bin/env bash - -# file : build/import/cli/configure -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - - -# $1 - out file -# -# bld_root - build root -# project_name - project name -# - -source $bld_root/dialog.bash - - -$echo -$echo "Configuring external dependency on 'cli' for '$project_name'." -$echo - -$echo -$echo "Would you like to configure dependency on the installed " -$echo "version of 'cli' as opposed to the development build?" -$echo - -installed=`read_y_n y` - -path= - -if [ "$installed" = "n" ]; then - -$echo -$echo "Please enter the src_root for 'cli'." -$echo - -src_root=`read_path --directory --exist` - -$echo -$echo "Please enter the out_root for 'cli'." -$eche - -out_root=`read_path --directory $src_root` - -fi - -echo cli_installed := $installed >$1 - -if [ "$installed" = "n" ]; then - -echo src_root := $src_root >>$1 -echo scf_root := \$\(src_root\)/build >>$1 -echo out_root := $out_root >>$1 - -fi diff --git a/build/import/cli/stub.make b/build/import/cli/stub.make deleted file mode 100644 index 20cf45a..0000000 --- a/build/import/cli/stub.make +++ /dev/null @@ -1,30 +0,0 @@ -# file : build/import/cli/stub.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -$(call include-once,$(scf_root)/import/cli/configuration-rules.make,$(dcf_root)) - -cli_installed := - -$(call -include,$(dcf_root)/import/cli/configuration-dynamic.make) - -ifdef cli_installed - -ifeq ($(cli_installed),y) - -$(call export,cli: cli,cli-rules: $(scf_root)/import/cli/cli-cxx.make) - -else - -# Include export stub. -# -$(call include,$(scf_root)/export/cli/stub.make) - -endif - -else - -.NOTPARALLEL: - -endif diff --git a/build/import/libcutl/LICENSE b/build/import/libcutl/LICENSE deleted file mode 100644 index 5306eea..0000000 --- a/build/import/libcutl/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -Copyright (c) Code Synthesis Tools CC, 2009. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -"Software"), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/build/import/libcutl/configuration-rules.make b/build/import/libcutl/configuration-rules.make deleted file mode 100644 index db255d0..0000000 --- a/build/import/libcutl/configuration-rules.make +++ /dev/null @@ -1,15 +0,0 @@ -# file : build/import/libcutl/configuration-rules.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -$(dcf_root)/import/libcutl/configuration-dynamic.make: | $(dcf_root)/import/libcutl/. - $(call message,,$(scf_root)/import/libcutl/configure $@) - -ifndef %foreign% - -$(dcf_root)/.disfigure:: - $(call message,rm $(dcf_root)/import/libcutl/configuration-dynamic.make,\ -rm -f $(dcf_root)/import/libcutl/configuration-dynamic.make) - -endif diff --git a/build/import/libcutl/configure b/build/import/libcutl/configure deleted file mode 100755 index 6bcd346..0000000 --- a/build/import/libcutl/configure +++ /dev/null @@ -1,55 +0,0 @@ -#! /usr/bin/env bash - -# file : build/import/libcutl/configure -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - - -# $1 - out file -# -# bld_root - build root -# project_name - project name -# - -source $bld_root/dialog.bash - - -$echo -$echo "Configuring external dependency on 'libcutl' for '$project_name'." -$echo - -$echo -$echo "Would you like to configure dependency on the installed " -$echo "version of 'libcutl' as opposed to the development build?" -$echo - -installed=`read_y_n y` - -path= - -if [ "$installed" = "n" ]; then - -$echo -$echo "Please enter the src_root for 'libcutl'." -$echo - -src_root=`read_path --directory --exist` - -$echo -$echo "Please enter the out_root for 'libcutl'." -$echo - -out_root=`read_path --directory $src_root` - -fi - -echo libcutl_installed := $installed >$1 - -if [ "$installed" = "n" ]; then - -echo src_root := $src_root >>$1 -echo scf_root := \$\(src_root\)/build >>$1 -echo out_root := $out_root >>$1 - -fi diff --git a/build/import/libcutl/stub.make b/build/import/libcutl/stub.make deleted file mode 100644 index ab3d051..0000000 --- a/build/import/libcutl/stub.make +++ /dev/null @@ -1,30 +0,0 @@ -# file : build/import/libcutl/stub.make -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -$(call include-once,$(scf_root)/import/libcutl/configuration-rules.make,$(dcf_root)) - -libcutl_installed := - -$(call -include,$(dcf_root)/import/libcutl/configuration-dynamic.make) - -ifdef libcutl_installed - -ifeq ($(libcutl_installed),y) - -$(call export,l: -lcutl,cpp-options: ) - -else - -# Include export stub. -# -$(call include,$(scf_root)/export/libcutl/stub.make) - -endif - -else - -.NOTPARALLEL: - -endif diff --git a/build/root.build b/build/root.build index 3caf259..fd29507 100644 --- a/build/root.build +++ b/build/root.build @@ -1,6 +1,28 @@ +# file : build/root.build +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + +cxx.std = 14 + using cxx hxx{*}: extension = hxx ixx{*}: extension = ixx txx{*}: extension = txx cxx{*}: extension = cxx + +cxx.poptions =+ -I$out_root -I$src_root + +# Load the cli module but only if it's available. This way a distribution +# that includes pre-generated files can be built without installing cli. +# This is also the reason why we need to explicitly spell out individual +# source files instead of using the cli.cxx{} group (it won't be there +# unless the module is configured). +# +using? cli + +if! $cli.configured +{ + define cli: file + cli{*}: extension = cli +} diff --git a/buildfile b/buildfile index c5076e9..a4a8411 100644 --- a/buildfile +++ b/buildfile @@ -1,3 +1,12 @@ +# file : buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + d = cli/ -.: $d +./: $d doc{INSTALL LICENSE NEWS README version} file{manifest} include $d + +# Don't install tests or the INSTALL file. +# +dir{tests/}: install = false +doc{INSTALL}@./: install = false diff --git a/cli/.gitignore b/cli/.gitignore new file mode 100644 index 0000000..573c0c4 --- /dev/null +++ b/cli/.gitignore @@ -0,0 +1 @@ +cli diff --git a/cli/buildfile b/cli/buildfile index 95f5d14..e50cac9 100644 --- a/cli/buildfile +++ b/cli/buildfile @@ -1,10 +1,57 @@ +# file : buildfile +# copyright : Copyright (c) 2009-2013 Code Synthesis Tools CC +# license : MIT; see accompanying LICENSE file + import libs = libcutl%lib{cutl} -sema = semantics/{class doc elements expression namespace option unit} -trav = traversal/{class elements namespace option unit} +exe{cli}: \ + { cxx}{ cli } \ + {hxx cxx}{ context } \ + {hxx cxx}{ generator } \ + {hxx cxx}{ header } \ + {hxx cxx}{ html } \ + {hxx cxx}{ inline } \ + {hxx ixx cxx}{ lexer } \ + {hxx cxx}{ man } \ + {hxx cxx}{ name-processor } \ + {hxx ixx cxx}{ options } \ + {hxx cxx}{ option-types } \ + {hxx cxx}{ parser } \ + {hxx cxx}{ runtime-header } \ + {hxx cxx}{ runtime-inline } \ + {hxx cxx}{ runtime-source } \ + {hxx }{ semantics } \ + {hxx cxx}{ source } \ + {hxx ixx }{ token } \ + {hxx }{ traversal } \ + {hxx cxx}{ txt } \ +semantics/{hxx cxx}{ class } \ +semantics/{hxx cxx}{ doc } \ +semantics/{hxx cxx}{ elements } \ +semantics/{hxx cxx}{ expression } \ +semantics/{hxx cxx}{ namespace } \ +semantics/{hxx cxx}{ option } \ +semantics/{hxx txx cxx}{ unit } \ +traversal/{hxx cxx}{ class } \ +traversal/{hxx }{ doc } \ +traversal/{hxx cxx}{ elements } \ +traversal/{hxx }{ expression } \ +traversal/{hxx cxx}{ namespace } \ +traversal/{hxx cxx}{ option } \ +traversal/{hxx cxx}{ unit } \ + $libs + +# Generated options parser. +# +{hxx ixx cxx}{options}: cli{options} -exe{cli}: cxx{cli generator html lexer name-processor parser runtime-inline \ -source context header inline man options runtime-header runtime-source \ -txt option-types $sema $trav} $libs +if $cli.configured +{ + cli.options += -I $src_root --include-with-brackets --include-prefix cli \ +--guard-prefix CLI --generate-file-scanner --generate-specifier \ +--reserved-name stdout +} -cxx.poptions += -I$out_base -I$src_base +# Include generated cli files into the distribution. +# +{hxx ixx cxx}{options}: dist = true diff --git a/cli/cli-8.0.sln b/cli/cli-8.0.sln deleted file mode 100644 index 42fc1e0..0000000 --- a/cli/cli-8.0.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cli", "cli-8.0.vcproj", "{FEAC6729-67CD-410A-83F2-E6258FA2301F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {FEAC6729-67CD-410A-83F2-E6258FA2301F}.Debug|Win32.ActiveCfg = Debug|Win32 - {FEAC6729-67CD-410A-83F2-E6258FA2301F}.Debug|Win32.Build.0 = Debug|Win32 - {FEAC6729-67CD-410A-83F2-E6258FA2301F}.Release|Win32.ActiveCfg = Release|Win32 - {FEAC6729-67CD-410A-83F2-E6258FA2301F}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/cli/cli-8.0.vcproj b/cli/cli-8.0.vcproj deleted file mode 100644 index f2121d3..0000000 --- a/cli/cli-8.0.vcproj +++ /dev/null @@ -1,391 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cli/cli-9.0.sln b/cli/cli-9.0.sln deleted file mode 100644 index 57aa4e1..0000000 --- a/cli/cli-9.0.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cli", "cli-9.0.vcproj", "{E1FC87B8-F4C2-401B-90DF-436A228F7260}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {E1FC87B8-F4C2-401B-90DF-436A228F7260}.Debug|Win32.ActiveCfg = Debug|Win32 - {E1FC87B8-F4C2-401B-90DF-436A228F7260}.Debug|Win32.Build.0 = Debug|Win32 - {E1FC87B8-F4C2-401B-90DF-436A228F7260}.Release|Win32.ActiveCfg = Release|Win32 - {E1FC87B8-F4C2-401B-90DF-436A228F7260}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/cli/cli-9.0.vcproj b/cli/cli-9.0.vcproj deleted file mode 100644 index 51ae1b1..0000000 --- a/cli/cli-9.0.vcproj +++ /dev/null @@ -1,377 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cli/cli.cxx b/cli/cli.cxx index cf4676f..5adca18 100644 --- a/cli/cli.cxx +++ b/cli/cli.cxx @@ -5,17 +5,17 @@ #include #include -#include // std::auto_ptr +#include // unique_ptr #include #include #include -#include +#include -#include "options.hxx" -#include "parser.hxx" -#include "generator.hxx" +#include +#include +#include using namespace std; using namespace cutl; @@ -97,7 +97,7 @@ main (int argc, char* argv[]) // Parse and generate. // parser p (include_paths); - auto_ptr unit (p.parse (ifs, path)); + unique_ptr unit (p.parse (ifs, path)); // Merge documentation variables from the command line. // diff --git a/cli/context.cxx b/cli/context.cxx index a051000..7cec6e3 100644 --- a/cli/context.cxx +++ b/cli/context.cxx @@ -10,7 +10,7 @@ #include #include -#include "context.hxx" +#include using namespace std; diff --git a/cli/context.hxx b/cli/context.hxx index cd83421..553a256 100644 --- a/cli/context.hxx +++ b/cli/context.hxx @@ -17,9 +17,9 @@ #include #include -#include "options.hxx" -#include "semantics.hxx" -#include "traversal.hxx" +#include +#include +#include using std::endl; diff --git a/cli/generator.cxx b/cli/generator.cxx index 3a0a55b..f5f572e 100644 --- a/cli/generator.cxx +++ b/cli/generator.cxx @@ -13,21 +13,21 @@ #include #include -#include "header.hxx" -#include "inline.hxx" -#include "source.hxx" +#include +#include +#include -#include "runtime-header.hxx" -#include "runtime-inline.hxx" -#include "runtime-source.hxx" +#include +#include +#include -#include "man.hxx" -#include "html.hxx" -#include "txt.hxx" +#include +#include +#include -#include "context.hxx" -#include "generator.hxx" -#include "name-processor.hxx" +#include +#include +#include using namespace std; using namespace cutl; diff --git a/cli/generator.hxx b/cli/generator.hxx index c892f96..d74def8 100644 --- a/cli/generator.hxx +++ b/cli/generator.hxx @@ -6,8 +6,8 @@ #ifndef CLI_GENERATOR_HXX #define CLI_GENERATOR_HXX -#include "options.hxx" -#include "semantics/unit.hxx" +#include +#include class generator { diff --git a/cli/header.cxx b/cli/header.cxx index 4286df6..41bdab5 100644 --- a/cli/header.cxx +++ b/cli/header.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include "header.hxx" +#include using namespace std; diff --git a/cli/header.hxx b/cli/header.hxx index defb344..780a478 100644 --- a/cli/header.hxx +++ b/cli/header.hxx @@ -6,7 +6,7 @@ #ifndef CLI_HEADER_HXX #define CLI_HEADER_HXX -#include "context.hxx" +#include void generate_header (context&); diff --git a/cli/html.cxx b/cli/html.cxx index 2d018e0..be68588 100644 --- a/cli/html.cxx +++ b/cli/html.cxx @@ -6,7 +6,7 @@ #include #include -#include "html.hxx" +#include using namespace std; diff --git a/cli/html.hxx b/cli/html.hxx index 93708f8..0015381 100644 --- a/cli/html.hxx +++ b/cli/html.hxx @@ -6,7 +6,7 @@ #ifndef CLI_HTML_HXX #define CLI_HTML_HXX -#include "context.hxx" +#include void generate_html (context&); diff --git a/cli/inline.cxx b/cli/inline.cxx index bb54962..268655b 100644 --- a/cli/inline.cxx +++ b/cli/inline.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include "inline.hxx" +#include namespace { diff --git a/cli/inline.hxx b/cli/inline.hxx index 90986c5..28f3428 100644 --- a/cli/inline.hxx +++ b/cli/inline.hxx @@ -6,7 +6,7 @@ #ifndef CLI_INLINE_HXX #define CLI_INLINE_HXX -#include "context.hxx" +#include void generate_inline (context&); diff --git a/cli/lexer.cxx b/cli/lexer.cxx index 02be745..59281a7 100644 --- a/cli/lexer.cxx +++ b/cli/lexer.cxx @@ -5,7 +5,7 @@ #include -#include "lexer.hxx" +#include using namespace std; diff --git a/cli/lexer.hxx b/cli/lexer.hxx index 830860c..56d98de 100644 --- a/cli/lexer.hxx +++ b/cli/lexer.hxx @@ -12,7 +12,7 @@ #include // std::size_t #include -#include "token.hxx" +#include class lexer { @@ -138,6 +138,6 @@ private: bool unget_; }; -#include "lexer.ixx" +#include #endif // CLI_LEXER_HXX diff --git a/cli/makefile b/cli/makefile deleted file mode 100644 index 3c99e19..0000000 --- a/cli/makefile +++ /dev/null @@ -1,108 +0,0 @@ -# file : cli/makefile -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make - -cxx_tun := cli.cxx lexer.cxx parser.cxx - -cxx_tun += \ -option-types.cxx \ -options.cxx \ -context.cxx \ -header.cxx \ -inline.cxx \ -source.cxx \ -runtime-header.cxx \ -runtime-inline.cxx \ -runtime-source.cxx \ -man.cxx \ -html.cxx \ -txt.cxx \ -generator.cxx \ -name-processor.cxx - -cxx_tun += \ -semantics/class.cxx \ -semantics/doc.cxx \ -semantics/elements.cxx \ -semantics/expression.cxx \ -semantics/namespace.cxx \ -semantics/option.cxx \ -semantics/unit.cxx - -cxx_tun += \ -traversal/class.cxx \ -traversal/elements.cxx \ -traversal/namespace.cxx \ -traversal/option.cxx \ -traversal/unit.cxx - -cli_tun := options.cli - -# -# -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o) $(cli_tun:.cli=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -cli := $(out_base)/cli -clean := $(out_base)/.clean -install := $(out_base)/.install - -# Import. -# -$(call import,\ - $(scf_root)/import/libcutl/stub.make,\ - l: cutl.l,cpp-options: cutl.l.cpp-options) - -# Build. -# -$(cli): $(cxx_obj) $(cutl.l) - -$(cxx_obj) $(cxx_od): cpp_options := -I$(src_base) -I$(out_base) -$(cxx_obj) $(cxx_od): $(cutl.l.cpp-options) - -genf := $(cli_tun:.cli=.hxx) $(cli_tun:.cli=.ixx) $(cli_tun:.cli=.cxx) -gen := $(addprefix $(out_base)/,$(genf)) - -$(gen): cli := $(out_root)/cli/cli -$(gen): cli_options += --generate-file-scanner --generate-specifier \ ---guard-prefix CLI --reserved-name stdout - -$(call include-dep,$(cxx_od),$(cxx_obj),$(gen)) - -# Alias for default target. -# -$(out_base)/: $(cli) - -# Install. -# -$(install): $(cli) - $(call install-exec,$<,$(install_bin_dir)/cli) - -# Clean. -# -$(clean): \ - $(cli).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - -# Generated .gitignore. -# -ifeq ($(out_base),$(src_base)) -$(cli): | $(out_base)/.gitignore - -$(out_base)/.gitignore: files := cli -$(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) -$(call include,$(bld_root)/install.make) diff --git a/cli/man.cxx b/cli/man.cxx index e55bc17..9008d7f 100644 --- a/cli/man.cxx +++ b/cli/man.cxx @@ -6,7 +6,7 @@ #include #include -#include "man.hxx" +#include using namespace std; diff --git a/cli/man.hxx b/cli/man.hxx index 71d8154..838622a 100644 --- a/cli/man.hxx +++ b/cli/man.hxx @@ -6,7 +6,7 @@ #ifndef CLI_MAN_HXX #define CLI_MAN_HXX -#include "context.hxx" +#include void generate_man (context&); diff --git a/cli/name-processor.cxx b/cli/name-processor.cxx index a0e3e02..7ac54e3 100644 --- a/cli/name-processor.cxx +++ b/cli/name-processor.cxx @@ -6,8 +6,8 @@ #include #include -#include "context.hxx" -#include "name-processor.hxx" +#include +#include using namespace std; diff --git a/cli/name-processor.hxx b/cli/name-processor.hxx index 63f262f..2cc4b99 100644 --- a/cli/name-processor.hxx +++ b/cli/name-processor.hxx @@ -6,7 +6,7 @@ #ifndef CLI_NAME_PROCESSOR_HXX #define CLI_NAME_PROCESSOR_HXX -#include "context.hxx" +#include void process_names (context&); diff --git a/cli/option-types.cxx b/cli/option-types.cxx index b3bc6ad..b51a8a0 100644 --- a/cli/option-types.cxx +++ b/cli/option-types.cxx @@ -5,7 +5,7 @@ #include -#include "option-types.hxx" +#include using namespace std; diff --git a/cli/options.cli b/cli/options.cli index 8b9ff5f..97b4429 100644 --- a/cli/options.cli +++ b/cli/options.cli @@ -12,7 +12,7 @@ include ; include ; include ; -include "option-types.hxx"; +include ; class options { diff --git a/cli/options.cxx b/cli/options.cxx index 1511b1c..43f271b 100644 --- a/cli/options.cxx +++ b/cli/options.cxx @@ -9,7 +9,7 @@ // // End prologue. -#include "options.hxx" +#include #include #include diff --git a/cli/options.hxx b/cli/options.hxx index f47fa3c..cc9d897 100644 --- a/cli/options.hxx +++ b/cli/options.hxx @@ -352,7 +352,7 @@ namespace cli #include -#include "option-types.hxx" +#include class options { @@ -914,7 +914,7 @@ class options bool options_file_specified_; }; -#include "options.ixx" +#include // Begin epilogue. // diff --git a/cli/parser.cxx b/cli/parser.cxx index 43b2764..d8c11c5 100644 --- a/cli/parser.cxx +++ b/cli/parser.cxx @@ -3,23 +3,48 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include // stat -#include // stat -#include // stat +#ifndef _WIN32 +# include // stat +# include // stat +# include // stat +#else +# include // _stat +# include // _stat(), S_I* + +# ifdef _MSC_VER // Unlikely to be fixed in newer versions. +# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +# endif +#endif #include #include #include -#include "token.hxx" -#include "lexer.hxx" -#include "parser.hxx" +#include +#include +#include -#include "semantics.hxx" +#include using namespace std; using namespace semantics; +// Check that the file exist without checking for permissions, etc. +// +inline static bool +file_exists (const path& p) +{ +#ifndef _WIN32 + struct stat s; + int r (stat (p.string ().c_str (), &s)); +#else + struct _stat s; + int r (_stat (p.string ().c_str (), &s)); +#endif + + return r == 0 && S_ISREG (s.st_mode); +} + const char* keywords[] = { "include", @@ -160,10 +185,10 @@ recover (token& t) } } -auto_ptr parser:: +unique_ptr parser:: parse (std::istream& is, path const& p) { - auto_ptr unit (new cli_unit (p, 1, 1)); + unique_ptr unit (new cli_unit (p, 1, 1)); { path ap (p); @@ -303,16 +328,13 @@ source_decl () // else { - struct stat s; for (paths::const_iterator i (include_paths_.begin ()); i != include_paths_.end (); ++i) { p = *i / f; p.normalize (); - // Check that the file exist without checking for permissions, etc. - // - if (stat (p.string ().c_str (), &s) == 0 && S_ISREG (s.st_mode)) + if (file_exists (p)) break; p.clear (); @@ -421,16 +443,13 @@ include_decl () // else { - struct stat s; for (paths::const_iterator i (include_paths_.begin ()); i != include_paths_.end (); ++i) { p = *i / f; p.normalize (); - // Check that the file exist without checking for permissions, etc. - // - if (stat (p.string ().c_str (), &s) == 0 && S_ISREG (s.st_mode)) + if (file_exists (p)) break; p.clear (); diff --git a/cli/parser.hxx b/cli/parser.hxx index 767b8da..69ae6e2 100644 --- a/cli/parser.hxx +++ b/cli/parser.hxx @@ -9,12 +9,12 @@ #include #include #include -#include // auto_ptr +#include // unique_ptr #include // size_t #include -#include "semantics/elements.hxx" -#include "semantics/unit.hxx" +#include +#include class token; class lexer; @@ -28,7 +28,7 @@ public: struct invalid_input {}; - std::auto_ptr + std::unique_ptr parse (std::istream& is, semantics::path const& path); private: diff --git a/cli/runtime-header.cxx b/cli/runtime-header.cxx index 50281fa..696f1db 100644 --- a/cli/runtime-header.cxx +++ b/cli/runtime-header.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include "runtime-header.hxx" +#include using namespace std; diff --git a/cli/runtime-header.hxx b/cli/runtime-header.hxx index 5c7d41f..83b4be1 100644 --- a/cli/runtime-header.hxx +++ b/cli/runtime-header.hxx @@ -6,7 +6,7 @@ #ifndef CLI_RUNTIME_HEADER_HXX #define CLI_RUNTIME_HEADER_HXX -#include "context.hxx" +#include void generate_runtime_header (context&); diff --git a/cli/runtime-inline.cxx b/cli/runtime-inline.cxx index 2774ee7..dffbb7d 100644 --- a/cli/runtime-inline.cxx +++ b/cli/runtime-inline.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include "runtime-inline.hxx" +#include using namespace std; diff --git a/cli/runtime-inline.hxx b/cli/runtime-inline.hxx index 191d756..c77c7d0 100644 --- a/cli/runtime-inline.hxx +++ b/cli/runtime-inline.hxx @@ -6,7 +6,7 @@ #ifndef CLI_RUNTIME_INLINE_HXX #define CLI_RUNTIME_INLINE_HXX -#include "context.hxx" +#include void generate_runtime_inline (context&); diff --git a/cli/runtime-source.cxx b/cli/runtime-source.cxx index 30f08b0..0570e73 100644 --- a/cli/runtime-source.cxx +++ b/cli/runtime-source.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include "runtime-source.hxx" +#include using namespace std; diff --git a/cli/runtime-source.hxx b/cli/runtime-source.hxx index 8300c9a..694353a 100644 --- a/cli/runtime-source.hxx +++ b/cli/runtime-source.hxx @@ -6,7 +6,7 @@ #ifndef CLI_RUNTIME_SOURCE_HXX #define CLI_RUNTIME_SOURCE_HXX -#include "context.hxx" +#include void generate_runtime_source (context&, bool complete); diff --git a/cli/semantics.hxx b/cli/semantics.hxx index 3f9d61b..3d6cc73 100644 --- a/cli/semantics.hxx +++ b/cli/semantics.hxx @@ -6,12 +6,12 @@ #ifndef CLI_SEMANTICS_HXX #define CLI_SEMANTICS_HXX -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #endif // CLI_SEMANTICS_HXX diff --git a/cli/semantics/class.cxx b/cli/semantics/class.cxx index 9a6fc85..f0a98d8 100644 --- a/cli/semantics/class.cxx +++ b/cli/semantics/class.cxx @@ -5,7 +5,7 @@ #include -#include +#include namespace semantics { diff --git a/cli/semantics/class.hxx b/cli/semantics/class.hxx index f5f12c8..3a6bc00 100644 --- a/cli/semantics/class.hxx +++ b/cli/semantics/class.hxx @@ -8,7 +8,7 @@ #include -#include +#include namespace semantics { diff --git a/cli/semantics/doc.cxx b/cli/semantics/doc.cxx index 4b2f9b4..f8670b4 100644 --- a/cli/semantics/doc.cxx +++ b/cli/semantics/doc.cxx @@ -5,7 +5,7 @@ #include -#include +#include namespace semantics { diff --git a/cli/semantics/doc.hxx b/cli/semantics/doc.hxx index 4fca4e8..22bdc17 100644 --- a/cli/semantics/doc.hxx +++ b/cli/semantics/doc.hxx @@ -6,7 +6,7 @@ #ifndef CLI_SEMANTICS_DOC_HXX #define CLI_SEMANTICS_DOC_HXX -#include +#include namespace semantics { diff --git a/cli/semantics/elements.cxx b/cli/semantics/elements.cxx index 3e87248..b0550b9 100644 --- a/cli/semantics/elements.cxx +++ b/cli/semantics/elements.cxx @@ -5,7 +5,7 @@ #include -#include +#include namespace semantics { diff --git a/cli/semantics/expression.cxx b/cli/semantics/expression.cxx index 0bd9fe9..cd42244 100644 --- a/cli/semantics/expression.cxx +++ b/cli/semantics/expression.cxx @@ -5,7 +5,7 @@ #include -#include +#include namespace semantics { diff --git a/cli/semantics/expression.hxx b/cli/semantics/expression.hxx index 18ba2de..af44886 100644 --- a/cli/semantics/expression.hxx +++ b/cli/semantics/expression.hxx @@ -7,7 +7,7 @@ #define CLI_SEMANTICS_EXPRESSION_HXX #include -#include +#include namespace semantics { diff --git a/cli/semantics/namespace.cxx b/cli/semantics/namespace.cxx index 3947578..5c9228a 100644 --- a/cli/semantics/namespace.cxx +++ b/cli/semantics/namespace.cxx @@ -5,7 +5,7 @@ #include -#include +#include namespace semantics { diff --git a/cli/semantics/namespace.hxx b/cli/semantics/namespace.hxx index 0ff534a..ca50683 100644 --- a/cli/semantics/namespace.hxx +++ b/cli/semantics/namespace.hxx @@ -6,7 +6,7 @@ #ifndef CLI_SEMANTICS_NAMESPACE_HXX #define CLI_SEMANTICS_NAMESPACE_HXX -#include +#include namespace semantics { diff --git a/cli/semantics/option.cxx b/cli/semantics/option.cxx index 04eb9a5..9c73f3e 100644 --- a/cli/semantics/option.cxx +++ b/cli/semantics/option.cxx @@ -5,7 +5,7 @@ #include -#include +#include namespace semantics { diff --git a/cli/semantics/option.hxx b/cli/semantics/option.hxx index 90a462a..f102dda 100644 --- a/cli/semantics/option.hxx +++ b/cli/semantics/option.hxx @@ -6,7 +6,7 @@ #ifndef CLI_SEMANTICS_OPTION_HXX #define CLI_SEMANTICS_OPTION_HXX -#include +#include namespace semantics { diff --git a/cli/semantics/unit.cxx b/cli/semantics/unit.cxx index eecdbba..f0cfddb 100644 --- a/cli/semantics/unit.cxx +++ b/cli/semantics/unit.cxx @@ -5,7 +5,7 @@ #include -#include +#include namespace semantics { diff --git a/cli/semantics/unit.hxx b/cli/semantics/unit.hxx index 772d2f7..f5e2368 100644 --- a/cli/semantics/unit.hxx +++ b/cli/semantics/unit.hxx @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include namespace semantics { @@ -306,6 +306,6 @@ namespace semantics }; } -#include +#include #endif // CLI_SEMANTICS_UNIT_HXX diff --git a/cli/source.cxx b/cli/source.cxx index 0184da6..fb1b881 100644 --- a/cli/source.cxx +++ b/cli/source.cxx @@ -5,8 +5,8 @@ #include -#include "source.hxx" -#include "txt.hxx" // txt_size(), txt_wrap_lines() +#include +#include // txt_size(), txt_wrap_lines() using namespace std; diff --git a/cli/source.hxx b/cli/source.hxx index 14b2fce..bf06293 100644 --- a/cli/source.hxx +++ b/cli/source.hxx @@ -6,7 +6,7 @@ #ifndef CLI_SOURCE_HXX #define CLI_SOURCE_HXX -#include "context.hxx" +#include void generate_source (context&); diff --git a/cli/token.hxx b/cli/token.hxx index d04ee7a..2c8feaa 100644 --- a/cli/token.hxx +++ b/cli/token.hxx @@ -131,6 +131,6 @@ private: std::string str_; }; -#include "token.ixx" +#include #endif // CLI_TOKEN_HXX diff --git a/cli/traversal.hxx b/cli/traversal.hxx index 32febef..432f265 100644 --- a/cli/traversal.hxx +++ b/cli/traversal.hxx @@ -6,12 +6,12 @@ #ifndef CLI_TRAVERSAL_HXX #define CLI_TRAVERSAL_HXX -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #endif // CLI_TRAVERSAL_HXX diff --git a/cli/traversal/class.cxx b/cli/traversal/class.cxx index 3f178b6..c515af6 100644 --- a/cli/traversal/class.cxx +++ b/cli/traversal/class.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include +#include namespace traversal { diff --git a/cli/traversal/class.hxx b/cli/traversal/class.hxx index 37f5f64..ca6d301 100644 --- a/cli/traversal/class.hxx +++ b/cli/traversal/class.hxx @@ -6,8 +6,8 @@ #ifndef CLI_TRAVERSAL_CLASS_HXX #define CLI_TRAVERSAL_CLASS_HXX -#include -#include +#include +#include namespace traversal { diff --git a/cli/traversal/doc.hxx b/cli/traversal/doc.hxx index 94c8c3e..fe515c7 100644 --- a/cli/traversal/doc.hxx +++ b/cli/traversal/doc.hxx @@ -6,8 +6,8 @@ #ifndef CLI_TRAVERSAL_DOC_HXX #define CLI_TRAVERSAL_DOC_HXX -#include -#include +#include +#include namespace traversal { diff --git a/cli/traversal/elements.cxx b/cli/traversal/elements.cxx index 6a2e9db..adf8029 100644 --- a/cli/traversal/elements.cxx +++ b/cli/traversal/elements.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include +#include namespace traversal { diff --git a/cli/traversal/elements.hxx b/cli/traversal/elements.hxx index c6e4aeb..c34ef22 100644 --- a/cli/traversal/elements.hxx +++ b/cli/traversal/elements.hxx @@ -8,7 +8,7 @@ #include -#include +#include namespace traversal { diff --git a/cli/traversal/expression.hxx b/cli/traversal/expression.hxx index 8070834..c3872b9 100644 --- a/cli/traversal/expression.hxx +++ b/cli/traversal/expression.hxx @@ -6,8 +6,8 @@ #ifndef CLI_TRAVERSAL_EXPRESSION_HXX #define CLI_TRAVERSAL_EXPRESSION_HXX -#include -#include +#include +#include namespace traversal { diff --git a/cli/traversal/namespace.cxx b/cli/traversal/namespace.cxx index cbcd0bb..86a86c4 100644 --- a/cli/traversal/namespace.cxx +++ b/cli/traversal/namespace.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include +#include namespace traversal { diff --git a/cli/traversal/namespace.hxx b/cli/traversal/namespace.hxx index 877ea5a..125b614 100644 --- a/cli/traversal/namespace.hxx +++ b/cli/traversal/namespace.hxx @@ -6,8 +6,8 @@ #ifndef CLI_TRAVERSAL_NAMESPACE_HXX #define CLI_TRAVERSAL_NAMESPACE_HXX -#include -#include +#include +#include namespace traversal { diff --git a/cli/traversal/option.cxx b/cli/traversal/option.cxx index d8b327b..d9259dc 100644 --- a/cli/traversal/option.cxx +++ b/cli/traversal/option.cxx @@ -3,8 +3,8 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include -#include +#include +#include namespace traversal { diff --git a/cli/traversal/option.hxx b/cli/traversal/option.hxx index 2a127d0..8c2923a 100644 --- a/cli/traversal/option.hxx +++ b/cli/traversal/option.hxx @@ -6,8 +6,8 @@ #ifndef CLI_TRAVERSAL_OPTION_HXX #define CLI_TRAVERSAL_OPTION_HXX -#include -#include +#include +#include namespace traversal { diff --git a/cli/traversal/unit.cxx b/cli/traversal/unit.cxx index de81dab..21da369 100644 --- a/cli/traversal/unit.cxx +++ b/cli/traversal/unit.cxx @@ -3,7 +3,7 @@ // copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC // license : MIT; see accompanying LICENSE file -#include +#include namespace traversal { diff --git a/cli/traversal/unit.hxx b/cli/traversal/unit.hxx index 656ec72..bdd84c9 100644 --- a/cli/traversal/unit.hxx +++ b/cli/traversal/unit.hxx @@ -6,8 +6,8 @@ #ifndef CLI_TRAVERSAL_UNIT_HXX #define CLI_TRAVERSAL_UNIT_HXX -#include -#include +#include +#include namespace traversal { diff --git a/cli/txt.cxx b/cli/txt.cxx index 388ae0f..9fbfb27 100644 --- a/cli/txt.cxx +++ b/cli/txt.cxx @@ -6,7 +6,7 @@ #include #include -#include "txt.hxx" +#include using namespace std; diff --git a/cli/txt.hxx b/cli/txt.hxx index b0a667c..6f70a91 100644 --- a/cli/txt.hxx +++ b/cli/txt.hxx @@ -10,7 +10,7 @@ #include #include // size_t -#include "context.hxx" +#include void generate_txt (context&); diff --git a/examples/examples-8.0.sln b/examples/examples-8.0.sln deleted file mode 100644 index aded850..0000000 --- a/examples/examples-8.0.sln +++ /dev/null @@ -1,32 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello", "hello\hello-8.0.vcproj", "{4813826B-CC80-4D8F-8E4C-D89DB83B6479}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "features", "features\features-8.0.vcproj", "{FA7FD071-4FF6-4EB3-96E0-95366AB2CA6F}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "file", "file\file-8.0.vcproj", "{ECCD3577-1DB2-4F38-9ED7-757433B8D66F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4813826B-CC80-4D8F-8E4C-D89DB83B6479}.Debug|Win32.ActiveCfg = Debug|Win32 - {4813826B-CC80-4D8F-8E4C-D89DB83B6479}.Debug|Win32.Build.0 = Debug|Win32 - {4813826B-CC80-4D8F-8E4C-D89DB83B6479}.Release|Win32.ActiveCfg = Release|Win32 - {4813826B-CC80-4D8F-8E4C-D89DB83B6479}.Release|Win32.Build.0 = Release|Win32 - {FA7FD071-4FF6-4EB3-96E0-95366AB2CA6F}.Debug|Win32.ActiveCfg = Debug|Win32 - {FA7FD071-4FF6-4EB3-96E0-95366AB2CA6F}.Debug|Win32.Build.0 = Debug|Win32 - {FA7FD071-4FF6-4EB3-96E0-95366AB2CA6F}.Release|Win32.ActiveCfg = Release|Win32 - {FA7FD071-4FF6-4EB3-96E0-95366AB2CA6F}.Release|Win32.Build.0 = Release|Win32 - {ECCD3577-1DB2-4F38-9ED7-757433B8D66F}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECCD3577-1DB2-4F38-9ED7-757433B8D66F}.Debug|Win32.Build.0 = Debug|Win32 - {ECCD3577-1DB2-4F38-9ED7-757433B8D66F}.Release|Win32.ActiveCfg = Release|Win32 - {ECCD3577-1DB2-4F38-9ED7-757433B8D66F}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/examples/examples-9.0.sln b/examples/examples-9.0.sln deleted file mode 100644 index d0c1be5..0000000 --- a/examples/examples-9.0.sln +++ /dev/null @@ -1,32 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual Studio 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "hello", "hello\hello-9.0.vcproj", "{C955CE91-C424-44A8-AAC5-64D50CDADABA}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "features", "features\features-9.0.vcproj", "{A2A8DB0D-FA16-4F85-9775-8ADBDD06AE90}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "file", "file\file-9.0.vcproj", "{ECCD3577-1DB2-4F38-9ED7-757433B8D66F}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {C955CE91-C424-44A8-AAC5-64D50CDADABA}.Debug|Win32.ActiveCfg = Debug|Win32 - {C955CE91-C424-44A8-AAC5-64D50CDADABA}.Debug|Win32.Build.0 = Debug|Win32 - {C955CE91-C424-44A8-AAC5-64D50CDADABA}.Release|Win32.ActiveCfg = Release|Win32 - {C955CE91-C424-44A8-AAC5-64D50CDADABA}.Release|Win32.Build.0 = Release|Win32 - {A2A8DB0D-FA16-4F85-9775-8ADBDD06AE90}.Debug|Win32.ActiveCfg = Debug|Win32 - {A2A8DB0D-FA16-4F85-9775-8ADBDD06AE90}.Debug|Win32.Build.0 = Debug|Win32 - {A2A8DB0D-FA16-4F85-9775-8ADBDD06AE90}.Release|Win32.ActiveCfg = Release|Win32 - {A2A8DB0D-FA16-4F85-9775-8ADBDD06AE90}.Release|Win32.Build.0 = Release|Win32 - {ECCD3577-1DB2-4F38-9ED7-757433B8D66F}.Debug|Win32.ActiveCfg = Debug|Win32 - {ECCD3577-1DB2-4F38-9ED7-757433B8D66F}.Debug|Win32.Build.0 = Debug|Win32 - {ECCD3577-1DB2-4F38-9ED7-757433B8D66F}.Release|Win32.ActiveCfg = Release|Win32 - {ECCD3577-1DB2-4F38-9ED7-757433B8D66F}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/examples/features/features-8.0.vcproj b/examples/features/features-8.0.vcproj deleted file mode 100644 index e7d27b8..0000000 --- a/examples/features/features-8.0.vcproj +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/features/features-9.0.vcproj b/examples/features/features-9.0.vcproj deleted file mode 100644 index bf18ffc..0000000 --- a/examples/features/features-9.0.vcproj +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/file/file-8.0.vcproj b/examples/file/file-8.0.vcproj deleted file mode 100644 index 0b1000b..0000000 --- a/examples/file/file-8.0.vcproj +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/file/file-9.0.vcproj b/examples/file/file-9.0.vcproj deleted file mode 100644 index c2a78e5..0000000 --- a/examples/file/file-9.0.vcproj +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/hello/hello-8.0.vcproj b/examples/hello/hello-8.0.vcproj deleted file mode 100644 index 6415d8c..0000000 --- a/examples/hello/hello-8.0.vcproj +++ /dev/null @@ -1,237 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/hello/hello-9.0.vcproj b/examples/hello/hello-9.0.vcproj deleted file mode 100644 index 3ca9838..0000000 --- a/examples/hello/hello-9.0.vcproj +++ /dev/null @@ -1,233 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/examples/makefile b/examples/makefile deleted file mode 100644 index 50c91ff..0000000 --- a/examples/makefile +++ /dev/null @@ -1,19 +0,0 @@ -# file : examples/makefile -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make - -examples := hello features file - -default := $(out_base)/ -install := $(out_base)/.install -clean := $(out_base)/.clean - -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(examples))) -$(install): $(addprefix $(out_base)/,$(addsuffix /.install,$(examples))) - $(call install-data,$(src_base)/README,$(install_doc_dir)/cli/examples/README) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(examples))) - -$(foreach e,$(examples),$(call import,$(src_base)/$e/makefile)) diff --git a/makefile b/makefile deleted file mode 100644 index 99569da..0000000 --- a/makefile +++ /dev/null @@ -1,48 +0,0 @@ -# file : makefile -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))build/bootstrap.make - -default := $(out_base)/ -test := $(out_base)/.test -install := $(out_base)/.install -clean := $(out_base)/.clean -cleandoc := $(out_base)/.cleandoc - -# Build. -# -$(default): \ -$(out_base)/cli/ \ -$(out_base)/doc/ \ -$(out_base)/tests/ \ -$(out_base)/examples/ - -# Test. -# -$(test): $(out_base)/tests/.test - -# Install. -# -$(install): $(out_base)/cli/.install \ - $(out_base)/doc/.install \ - $(out_base)/examples/.install - $(call install-data,$(src_base)/LICENSE,$(install_doc_dir)/cli/LICENSE) - $(call install-data,$(src_base)/NEWS,$(install_doc_dir)/cli/NEWS) - $(call install-data,$(src_base)/README,$(install_doc_dir)/cli/README) - -# Clean. -# -$(clean): $(out_base)/cli/.clean \ - $(out_base)/examples/.clean \ - $(out_base)/tests/.clean - -$(cleandoc): $(out_base)/doc/.cleandoc - -$(call include,$(bld_root)/install.make) - -$(call import,$(src_base)/cli/makefile) -$(call import,$(src_base)/doc/makefile) -$(call import,$(src_base)/tests/makefile) -$(call import,$(src_base)/examples/makefile) diff --git a/manifest b/manifest new file mode 100644 index 0000000..ff78150 --- /dev/null +++ b/manifest @@ -0,0 +1,14 @@ +: 1 +name: cli +version: 1.2.0-a2 +summary: Command line interface compiler +license: MIT +tags: command, line, cli, compiler, option, argument, parse, usage, help +description-file: README +changes-file: NEWS +url: http://www.codesynthesis.com/projects/cli/ +email: cli-users@codesynthesis.com; Mailing list +requires: c++14 +depends: * build2 >= 0.4.0 +depends: * bpkg >= 0.4.0 +depends: libcutl == 1.11.0-a1 diff --git a/tests/makefile b/tests/makefile deleted file mode 100644 index 9ac2655..0000000 --- a/tests/makefile +++ /dev/null @@ -1,18 +0,0 @@ -# file : tests/makefile -# author : Boris Kolpackov -# copyright : Copyright (c) 2009-2011 Code Synthesis Tools CC -# license : MIT; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../build/bootstrap.make - -tests := ctor erase file inheritance lexer parser specifier - -default := $(out_base)/ -test := $(out_base)/.test -clean := $(out_base)/.clean - -$(default): $(addprefix $(out_base)/,$(addsuffix /,$(tests))) -$(test): $(addprefix $(out_base)/,$(addsuffix /.test,$(tests))) -$(clean): $(addprefix $(out_base)/,$(addsuffix /.clean,$(tests))) - -$(foreach t,$(tests),$(call import,$(src_base)/$t/makefile)) -- cgit v1.1