| 1 | ### -*-automake-*- |
| 2 | ### |
| 3 | ### Build script for `finally' |
| 4 | ### |
| 5 | ### (c) 2023 Mark Wooding |
| 6 | ### |
| 7 | |
| 8 | ###----- Licensing notice --------------------------------------------------- |
| 9 | ### |
| 10 | ### This file is part of the `Finally' package. |
| 11 | ### |
| 12 | ### Finally is free software: you can redistribute it and/or modify it |
| 13 | ### under the terms of the GNU Library General Public License as published |
| 14 | ### by the Free Software Foundation; either version 2 of the License, or |
| 15 | ### (at your option) any later version. |
| 16 | ### |
| 17 | ### Finally is distributed in the hope that it will be useful, but WITHOUT |
| 18 | ### ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 19 | ### FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public |
| 20 | ### License for more details. |
| 21 | ### |
| 22 | ### You should have received a copy of the GNU Library General Public |
| 23 | ### License along with Finally. If not, write to the Free Software |
| 24 | ### Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
| 25 | ### USA. |
| 26 | |
| 27 | include_HEADERS = |
| 28 | dist_man_MANS = |
| 29 | EXTRA_DIST = |
| 30 | |
| 31 | ###-------------------------------------------------------------------------- |
| 32 | ### The main build. |
| 33 | |
| 34 | include_HEADERS += finally.h |
| 35 | dist_man_MANS += FINALLY.3 |
| 36 | |
| 37 | ###-------------------------------------------------------------------------- |
| 38 | ### Test configuration. |
| 39 | |
| 40 | check_PROGRAMS = |
| 41 | check_LIBRARIES = |
| 42 | TESTS = |
| 43 | |
| 44 | AM_TESTS_ENVIRONMENT = env TEST_OUTFORM=tap |
| 45 | LOG_DRIVER = env AM_TAP_AWK=$(AWK) $(SHELL) \ |
| 46 | $(top_srcdir)/config/tap-driver.sh |
| 47 | |
| 48 | check_LIBRARIES += libfintest.a |
| 49 | libfintest_a_SOURCES = |
| 50 | libfintest_a_SOURCES += finally-test.h |
| 51 | libfintest_a_SOURCES += test-guts.c |
| 52 | if FEXCEPTIONS |
| 53 | libfintest_a_SOURCES += try-catch.cc |
| 54 | endif |
| 55 | |
| 56 | if C |
| 57 | ## The C test program. |
| 58 | check_PROGRAMS += finally-test |
| 59 | finally_test_SOURCES = finally-test.c |
| 60 | if FEXCEPTIONS |
| 61 | nodist_EXTRA_finally_test_SOURCES = bodge.cc |
| 62 | endif |
| 63 | finally_test_LDADD = libfintest.a $(FINALLY_LIBS) |
| 64 | TESTS += finally-test |
| 65 | TESTS += examine-binary |
| 66 | EXTRA_DIST += examine-binary |
| 67 | endif |
| 68 | |
| 69 | if CXX14 |
| 70 | ## The C++ test program. Which is actually exactly the same program, only |
| 71 | ## (partially) compiled with a C++ compiler. |
| 72 | check_PROGRAMS += finally-cxx-test |
| 73 | finally_cxx_test_SOURCES = finally-cxx-test.cc |
| 74 | finally_cxx_test_LDADD = libfintest.a |
| 75 | TESTS += finally-cxx-test |
| 76 | endif |
| 77 | |
| 78 | ###----- That's all, folks -------------------------------------------------- |