~herrhotzenplotz/gcli-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] pgen: Remove libsn and manually compile against sn.c

Details
Message ID
<20240318194158.2663-1-nsonack@herrhotzenplotz.de>
DKIM signature
fail
Download raw message
Patch: +15 -17 DKIM signature: fail
A linker error occurred while testing on Haiku/x86_64 where errx
was undefined. Use our portability code for errx.

The reason why I removed libsn is that I don't want to have libsn
as a pre-make-all dependency.

Also it is impossible to build sn.c with and without libtool.

Signed-off-by: Nico Sonack <nsonack@herrhotzenplotz.de>
---
 Makefile.am | 32 +++++++++++++++-----------------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 057353b..2c09679 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -13,6 +13,7 @@ AM_CFLAGS = -Wno-gnu-zero-variadic-macro-arguments
noinst_PROGRAMS = pgen$(EXEEXT)
pgen_SOURCES = \
	include/gcli/pgen.h \
	thirdparty/sn/sn.c \
	src/pgen/dump_c.c \
	src/pgen/dump_h.c \
	src/pgen/dump_plain.c \
@@ -20,13 +21,13 @@ pgen_SOURCES = \
	src/pgen/lexer.l

lib_LTLIBRARIES = libgcli.la
noinst_LTLIBRARIES = libsn.la libpdjson.la
noinst_LTLIBRARIES = libpdjson.la

# For testing puproses I'll reenable parallel builds. If it breaks again, uncomment.
# .NOTPARALLEL: pgen$(EXEEXT) $(builddir)/src/pgen/parser.c $(builddir)/src/pgen/parser.h $(builddir)/src/pgen/lexer.c
src/pgen/lexer.c: src/pgen/parser.h

libgcli_la_DEPENDENCIES = pgen$(EXEEXT) libpdjson.la libsn.la
libgcli_la_DEPENDENCIES = pgen$(EXEEXT) libpdjson.la

$(BUILT_SOURCES): pgen$(EXEEXT)

@@ -40,7 +41,7 @@ SUFFIXES = .t
bin_PROGRAMS = gcli$(EXEEXT)
gcli_LDADD = libgcli.la

libgcli_la_LIBADD = libpdjson.la libsn.la
libgcli_la_LIBADD = libpdjson.la
libgcli_la_LDFLAGS = -no-undefined

dist_man_MANS = \
@@ -87,10 +88,6 @@ gcli_SOURCES = \
	src/cmd/api.c \
	src/cmd/gcli.c

libsn_la_SOURCES = \
	thirdparty/sn/sn.c \
	thirdparty/sn/sn.h

libpdjson_la_SOURCES = \
	thirdparty/pdjson/pdjson.c \
	thirdparty/pdjson/pdjson.h
@@ -202,7 +199,8 @@ libgcli_la_SOURCES = \
	src/bugzilla/bugs.c include/gcli/bugzilla/bugs.h \
	src/bugzilla/bugs-parser.c include/gcli/bugzilla/bugs-parser.h \
	src/bugzilla/config.c include/gcli/bugzilla/config.h \
	$(TEMPLATES)
	$(TEMPLATES) \
	thirdparty/sn/sn.c thirdparty/sn/sn.h

libgcli_la_CPPFLAGS = \
	$(AM_CPPFLAGS) \
@@ -251,7 +249,7 @@ tests_json_escape_CFLAGS = \
	$(AM_CFLAGS) \
	$(LIBATFC_CFLAGS)
tests_json_escape_LDADD = \
	libgcli.la libpdjson.la libsn.la \
	libgcli.la libpdjson.la \
	$(LIBATFC_LIBS)

tests_github_parse_tests_SOURCES = \
@@ -260,7 +258,7 @@ tests_github_parse_tests_CFLAGS = \
	$(AM_CFLAGS) \
	$(LIBATFC_CFLAGS)
tests_github_parse_tests_LDADD = \
	libgcli.la libpdjson.la libsn.la \
	libgcli.la libpdjson.la \
	$(LIBATFC_LIBS)

tests_gitlab_parse_tests_SOURCES = \
@@ -269,7 +267,7 @@ tests_gitlab_parse_tests_CFLAGS = \
	$(AM_CFLAGS) \
	$(LIBATFC_CFLAGS)
tests_gitlab_parse_tests_LDADD = \
	libgcli.la libpdjson.la libsn.la \
	libgcli.la libpdjson.la \
	$(LIBATFC_LIBS)

tests_gitea_parse_tests_SOURCES = \
@@ -278,7 +276,7 @@ tests_gitea_parse_tests_CFLAGS = \
	$(AM_CFLAGS) \
	$(LIBATFC_CFLAGS)
tests_gitea_parse_tests_LDADD = \
	libgcli.la libpdjson.la libsn.la \
	libgcli.la libpdjson.la \
	$(LIBATFC_LIBS)

tests_bugzilla_parse_tests_SOURCES = \
@@ -287,7 +285,7 @@ tests_bugzilla_parse_tests_CFLAGS = \
	$(AM_CFLAGS) \
	$(LIBATFC_CFLAGS)
tests_bugzilla_parse_tests_LDADD = \
	libgcli.la libpdjson.la libsn.la \
	libgcli.la libpdjson.la \
	$(LIBATFC_LIBS)

tests_base64_tests_SOURCES = \
@@ -296,7 +294,7 @@ tests_base64_tests_CFLAGS = \
	$(AM_CFLAGS) \
	$(LIBATFC_CFLAGS)
tests_base64_tests_LDADD = \
	libgcli.la libpdjson.la libsn.la \
	libgcli.la libpdjson.la \
	$(LIBATFC_LIBS)

tests_url_encode_SOURCES = \
@@ -305,16 +303,16 @@ tests_url_encode_CFLAGS = \
	$(AM_CFLAGS) \
	$(LIBATFC_CFLAGS)
tests_url_encode_LDADD = \
	libgcli.la libpdjson.la libsn.la \
	libgcli.la libpdjson.la \
	$(LIBATFC_LIBS)

tests_pretty_print_test_SOURCES = \
	tests/pretty_print_test.c
	tests/pretty_print_test.c \
	thirdparty/sn/sn.c thirdparty/sn/sn.h
tests_pretty_print_test_CFLAGS = \
	$(AM_CFLAGS) \
	$(LIBATFC_CFLAGS)
tests_pretty_print_test_LDADD = \
	libsn.la \
	$(LIBATFC_LIBS)

tests_test_jsongen_SOURCES = \
-- 
2.43.0
Details
Message ID
<D02NYU3CEV7O.1DIH3W38OIIX0@gjnoonan.co.uk>
In-Reply-To
<20240318194158.2663-1-nsonack@herrhotzenplotz.de> (view parent)
DKIM signature
pass
Download raw message
Nico Sonack, Mar 18, 2024 at 19:41:
> A linker error occurred while testing on Haiku/x86_64 where errx
> was undefined. Use our portability code for errx.
>
> The reason why I removed libsn is that I don't want to have libsn
> as a pre-make-all dependency.
>
> Also it is impossible to build sn.c with and without libtool.
>

Applied and pushed. Thanks
Reply to thread Export thread (mbox)