From b75293a565b6f319435516fe253bd61688ba3a1f Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 23 Dec 2015 01:32:04 +0100 Subject: build: makefile improvements --- Makefile.am | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 4a28b8b..78738cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -118,7 +118,15 @@ blogc.1: man/blogc.1.ronn --manual "$(PACKAGE_NAME) Manual" \ $< > $@ -blogc%.7: man/blogc%.7.ronn +blogc-source.7: man/blogc-source.7.ronn + $(AM_V_GEN)$(RONN) \ + --roff \ + --pipe \ + --organization "Rafael G. Martins" \ + --manual "$(PACKAGE_NAME) Manual" \ + $< > $@ + +blogc-template.7: man/blogc-template.7.ronn $(AM_V_GEN)$(RONN) \ --roff \ --pipe \ @@ -131,7 +139,10 @@ else blogc.1: $(AM_V_GEN)echo "error: ronn not found. failed to build man page: $@"; exit 1 -blogc%.7: +blogc-source.7: + $(AM_V_GEN)echo "error: ronn not found. failed to build man page: $@"; exit 1 + +blogc-template.7: $(AM_V_GEN)echo "error: ronn not found. failed to build man page: $@"; exit 1 endif -- cgit v1.2.3-18-g5258 From 950e6c9148eca244a89d18a21d4ae4e5c3d1c646 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 23 Dec 2015 19:53:04 +0100 Subject: build: removing src/utils and replacing with squareball squareball is a new general purpose library for C99, based on the code removed from src/utils --- Makefile.am | 94 +++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 70 insertions(+), 24 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 78738cc..3f70901 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,15 +6,65 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \ --enable-tests \ --enable-ronn \ --disable-valgrind \ + --with-squareball=internal \ $(NULL) +## squareball stuff + +SQUAREBALL_EXTRA_DIST_ = \ + squareball/LICENSE \ + squareball/README.md \ + $(NULL) + +if USE_SYSTEM_SQUAREBALL + +SQUAREBALL_HEADERS_ = + +SQUAREBALL_SOURCES_ = + +SQUAREBALL_CFLAGS_ = \ + $(SQUAREBALL_CFLAGS) \ + $(NULL) + +SQUAREBALL_LIBS_ = \ + $(SQUAREBALL_LIBS) \ + $(NULL) + +else + +SQUAREBALL_HEADERS_ = \ + squareball/src/squareball.h \ + squareball/src/squareball/sb-mem.h \ + squareball/src/squareball/sb-slist.h \ + squareball/src/squareball/sb-string.h \ + squareball/src/squareball/sb-trie.h \ + squareball/src/squareball/sb-trie-private.h \ + $(NULL) + +SQUAREBALL_SOURCES_ = \ + squareball/src/sb-mem.c \ + squareball/src/sb-slist.c \ + squareball/src/sb-string.c \ + squareball/src/sb-trie.c \ + $(NULL) + +SQUAREBALL_CFLAGS_ = \ + -I$(top_srcdir)/squareball/src \ + $(NULL) + +SQUAREBALL_LIBS_ = + +endif + + ## File listings EXTRA_DIST = \ autogen.sh \ LICENSE \ README.md \ + $(SQUAREBALL_EXTRA_DIST_) $(NULL) CLEANFILES = \ @@ -32,7 +82,7 @@ noinst_HEADERS = \ src/renderer.h \ src/source-parser.h \ src/template-parser.h \ - src/utils/utils.h \ + $(SQUAREBALL_HEADERS_) $(NULL) noinst_LTLIBRARIES = \ @@ -59,22 +109,20 @@ libblogc_la_SOURCES = \ src/renderer.c \ src/source-parser.c \ src/template-parser.c \ - src/utils/mem.c \ - src/utils/slist.c \ - src/utils/strings.c \ - src/utils/trie.c \ + $(SQUAREBALL_SOURCES_) \ $(NULL) libblogc_la_CFLAGS = \ $(AM_CFLAGS) \ -I$(top_srcdir)/src \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) libblogc_la_LIBADD = \ $(LIBM) \ + $(SQUAREBALL_LIBS_) \ $(NULL) - blogc_SOURCES = \ src/main.c \ $(NULL) @@ -82,10 +130,12 @@ blogc_SOURCES = \ blogc_CFLAGS = \ $(AM_CFLAGS) \ -I$(top_srcdir)/src \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) blogc_LDADD = \ libblogc.la \ + $(SQUAREBALL_LIBS_) \ $(NULL) @@ -160,7 +210,6 @@ check_PROGRAMS += \ tests/check_renderer \ tests/check_source_parser \ tests/check_template_parser \ - tests/check_utils \ $(NULL) tests_check_error_SOURCES = \ @@ -169,6 +218,7 @@ tests_check_error_SOURCES = \ tests_check_error_CFLAGS = \ $(CMOCKA_CFLAGS) \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_error_LDFLAGS = \ @@ -177,6 +227,7 @@ tests_check_error_LDFLAGS = \ tests_check_error_LDADD = \ $(CMOCKA_LIBS) \ + $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -186,6 +237,7 @@ tests_check_loader_SOURCES = \ tests_check_loader_CFLAGS = \ $(CMOCKA_CFLAGS) \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_loader_LDFLAGS = \ @@ -196,6 +248,7 @@ tests_check_loader_LDFLAGS = \ tests_check_loader_LDADD = \ $(CMOCKA_LIBS) \ + $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -205,6 +258,7 @@ tests_check_content_parser_SOURCES = \ tests_check_content_parser_CFLAGS = \ $(CMOCKA_CFLAGS) \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_content_parser_LDFLAGS = \ @@ -213,6 +267,7 @@ tests_check_content_parser_LDFLAGS = \ tests_check_content_parser_LDADD = \ $(CMOCKA_LIBS) \ + $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -222,6 +277,7 @@ tests_check_datetime_parser_SOURCES = \ tests_check_datetime_parser_CFLAGS = \ $(CMOCKA_CFLAGS) \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_datetime_parser_LDFLAGS = \ @@ -230,6 +286,7 @@ tests_check_datetime_parser_LDFLAGS = \ tests_check_datetime_parser_LDADD = \ $(CMOCKA_LIBS) \ + $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -239,6 +296,7 @@ tests_check_renderer_SOURCES = \ tests_check_renderer_CFLAGS = \ $(CMOCKA_CFLAGS) \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_renderer_LDFLAGS = \ @@ -247,6 +305,7 @@ tests_check_renderer_LDFLAGS = \ tests_check_renderer_LDADD = \ $(CMOCKA_LIBS) \ + $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -256,6 +315,7 @@ tests_check_source_parser_SOURCES = \ tests_check_source_parser_CFLAGS = \ $(CMOCKA_CFLAGS) \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_source_parser_LDFLAGS = \ @@ -264,6 +324,7 @@ tests_check_source_parser_LDFLAGS = \ tests_check_source_parser_LDADD = \ $(CMOCKA_LIBS) \ + $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -273,6 +334,7 @@ tests_check_template_parser_SOURCES = \ tests_check_template_parser_CFLAGS = \ $(CMOCKA_CFLAGS) \ + $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_template_parser_LDFLAGS = \ @@ -281,23 +343,7 @@ tests_check_template_parser_LDFLAGS = \ tests_check_template_parser_LDADD = \ $(CMOCKA_LIBS) \ - libblogc.la \ - $(NULL) - -tests_check_utils_SOURCES = \ - tests/check_utils.c \ - $(NULL) - -tests_check_utils_CFLAGS = \ - $(CMOCKA_CFLAGS) \ - $(NULL) - -tests_check_utils_LDFLAGS = \ - -no-install \ - $(NULL) - -tests_check_utils_LDADD = \ - $(CMOCKA_LIBS) \ + $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) -- cgit v1.2.3-18-g5258 From f835808dab3da4509253b84f79386686986afe0a Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 23 Dec 2015 21:21:06 +0100 Subject: build: do not touch bundled files if using squareball from system --- Makefile.am | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 3f70901..a8be94e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,13 +12,10 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \ ## squareball stuff -SQUAREBALL_EXTRA_DIST_ = \ - squareball/LICENSE \ - squareball/README.md \ - $(NULL) - if USE_SYSTEM_SQUAREBALL +SQUAREBALL_EXTRA_DIST_ = + SQUAREBALL_HEADERS_ = SQUAREBALL_SOURCES_ = @@ -33,6 +30,11 @@ SQUAREBALL_LIBS_ = \ else +SQUAREBALL_EXTRA_DIST_ = \ + squareball/LICENSE \ + squareball/README.md \ + $(NULL) + SQUAREBALL_HEADERS_ = \ squareball/src/squareball.h \ squareball/src/squareball/sb-mem.h \ -- cgit v1.2.3-18-g5258 From 8e62072d91193b4894adda9c40544c18c1a01f57 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 23 Dec 2015 23:45:19 +0100 Subject: Revert "build: do not touch bundled files if using squareball from system" This reverts commit f835808dab3da4509253b84f79386686986afe0a. --- Makefile.am | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index a8be94e..3f70901 100644 --- a/Makefile.am +++ b/Makefile.am @@ -12,9 +12,12 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \ ## squareball stuff -if USE_SYSTEM_SQUAREBALL +SQUAREBALL_EXTRA_DIST_ = \ + squareball/LICENSE \ + squareball/README.md \ + $(NULL) -SQUAREBALL_EXTRA_DIST_ = +if USE_SYSTEM_SQUAREBALL SQUAREBALL_HEADERS_ = @@ -30,11 +33,6 @@ SQUAREBALL_LIBS_ = \ else -SQUAREBALL_EXTRA_DIST_ = \ - squareball/LICENSE \ - squareball/README.md \ - $(NULL) - SQUAREBALL_HEADERS_ = \ squareball/src/squareball.h \ squareball/src/squareball/sb-mem.h \ -- cgit v1.2.3-18-g5258 From 14e9d7b2299f15efb695b0202f9c1f6a9f7a4ba6 Mon Sep 17 00:00:00 2001 From: "Rafael G. Martins" Date: Wed, 23 Dec 2015 23:45:54 +0100 Subject: Revert "build: removing src/utils and replacing with squareball" This reverts commit 950e6c9148eca244a89d18a21d4ae4e5c3d1c646. --- Makefile.am | 94 ++++++++++++++++--------------------------------------------- 1 file changed, 24 insertions(+), 70 deletions(-) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index 3f70901..78738cc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,65 +6,15 @@ AM_DISTCHECK_CONFIGURE_FLAGS = \ --enable-tests \ --enable-ronn \ --disable-valgrind \ - --with-squareball=internal \ $(NULL) -## squareball stuff - -SQUAREBALL_EXTRA_DIST_ = \ - squareball/LICENSE \ - squareball/README.md \ - $(NULL) - -if USE_SYSTEM_SQUAREBALL - -SQUAREBALL_HEADERS_ = - -SQUAREBALL_SOURCES_ = - -SQUAREBALL_CFLAGS_ = \ - $(SQUAREBALL_CFLAGS) \ - $(NULL) - -SQUAREBALL_LIBS_ = \ - $(SQUAREBALL_LIBS) \ - $(NULL) - -else - -SQUAREBALL_HEADERS_ = \ - squareball/src/squareball.h \ - squareball/src/squareball/sb-mem.h \ - squareball/src/squareball/sb-slist.h \ - squareball/src/squareball/sb-string.h \ - squareball/src/squareball/sb-trie.h \ - squareball/src/squareball/sb-trie-private.h \ - $(NULL) - -SQUAREBALL_SOURCES_ = \ - squareball/src/sb-mem.c \ - squareball/src/sb-slist.c \ - squareball/src/sb-string.c \ - squareball/src/sb-trie.c \ - $(NULL) - -SQUAREBALL_CFLAGS_ = \ - -I$(top_srcdir)/squareball/src \ - $(NULL) - -SQUAREBALL_LIBS_ = - -endif - - ## File listings EXTRA_DIST = \ autogen.sh \ LICENSE \ README.md \ - $(SQUAREBALL_EXTRA_DIST_) $(NULL) CLEANFILES = \ @@ -82,7 +32,7 @@ noinst_HEADERS = \ src/renderer.h \ src/source-parser.h \ src/template-parser.h \ - $(SQUAREBALL_HEADERS_) + src/utils/utils.h \ $(NULL) noinst_LTLIBRARIES = \ @@ -109,20 +59,22 @@ libblogc_la_SOURCES = \ src/renderer.c \ src/source-parser.c \ src/template-parser.c \ - $(SQUAREBALL_SOURCES_) \ + src/utils/mem.c \ + src/utils/slist.c \ + src/utils/strings.c \ + src/utils/trie.c \ $(NULL) libblogc_la_CFLAGS = \ $(AM_CFLAGS) \ -I$(top_srcdir)/src \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) libblogc_la_LIBADD = \ $(LIBM) \ - $(SQUAREBALL_LIBS_) \ $(NULL) + blogc_SOURCES = \ src/main.c \ $(NULL) @@ -130,12 +82,10 @@ blogc_SOURCES = \ blogc_CFLAGS = \ $(AM_CFLAGS) \ -I$(top_srcdir)/src \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) blogc_LDADD = \ libblogc.la \ - $(SQUAREBALL_LIBS_) \ $(NULL) @@ -210,6 +160,7 @@ check_PROGRAMS += \ tests/check_renderer \ tests/check_source_parser \ tests/check_template_parser \ + tests/check_utils \ $(NULL) tests_check_error_SOURCES = \ @@ -218,7 +169,6 @@ tests_check_error_SOURCES = \ tests_check_error_CFLAGS = \ $(CMOCKA_CFLAGS) \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_error_LDFLAGS = \ @@ -227,7 +177,6 @@ tests_check_error_LDFLAGS = \ tests_check_error_LDADD = \ $(CMOCKA_LIBS) \ - $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -237,7 +186,6 @@ tests_check_loader_SOURCES = \ tests_check_loader_CFLAGS = \ $(CMOCKA_CFLAGS) \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_loader_LDFLAGS = \ @@ -248,7 +196,6 @@ tests_check_loader_LDFLAGS = \ tests_check_loader_LDADD = \ $(CMOCKA_LIBS) \ - $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -258,7 +205,6 @@ tests_check_content_parser_SOURCES = \ tests_check_content_parser_CFLAGS = \ $(CMOCKA_CFLAGS) \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_content_parser_LDFLAGS = \ @@ -267,7 +213,6 @@ tests_check_content_parser_LDFLAGS = \ tests_check_content_parser_LDADD = \ $(CMOCKA_LIBS) \ - $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -277,7 +222,6 @@ tests_check_datetime_parser_SOURCES = \ tests_check_datetime_parser_CFLAGS = \ $(CMOCKA_CFLAGS) \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_datetime_parser_LDFLAGS = \ @@ -286,7 +230,6 @@ tests_check_datetime_parser_LDFLAGS = \ tests_check_datetime_parser_LDADD = \ $(CMOCKA_LIBS) \ - $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -296,7 +239,6 @@ tests_check_renderer_SOURCES = \ tests_check_renderer_CFLAGS = \ $(CMOCKA_CFLAGS) \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_renderer_LDFLAGS = \ @@ -305,7 +247,6 @@ tests_check_renderer_LDFLAGS = \ tests_check_renderer_LDADD = \ $(CMOCKA_LIBS) \ - $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -315,7 +256,6 @@ tests_check_source_parser_SOURCES = \ tests_check_source_parser_CFLAGS = \ $(CMOCKA_CFLAGS) \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_source_parser_LDFLAGS = \ @@ -324,7 +264,6 @@ tests_check_source_parser_LDFLAGS = \ tests_check_source_parser_LDADD = \ $(CMOCKA_LIBS) \ - $(SQUAREBALL_LIBS_) \ libblogc.la \ $(NULL) @@ -334,7 +273,6 @@ tests_check_template_parser_SOURCES = \ tests_check_template_parser_CFLAGS = \ $(CMOCKA_CFLAGS) \ - $(SQUAREBALL_CFLAGS_) \ $(NULL) tests_check_template_parser_LDFLAGS = \ @@ -343,7 +281,23 @@ tests_check_template_parser_LDFLAGS = \ tests_check_template_parser_LDADD = \ $(CMOCKA_LIBS) \ - $(SQUAREBALL_LIBS_) \ + libblogc.la \ + $(NULL) + +tests_check_utils_SOURCES = \ + tests/check_utils.c \ + $(NULL) + +tests_check_utils_CFLAGS = \ + $(CMOCKA_CFLAGS) \ + $(NULL) + +tests_check_utils_LDFLAGS = \ + -no-install \ + $(NULL) + +tests_check_utils_LDADD = \ + $(CMOCKA_LIBS) \ libblogc.la \ $(NULL) -- cgit v1.2.3-18-g5258