1*b0d29bc4SBrooks Davis# Copyright 2010 The Kyua Authors. 2*b0d29bc4SBrooks Davis# All rights reserved. 3*b0d29bc4SBrooks Davis# 4*b0d29bc4SBrooks Davis# Redistribution and use in source and binary forms, with or without 5*b0d29bc4SBrooks Davis# modification, are permitted provided that the following conditions are 6*b0d29bc4SBrooks Davis# met: 7*b0d29bc4SBrooks Davis# 8*b0d29bc4SBrooks Davis# * Redistributions of source code must retain the above copyright 9*b0d29bc4SBrooks Davis# notice, this list of conditions and the following disclaimer. 10*b0d29bc4SBrooks Davis# * Redistributions in binary form must reproduce the above copyright 11*b0d29bc4SBrooks Davis# notice, this list of conditions and the following disclaimer in the 12*b0d29bc4SBrooks Davis# documentation and/or other materials provided with the distribution. 13*b0d29bc4SBrooks Davis# * Neither the name of Google Inc. nor the names of its contributors 14*b0d29bc4SBrooks Davis# may be used to endorse or promote products derived from this software 15*b0d29bc4SBrooks Davis# without specific prior written permission. 16*b0d29bc4SBrooks Davis# 17*b0d29bc4SBrooks Davis# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 18*b0d29bc4SBrooks Davis# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 19*b0d29bc4SBrooks Davis# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 20*b0d29bc4SBrooks Davis# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 21*b0d29bc4SBrooks Davis# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 22*b0d29bc4SBrooks Davis# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 23*b0d29bc4SBrooks Davis# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24*b0d29bc4SBrooks Davis# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25*b0d29bc4SBrooks Davis# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26*b0d29bc4SBrooks Davis# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27*b0d29bc4SBrooks Davis# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28*b0d29bc4SBrooks Davis 29*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/base_command.cpp 30*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/base_command.hpp 31*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/base_command_fwd.hpp 32*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/base_command.ipp 33*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/commands_map.hpp 34*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/commands_map_fwd.hpp 35*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/commands_map.ipp 36*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/exceptions.cpp 37*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/exceptions.hpp 38*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/globals.cpp 39*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/globals.hpp 40*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/options.cpp 41*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/options.hpp 42*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/options_fwd.hpp 43*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/parser.cpp 44*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/parser.hpp 45*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/parser_fwd.hpp 46*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/parser.ipp 47*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/ui.cpp 48*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/ui.hpp 49*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/ui_fwd.hpp 50*b0d29bc4SBrooks Davis# The following two files are only supposed to be used from test code. They 51*b0d29bc4SBrooks Davis# should not be bundled into libutils.a, but doing so simplifies the build 52*b0d29bc4SBrooks Davis# significantly. 53*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/ui_mock.hpp 54*b0d29bc4SBrooks Davislibutils_a_SOURCES += utils/cmdline/ui_mock.cpp 55*b0d29bc4SBrooks Davis 56*b0d29bc4SBrooks Davisif WITH_ATF 57*b0d29bc4SBrooks Davistests_utils_cmdlinedir = $(pkgtestsdir)/utils/cmdline 58*b0d29bc4SBrooks Davis 59*b0d29bc4SBrooks Davistests_utils_cmdline_DATA = utils/cmdline/Kyuafile 60*b0d29bc4SBrooks DavisEXTRA_DIST += $(tests_utils_cmdline_DATA) 61*b0d29bc4SBrooks Davis 62*b0d29bc4SBrooks Davistests_utils_cmdline_PROGRAMS = utils/cmdline/base_command_test 63*b0d29bc4SBrooks Davisutils_cmdline_base_command_test_SOURCES = utils/cmdline/base_command_test.cpp 64*b0d29bc4SBrooks Davisutils_cmdline_base_command_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) 65*b0d29bc4SBrooks Davisutils_cmdline_base_command_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) 66*b0d29bc4SBrooks Davis 67*b0d29bc4SBrooks Davistests_utils_cmdline_PROGRAMS += utils/cmdline/commands_map_test 68*b0d29bc4SBrooks Davisutils_cmdline_commands_map_test_SOURCES = utils/cmdline/commands_map_test.cpp 69*b0d29bc4SBrooks Davisutils_cmdline_commands_map_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) 70*b0d29bc4SBrooks Davisutils_cmdline_commands_map_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) 71*b0d29bc4SBrooks Davis 72*b0d29bc4SBrooks Davistests_utils_cmdline_PROGRAMS += utils/cmdline/exceptions_test 73*b0d29bc4SBrooks Davisutils_cmdline_exceptions_test_SOURCES = utils/cmdline/exceptions_test.cpp 74*b0d29bc4SBrooks Davisutils_cmdline_exceptions_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) 75*b0d29bc4SBrooks Davisutils_cmdline_exceptions_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) 76*b0d29bc4SBrooks Davis 77*b0d29bc4SBrooks Davistests_utils_cmdline_PROGRAMS += utils/cmdline/globals_test 78*b0d29bc4SBrooks Davisutils_cmdline_globals_test_SOURCES = utils/cmdline/globals_test.cpp 79*b0d29bc4SBrooks Davisutils_cmdline_globals_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) 80*b0d29bc4SBrooks Davisutils_cmdline_globals_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) 81*b0d29bc4SBrooks Davis 82*b0d29bc4SBrooks Davistests_utils_cmdline_PROGRAMS += utils/cmdline/options_test 83*b0d29bc4SBrooks Davisutils_cmdline_options_test_SOURCES = utils/cmdline/options_test.cpp 84*b0d29bc4SBrooks Davisutils_cmdline_options_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) 85*b0d29bc4SBrooks Davisutils_cmdline_options_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) 86*b0d29bc4SBrooks Davis 87*b0d29bc4SBrooks Davistests_utils_cmdline_PROGRAMS += utils/cmdline/parser_test 88*b0d29bc4SBrooks Davisutils_cmdline_parser_test_SOURCES = utils/cmdline/parser_test.cpp 89*b0d29bc4SBrooks Davisutils_cmdline_parser_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) 90*b0d29bc4SBrooks Davisutils_cmdline_parser_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) 91*b0d29bc4SBrooks Davis 92*b0d29bc4SBrooks Davistests_utils_cmdline_PROGRAMS += utils/cmdline/ui_test 93*b0d29bc4SBrooks Davisutils_cmdline_ui_test_SOURCES = utils/cmdline/ui_test.cpp 94*b0d29bc4SBrooks Davisutils_cmdline_ui_test_CXXFLAGS = $(UTILS_CFLAGS) $(ATF_CXX_CFLAGS) 95*b0d29bc4SBrooks Davisutils_cmdline_ui_test_LDADD = $(UTILS_LIBS) $(ATF_CXX_LIBS) 96*b0d29bc4SBrooks Davisendif 97