aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile.am
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2018-01-03 02:39:59 +0100
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2018-01-06 18:47:33 +0100
commitcd312bb82c8693ffeb9b143e5361567657a7cede (patch)
tree39b6e764593576f1a8631e1f8a8eb459af4e1847 /Makefile.am
parent11a7b775f53e5cdcc845e3746945e2910f78f202 (diff)
downloadblogc-cd312bb82c8693ffeb9b143e5361567657a7cede.tar.gz
blogc-cd312bb82c8693ffeb9b143e5361567657a7cede.tar.bz2
blogc-cd312bb82c8693ffeb9b143e5361567657a7cede.zip
build: travis: fix osx support
This commit fixes builds of blogc and helper tools on osx, and enables travis tests on it. This also includes some general improvements for travis, and disable tests that require mocked functions if the linker does not supports `-wrap` ldflag
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am105
1 files changed, 61 insertions, 44 deletions
diff --git a/Makefile.am b/Makefile.am
index 8cd56e5..2937817 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -452,17 +452,21 @@ if USE_CMOCKA
check_PROGRAMS += \
tests/blogc/check_content_parser \
tests/blogc/check_datetime_parser \
- tests/blogc/check_loader \
tests/blogc/check_renderer \
tests/blogc/check_source_parser \
tests/blogc/check_template_parser \
tests/common/check_config_parser \
tests/common/check_error \
- tests/common/check_stdin \
tests/common/check_utf8 \
tests/common/check_utils \
$(NULL)
+if USE_LD_WRAP
+check_PROGRAMS += \
+ tests/blogc/check_loader \
+ tests/common/check_stdin \
+ $(NULL)
+
tests_blogc_check_loader_SOURCES = \
tests/blogc/check_loader.c \
$(NULL)
@@ -482,6 +486,25 @@ tests_blogc_check_loader_LDADD = \
libblogc_common.la \
$(NULL)
+tests_common_check_stdin_SOURCES = \
+ tests/common/check_stdin.c \
+ $(NULL)
+
+tests_common_check_stdin_CFLAGS = \
+ $(CMOCKA_CFLAGS) \
+ $(NULL)
+
+tests_common_check_stdin_LDFLAGS = \
+ -no-install \
+ -Wl,--wrap=fgetc \
+ $(NULL)
+
+tests_common_check_stdin_LDADD = \
+ $(CMOCKA_LIBS) \
+ libblogc_common.la \
+ $(NULL)
+endif
+
tests_blogc_check_content_parser_SOURCES = \
tests/blogc/check_content_parser.c \
$(NULL)
@@ -606,24 +629,6 @@ tests_common_check_error_LDADD = \
libblogc_common.la \
$(NULL)
-tests_common_check_stdin_SOURCES = \
- tests/common/check_stdin.c \
- $(NULL)
-
-tests_common_check_stdin_CFLAGS = \
- $(CMOCKA_CFLAGS) \
- $(NULL)
-
-tests_common_check_stdin_LDFLAGS = \
- -no-install \
- -Wl,--wrap=fgetc \
- $(NULL)
-
-tests_common_check_stdin_LDADD = \
- $(CMOCKA_LIBS) \
- libblogc_common.la \
- $(NULL)
-
tests_common_check_utf8_SOURCES = \
tests/common/check_utf8.c \
$(NULL)
@@ -659,6 +664,7 @@ tests_common_check_utils_LDADD = \
$(NULL)
if BUILD_RUNSERVER
+if USE_LD_WRAP
check_PROGRAMS += \
tests/blogc-runserver/check_httpd_utils \
tests/blogc-runserver/check_mime \
@@ -702,46 +708,52 @@ tests_blogc_runserver_check_mime_LDADD = \
libblogc_common.la \
$(NULL)
endif
+endif
if BUILD_GIT_RECEIVER
check_PROGRAMS += \
tests/blogc-git-receiver/check_pre_receive_parser \
- tests/blogc-git-receiver/check_post_receive \
tests/blogc-git-receiver/check_shell_command_parser \
$(NULL)
-tests_blogc_git_receiver_check_pre_receive_parser_SOURCES = \
- tests/blogc-git-receiver/check_pre_receive_parser.c \
+if USE_LD_WRAP
+check_PROGRAMS += \
+ tests/blogc-git-receiver/check_post_receive \
$(NULL)
-tests_blogc_git_receiver_check_pre_receive_parser_CFLAGS = \
+tests_blogc_git_receiver_check_post_receive_SOURCES = \
+ tests/blogc-git-receiver/check_post_receive.c \
+ $(NULL)
+
+tests_blogc_git_receiver_check_post_receive_CFLAGS = \
$(CMOCKA_CFLAGS) \
$(NULL)
-tests_blogc_git_receiver_check_pre_receive_parser_LDFLAGS = \
+tests_blogc_git_receiver_check_post_receive_LDFLAGS = \
-no-install \
+ -Wl,--wrap=realpath \
$(NULL)
-tests_blogc_git_receiver_check_pre_receive_parser_LDADD = \
+tests_blogc_git_receiver_check_post_receive_LDADD = \
$(CMOCKA_LIBS) \
libblogc_git_receiver.la \
libblogc_common.la \
$(NULL)
+endif
-tests_blogc_git_receiver_check_post_receive_SOURCES = \
- tests/blogc-git-receiver/check_post_receive.c \
+tests_blogc_git_receiver_check_pre_receive_parser_SOURCES = \
+ tests/blogc-git-receiver/check_pre_receive_parser.c \
$(NULL)
-tests_blogc_git_receiver_check_post_receive_CFLAGS = \
+tests_blogc_git_receiver_check_pre_receive_parser_CFLAGS = \
$(CMOCKA_CFLAGS) \
$(NULL)
-tests_blogc_git_receiver_check_post_receive_LDFLAGS = \
+tests_blogc_git_receiver_check_pre_receive_parser_LDFLAGS = \
-no-install \
- -Wl,--wrap=realpath \
$(NULL)
-tests_blogc_git_receiver_check_post_receive_LDADD = \
+tests_blogc_git_receiver_check_pre_receive_parser_LDADD = \
$(CMOCKA_LIBS) \
libblogc_git_receiver.la \
libblogc_common.la \
@@ -769,43 +781,48 @@ endif
if BUILD_MAKE_LIB
check_PROGRAMS += \
tests/blogc-make/check_atom \
- tests/blogc-make/check_exec \
tests/blogc-make/check_rules \
tests/blogc-make/check_settings \
$(NULL)
-tests_blogc_make_check_atom_SOURCES = \
- tests/blogc-make/check_atom.c \
+if USE_LD_WRAP
+check_PROGRAMS += \
+ tests/blogc-make/check_exec \
$(NULL)
-tests_blogc_make_check_atom_CFLAGS = \
+tests_blogc_make_check_exec_SOURCES = \
+ tests/blogc-make/check_exec.c \
+ $(NULL)
+
+tests_blogc_make_check_exec_CFLAGS = \
$(CMOCKA_CFLAGS) \
$(NULL)
-tests_blogc_make_check_atom_LDFLAGS = \
+tests_blogc_make_check_exec_LDFLAGS = \
-no-install \
+ -Wl,--wrap=access \
$(NULL)
-tests_blogc_make_check_atom_LDADD = \
+tests_blogc_make_check_exec_LDADD = \
$(CMOCKA_LIBS) \
libblogc_make.la \
libblogc_common.la \
$(NULL)
+endif
-tests_blogc_make_check_exec_SOURCES = \
- tests/blogc-make/check_exec.c \
+tests_blogc_make_check_atom_SOURCES = \
+ tests/blogc-make/check_atom.c \
$(NULL)
-tests_blogc_make_check_exec_CFLAGS = \
+tests_blogc_make_check_atom_CFLAGS = \
$(CMOCKA_CFLAGS) \
$(NULL)
-tests_blogc_make_check_exec_LDFLAGS = \
+tests_blogc_make_check_atom_LDFLAGS = \
-no-install \
- -Wl,--wrap=access \
$(NULL)
-tests_blogc_make_check_exec_LDADD = \
+tests_blogc_make_check_atom_LDADD = \
$(CMOCKA_LIBS) \
libblogc_make.la \
libblogc_common.la \