From 8286ac511144e4f17d34eac9affb97e50646344a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Wed, 23 Jul 2014 15:25:44 +0200 Subject: Imported Upstream version 4.0.0 --- libcult/examples/cli/cli.cxx | 65 ------------------------------------------- libcult/examples/cli/makefile | 48 -------------------------------- 2 files changed, 113 deletions(-) delete mode 100644 libcult/examples/cli/cli.cxx delete mode 100644 libcult/examples/cli/makefile (limited to 'libcult/examples/cli') diff --git a/libcult/examples/cli/cli.cxx b/libcult/examples/cli/cli.cxx deleted file mode 100644 index 922a23d..0000000 --- a/libcult/examples/cli/cli.cxx +++ /dev/null @@ -1,65 +0,0 @@ -// file : examples/cli/cli.cxx -// author : Boris Kolpackov -// copyright : Copyright (c) 2005-2010 Boris Kolpackov -// license : GNU GPL v2 + exceptions; see accompanying LICENSE file - -#include - -#include -#include -#include - -#include - -using std::cerr; -using std::endl; - -using namespace Cult; - -namespace -{ - extern Char const help[] = "help"; - extern Char const version[] = "version"; - extern Char const outdir[] = "outdir"; -} - -typedef -CLI::Options -Options; - -Int -main (Int argc, Char* argv[]) -{ - try - { - Options options (CLI::parse (argc, argv)); - - if (options.value ()) - { - cerr << "usage: " << argv[0] << " [--help] [--version] [--outdir ]" - << endl; - return 0; - } - - if (options.value ()) - { - cerr << argv[0] << " 1.2.3" << endl; - return 0; - } - - if (String dir = options.value ()) - { - cerr << "outdir: " << dir << endl; - } - } - catch (CLI::UnexpectedOption const& e) - { - cerr << "unexpected option " << e.option () < -# copyright : Copyright (c) 2005-2010 Boris Kolpackov -# license : GNU GPL v2; see accompanying LICENSE file - -include $(dir $(lastword $(MAKEFILE_LIST)))../../build/bootstrap.make - -cxx_tun := cli.cxx -cxx_obj := $(addprefix $(out_base)/,$(cxx_tun:.cxx=.o)) -cxx_od := $(cxx_obj:.o=.o.d) - -cult.l := $(out_root)/cult/cult.l -cult.l.cpp-options := $(out_root)/cult/cult.l.cpp-options - -cli := $(out_base)/cli -clean := $(out_base)/.clean - - -# Build. -# -$(cli): $(cxx_obj) $(cult.l) - -$(cxx_obj) $(cxx_od): $(cult.l.cpp-options) - -$(call include-dep,$(cxx_od)) - - -# Convenience alias for default target. -# -$(out_base)/: $(cli) - - -# Clean. -# -$(clean): $(cli).o.clean \ - $(addsuffix .cxx.clean,$(cxx_obj)) \ - $(addsuffix .cxx.clean,$(cxx_od)) - - -# 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) - -# Dependencies. -# -$(call import,$(src_root)/cult/makefile) -- cgit v1.2.3