diff options
| author | 2020-06-09 18:19:07 +0200 | |
|---|---|---|
| committer | 2020-06-09 18:19:07 +0200 | |
| commit | c14849987d893999c03f165b49257e108d07bad3 (patch) | |
| tree | e9e8769873b113494958b669700ce107b132a644 | |
| parent | 65a7ffbfb124c2a0acf94b5e88911d6bf95d6009 (diff) | |
| download | libplist-c14849987d893999c03f165b49257e108d07bad3.tar.gz libplist-c14849987d893999c03f165b49257e108d07bad3.tar.bz2 | |
Unfold automake variables into multiple lines for maintainability
| -rw-r--r-- | Makefile.am | 2 | ||||
| -rw-r--r-- | cython/Makefile.am | 36 | ||||
| -rw-r--r-- | fuzz/Makefile.am | 11 | ||||
| -rw-r--r-- | include/Makefile.am | 29 | ||||
| -rw-r--r-- | libcnary/Makefile.am | 17 | ||||
| -rw-r--r-- | src/Makefile.am | 83 | ||||
| -rw-r--r-- | test/Makefile.am | 18 | ||||
| -rw-r--r-- | tools/Makefile.am | 5 |
8 files changed, 129 insertions, 72 deletions
diff --git a/Makefile.am b/Makefile.am index a46e047..b9a1a52 100644 --- a/Makefile.am +++ b/Makefile.am | |||
| @@ -1,9 +1,11 @@ | |||
| 1 | AUTOMAKE_OPTIONS = foreign | 1 | AUTOMAKE_OPTIONS = foreign |
| 2 | ACLOCAL_AMFLAGS = -I m4 | 2 | ACLOCAL_AMFLAGS = -I m4 |
| 3 | SUBDIRS = libcnary src include tools test docs | 3 | SUBDIRS = libcnary src include tools test docs |
| 4 | |||
| 4 | if HAVE_CYTHON | 5 | if HAVE_CYTHON |
| 5 | SUBDIRS += cython | 6 | SUBDIRS += cython |
| 6 | endif | 7 | endif |
| 8 | |||
| 7 | if BUILD_FUZZERS | 9 | if BUILD_FUZZERS |
| 8 | SUBDIRS += fuzz | 10 | SUBDIRS += fuzz |
| 9 | endif | 11 | endif |
diff --git a/cython/Makefile.am b/cython/Makefile.am index bce8121..3c70dc9 100644 --- a/cython/Makefile.am +++ b/cython/Makefile.am | |||
| @@ -3,22 +3,42 @@ AM_CPPFLAGS = -I$(top_srcdir)/include | |||
| 3 | AM_CFLAGS = $(GLOBAL_CFLAGS) | 3 | AM_CFLAGS = $(GLOBAL_CFLAGS) |
| 4 | AM_LDFLAGS = $(GLOBAL_LDFLAGS) | 4 | AM_LDFLAGS = $(GLOBAL_LDFLAGS) |
| 5 | 5 | ||
| 6 | EXTRA_DIST = plist.pyx plist.pxd | 6 | EXTRA_DIST = \ |
| 7 | plist.pyx \ | ||
| 8 | plist.pxd | ||
| 7 | 9 | ||
| 8 | if HAVE_CYTHON | 10 | if HAVE_CYTHON |
| 9 | 11 | ||
| 10 | BUILT_SOURCES = plist.c | 12 | BUILT_SOURCES = plist.c |
| 11 | PXDINCLUDES = plist.pxd $(CYTHON_PLIST_INCLUDE_DIR)/plist.pxd | ||
| 12 | 13 | ||
| 13 | CLEANFILES = \ | 14 | PXDINCLUDES = \ |
| 14 | *.pyc \ | 15 | plist.pxd \ |
| 15 | *.pyo \ | 16 | $(CYTHON_PLIST_INCLUDE_DIR)/plist.pxd |
| 16 | plist.c | 17 | |
| 18 | CLEANFILES = \ | ||
| 19 | *.pyc \ | ||
| 20 | *.pyo \ | ||
| 21 | plist.c | ||
| 17 | 22 | ||
| 18 | plistdir = $(pyexecdir) | 23 | plistdir = $(pyexecdir) |
| 19 | plist_LTLIBRARIES = plist.la | 24 | plist_LTLIBRARIES = plist.la |
| 20 | plist_la_SOURCES = plist_util.c plist_util.h plist.pyx | 25 | plist_la_SOURCES = \ |
| 21 | plist_la_CFLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/src $(PYTHON_CPPFLAGS) $(AM_CFLAGS) -Wno-shadow -Wno-redundant-decls -Wno-switch-default -Wno-strict-aliasing -Wno-implicit-function-declaration -fvisibility=default | 26 | plist_util.c \ |
| 27 | plist_util.h \ | ||
| 28 | plist.pyx | ||
| 29 | |||
| 30 | plist_la_CFLAGS = \ | ||
| 31 | -I$(top_srcdir)/include \ | ||
| 32 | -I$(top_srcdir)/src \ | ||
| 33 | $(PYTHON_CPPFLAGS) \ | ||
| 34 | $(AM_CFLAGS) \ | ||
| 35 | -Wno-shadow \ | ||
| 36 | -Wno-redundant-decls \ | ||
| 37 | -Wno-switch-default \ | ||
| 38 | -Wno-strict-aliasing \ | ||
| 39 | -Wno-implicit-function-declaration \ | ||
| 40 | -fvisibility=default | ||
| 41 | |||
| 22 | plist_la_LDFLAGS = -module -avoid-version $(PYTHON_LIBS) $(AM_LDFLAGS) | 42 | plist_la_LDFLAGS = -module -avoid-version $(PYTHON_LIBS) $(AM_LDFLAGS) |
| 23 | plist_la_LIBADD = $(top_builddir)/src/libplist.la | 43 | plist_la_LIBADD = $(top_builddir)/src/libplist.la |
| 24 | 44 | ||
diff --git a/fuzz/Makefile.am b/fuzz/Makefile.am index b9798f9..a8ef294 100644 --- a/fuzz/Makefile.am +++ b/fuzz/Makefile.am | |||
| @@ -19,7 +19,9 @@ LIBFUZZER_SRC: | |||
| 19 | 19 | ||
| 20 | CLEANFILES = libFuzzer.a | 20 | CLEANFILES = libFuzzer.a |
| 21 | 21 | ||
| 22 | noinst_PROGRAMS = xplist_fuzzer bplist_fuzzer | 22 | noinst_PROGRAMS = \ |
| 23 | xplist_fuzzer \ | ||
| 24 | bplist_fuzzer | ||
| 23 | 25 | ||
| 24 | xplist_fuzzer_SOURCES = xplist_fuzzer.cc | 26 | xplist_fuzzer_SOURCES = xplist_fuzzer.cc |
| 25 | xplist_fuzzer_LDFLAGS = -static | 27 | xplist_fuzzer_LDFLAGS = -static |
| @@ -31,6 +33,11 @@ bplist_fuzzer_LDADD = $(top_builddir)/src/libplist.la libFuzzer.a | |||
| 31 | 33 | ||
| 32 | TESTS = fuzzers.test | 34 | TESTS = fuzzers.test |
| 33 | 35 | ||
| 34 | EXTRA_DIST = bplist.dict xplist.dict init-fuzzers.sh test-fuzzers.sh fuzzers.test | 36 | EXTRA_DIST = \ |
| 37 | bplist.dict \ | ||
| 38 | xplist.dict \ | ||
| 39 | init-fuzzers.sh \ | ||
| 40 | test-fuzzers.sh \ | ||
| 41 | fuzzers.test | ||
| 35 | 42 | ||
| 36 | endif | 43 | endif |
diff --git a/include/Makefile.am b/include/Makefile.am index 4e4db2e..2fa500e 100644 --- a/include/Makefile.am +++ b/include/Makefile.am | |||
| @@ -1,14 +1,15 @@ | |||
| 1 | nobase_include_HEADERS = plist/plist.h \ | 1 | nobase_include_HEADERS = \ |
| 2 | plist/plist++.h \ | 2 | plist/plist.h \ |
| 3 | plist/Array.h \ | 3 | plist/plist++.h \ |
| 4 | plist/Boolean.h \ | 4 | plist/Array.h \ |
| 5 | plist/Data.h \ | 5 | plist/Boolean.h \ |
| 6 | plist/Date.h \ | 6 | plist/Data.h \ |
| 7 | plist/Dictionary.h \ | 7 | plist/Date.h \ |
| 8 | plist/Integer.h \ | 8 | plist/Dictionary.h \ |
| 9 | plist/Key.h \ | 9 | plist/Integer.h \ |
| 10 | plist/Node.h \ | 10 | plist/Key.h \ |
| 11 | plist/Real.h \ | 11 | plist/Node.h \ |
| 12 | plist/String.h \ | 12 | plist/Real.h \ |
| 13 | plist/Structure.h \ | 13 | plist/String.h \ |
| 14 | plist/Uid.h | 14 | plist/Structure.h \ |
| 15 | plist/Uid.h | ||
diff --git a/libcnary/Makefile.am b/libcnary/Makefile.am index e2187ec..f5c7bc9 100644 --- a/libcnary/Makefile.am +++ b/libcnary/Makefile.am | |||
| @@ -1,12 +1,15 @@ | |||
| 1 | AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/libcnary/include | 1 | AM_CFLAGS = \ |
| 2 | $(GLOBAL_CFLAGS) \ | ||
| 3 | -I$(top_srcdir)/libcnary/include | ||
| 4 | |||
| 2 | AM_LDFLAGS = | 5 | AM_LDFLAGS = |
| 3 | 6 | ||
| 4 | noinst_LTLIBRARIES = libcnary.la | 7 | noinst_LTLIBRARIES = libcnary.la |
| 5 | libcnary_la_LIBADD = | 8 | libcnary_la_LIBADD = |
| 6 | libcnary_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined | 9 | libcnary_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined |
| 7 | libcnary_la_SOURCES = \ | 10 | libcnary_la_SOURCES = \ |
| 8 | node.c \ | 11 | node.c \ |
| 9 | node_list.c \ | 12 | node_list.c \ |
| 10 | include/node.h \ | 13 | include/node.h \ |
| 11 | include/node_list.h \ | 14 | include/node_list.h \ |
| 12 | include/object.h | 15 | include/object.h |
diff --git a/src/Makefile.am b/src/Makefile.am index 7fe500a..02b0478 100644 --- a/src/Makefile.am +++ b/src/Makefile.am | |||
| @@ -1,47 +1,56 @@ | |||
| 1 | AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_srcdir) -I$(top_srcdir)/libcnary/include | 1 | AM_CPPFLAGS = \ |
| 2 | -I$(top_srcdir)/include \ | ||
| 3 | -I$(top_srcdir) \ | ||
| 4 | -I$(top_srcdir)/libcnary/include | ||
| 2 | 5 | ||
| 3 | AM_CFLAGS = $(GLOBAL_CFLAGS) | 6 | AM_CFLAGS = $(GLOBAL_CFLAGS) |
| 4 | AM_LDFLAGS = $(GLOBAL_LDFLAGS) | 7 | AM_LDFLAGS = $(GLOBAL_LDFLAGS) |
| 5 | 8 | ||
| 6 | lib_LTLIBRARIES = libplist.la libplist++.la | 9 | lib_LTLIBRARIES = \ |
| 10 | libplist.la \ | ||
| 11 | libplist++.la | ||
| 12 | |||
| 7 | libplist_la_LIBADD = $(top_builddir)/libcnary/libcnary.la | 13 | libplist_la_LIBADD = $(top_builddir)/libcnary/libcnary.la |
| 8 | libplist_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPLIST_SO_VERSION) -no-undefined | 14 | libplist_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPLIST_SO_VERSION) -no-undefined |
| 9 | libplist_la_SOURCES = base64.c base64.h \ | 15 | libplist_la_SOURCES = \ |
| 10 | bytearray.c bytearray.h \ | 16 | base64.c base64.h \ |
| 11 | strbuf.h \ | 17 | bytearray.c bytearray.h \ |
| 12 | hashtable.c hashtable.h \ | 18 | strbuf.h \ |
| 13 | ptrarray.c ptrarray.h \ | 19 | hashtable.c hashtable.h \ |
| 14 | time64.c time64.h time64_limits.h \ | 20 | ptrarray.c ptrarray.h \ |
| 15 | xplist.c \ | 21 | time64.c time64.h \ |
| 16 | bplist.c \ | 22 | time64_limits.h \ |
| 17 | plist.c plist.h | 23 | xplist.c \ |
| 24 | bplist.c \ | ||
| 25 | plist.c plist.h | ||
| 18 | 26 | ||
| 19 | libplist___la_LIBADD = libplist.la | 27 | libplist___la_LIBADD = libplist.la |
| 20 | libplist___la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPLIST_SO_VERSION) -no-undefined | 28 | libplist___la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LIBPLIST_SO_VERSION) -no-undefined |
| 21 | libplist___la_SOURCES = Node.cpp \ | 29 | libplist___la_SOURCES = \ |
| 22 | Structure.cpp \ | 30 | Node.cpp \ |
| 23 | Array.cpp \ | 31 | Structure.cpp \ |
| 24 | Boolean.cpp \ | 32 | Array.cpp \ |
| 25 | Data.cpp \ | 33 | Boolean.cpp \ |
| 26 | Date.cpp \ | 34 | Data.cpp \ |
| 27 | Dictionary.cpp \ | 35 | Date.cpp \ |
| 28 | Integer.cpp \ | 36 | Dictionary.cpp \ |
| 29 | Key.cpp \ | 37 | Integer.cpp \ |
| 30 | Real.cpp \ | 38 | Key.cpp \ |
| 31 | String.cpp \ | 39 | Real.cpp \ |
| 32 | Uid.cpp \ | 40 | String.cpp \ |
| 33 | $(top_srcdir)/include/plist/Node.h \ | 41 | Uid.cpp \ |
| 34 | $(top_srcdir)/include/plist/Structure.h \ | 42 | $(top_srcdir)/include/plist/Node.h \ |
| 35 | $(top_srcdir)/include/plist/Array.h \ | 43 | $(top_srcdir)/include/plist/Structure.h \ |
| 36 | $(top_srcdir)/include/plist/Boolean.h \ | 44 | $(top_srcdir)/include/plist/Array.h \ |
| 37 | $(top_srcdir)/include/plist/Data.h \ | 45 | $(top_srcdir)/include/plist/Boolean.h \ |
| 38 | $(top_srcdir)/include/plist/Date.h \ | 46 | $(top_srcdir)/include/plist/Data.h \ |
| 39 | $(top_srcdir)/include/plist/Dictionary.h \ | 47 | $(top_srcdir)/include/plist/Date.h \ |
| 40 | $(top_srcdir)/include/plist/Integer.h \ | 48 | $(top_srcdir)/include/plist/Dictionary.h \ |
| 41 | $(top_srcdir)/include/plist/Key.h \ | 49 | $(top_srcdir)/include/plist/Integer.h \ |
| 42 | $(top_srcdir)/include/plist/Real.h \ | 50 | $(top_srcdir)/include/plist/Key.h \ |
| 43 | $(top_srcdir)/include/plist/String.h \ | 51 | $(top_srcdir)/include/plist/Real.h \ |
| 44 | $(top_srcdir)/include/plist/Uid.h | 52 | $(top_srcdir)/include/plist/String.h \ |
| 53 | $(top_srcdir)/include/plist/Uid.h | ||
| 45 | 54 | ||
| 46 | if WIN32 | 55 | if WIN32 |
| 47 | libplist_la_LDFLAGS += -avoid-version -static-libgcc | 56 | libplist_la_LDFLAGS += -avoid-version -static-libgcc |
| @@ -49,4 +58,6 @@ libplist___la_LDFLAGS += -avoid-version -static-libgcc | |||
| 49 | endif | 58 | endif |
| 50 | 59 | ||
| 51 | pkgconfigdir = $(libdir)/pkgconfig | 60 | pkgconfigdir = $(libdir)/pkgconfig |
| 52 | pkgconfig_DATA = libplist-2.0.pc libplist++-2.0.pc | 61 | pkgconfig_DATA = \ |
| 62 | libplist-2.0.pc \ | ||
| 63 | libplist++-2.0.pc | ||
diff --git a/test/Makefile.am b/test/Makefile.am index 4519de0..2f5e1b9 100644 --- a/test/Makefile.am +++ b/test/Makefile.am | |||
| @@ -1,10 +1,18 @@ | |||
| 1 | AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/include -I$(top_srcdir)/libcnary/include | 1 | AM_CFLAGS = \ |
| 2 | $(GLOBAL_CFLAGS) \ | ||
| 3 | -I$(top_srcdir)/include \ | ||
| 4 | -I$(top_srcdir)/libcnary/include | ||
| 5 | |||
| 2 | AM_LDFLAGS = | 6 | AM_LDFLAGS = |
| 3 | 7 | ||
| 4 | noinst_PROGRAMS = plist_cmp plist_test | 8 | noinst_PROGRAMS = \ |
| 9 | plist_cmp \ | ||
| 10 | plist_test | ||
| 5 | 11 | ||
| 6 | plist_cmp_SOURCES = plist_cmp.c | 12 | plist_cmp_SOURCES = plist_cmp.c |
| 7 | plist_cmp_LDADD = $(top_builddir)/src/libplist.la $(top_builddir)/libcnary/libcnary.la | 13 | plist_cmp_LDADD = \ |
| 14 | $(top_builddir)/src/libplist.la \ | ||
| 15 | $(top_builddir)/libcnary/libcnary.la | ||
| 8 | 16 | ||
| 9 | plist_test_SOURCES = plist_test.c | 17 | plist_test_SOURCES = plist_test.c |
| 10 | plist_test_LDADD = $(top_builddir)/src/libplist.la | 18 | plist_test_LDADD = $(top_builddir)/src/libplist.la |
| @@ -77,7 +85,9 @@ EXTRA_DIST = \ | |||
| 77 | data/unsigned.bplist \ | 85 | data/unsigned.bplist \ |
| 78 | data/unsigned.plist | 86 | data/unsigned.plist |
| 79 | 87 | ||
| 80 | TESTS_ENVIRONMENT = top_srcdir=$(top_srcdir) top_builddir=$(top_builddir) | 88 | TESTS_ENVIRONMENT = \ |
| 89 | top_srcdir=$(top_srcdir) \ | ||
| 90 | top_builddir=$(top_builddir) | ||
| 81 | 91 | ||
| 82 | clean-local: | 92 | clean-local: |
| 83 | if test -d $(top_builddir)/test/data; then cd $(top_builddir)/test/data && rm -f *.out *.bin *.xml; fi | 93 | if test -d $(top_builddir)/test/data; then cd $(top_builddir)/test/data && rm -f *.out *.bin *.xml; fi |
diff --git a/tools/Makefile.am b/tools/Makefile.am index 67b7dd7..3b4e06c 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am | |||
| @@ -1,4 +1,7 @@ | |||
| 1 | AM_CFLAGS = $(GLOBAL_CFLAGS) -I$(top_srcdir)/include | 1 | AM_CFLAGS = \ |
| 2 | $(GLOBAL_CFLAGS) \ | ||
| 3 | -I$(top_srcdir)/include | ||
| 4 | |||
| 2 | AM_LDFLAGS = | 5 | AM_LDFLAGS = |
| 3 | 6 | ||
| 4 | bin_PROGRAMS = plistutil | 7 | bin_PROGRAMS = plistutil |
