From 7d29bd23b99304b8f504dcc7e086a9a3d58443e9 Mon Sep 17 00:00:00 2001 From: jin-eld Date: Fri, 30 Aug 2013 13:35:48 +0300 Subject: [PATCH 1/3] Forward compatibility with automake 1.14 This update makes sure that the build still works with automake prior to 1.12 and at the same time does not give any warnings or errors with automake 1.14 --- Makefile.am | 1 - auto_tests/Makefile.inc | 4 +-- build/Makefile.am | 10 +++--- configure.ac | 3 +- other/Makefile.inc | 6 ++-- other/bootstrap_serverdaemon/Makefile.inc | 2 +- testing/Makefile.inc | 14 ++++---- toxcore/Makefile.inc | 44 +++++++++++------------ 8 files changed, 42 insertions(+), 42 deletions(-) diff --git a/Makefile.am b/Makefile.am index f44b06ee..ac24c6b7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,6 @@ SUBDIRS = build ACLOCAL_AMFLAGS = -I m4 -AUTOMAKE_OPTIONS = subdir-objects pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = $(top_builddir)/libtoxcore.pc diff --git a/auto_tests/Makefile.inc b/auto_tests/Makefile.inc index bd883a79..199b61e9 100644 --- a/auto_tests/Makefile.inc +++ b/auto_tests/Makefile.inc @@ -5,7 +5,7 @@ TESTS = messenger_autotest crypto_test check_PROGRAMS = messenger_autotest crypto_test messenger_autotest_SOURCES = \ - $(top_srcdir)/auto_tests/messenger_test.c + ../auto_tests/messenger_test.c messenger_autotest_CFLAGS = \ $(LIBSODIUM_CFLAGS) \ @@ -18,7 +18,7 @@ messenger_autotest_LDADD = \ $(CHECK_LIBS) -crypto_test_SOURCES = $(top_srcdir)/auto_tests/crypto_test.c +crypto_test_SOURCES = ../auto_tests/crypto_test.c crypto_test_CFLAGS = $(LIBSODIUM_CFLAGS) \ $(CHECK_CFLAGS) diff --git a/build/Makefile.am b/build/Makefile.am index 5cc735f9..631ec111 100644 --- a/build/Makefile.am +++ b/build/Makefile.am @@ -3,8 +3,8 @@ noinst_PROGRAMS = noinst_bindir = $(top_builddir)/build EXTRA_DIST= -include $(top_srcdir)/toxcore/Makefile.inc -include $(top_srcdir)/other/Makefile.inc -include $(top_srcdir)/testing/Makefile.inc -include $(top_srcdir)/other/bootstrap_serverdaemon/Makefile.inc -include $(top_srcdir)/auto_tests/Makefile.inc +include ../toxcore/Makefile.inc +include ../other/Makefile.inc +include ../testing/Makefile.inc +include ../other/bootstrap_serverdaemon/Makefile.inc +include ../auto_tests/Makefile.inc diff --git a/configure.ac b/configure.ac index a16f6a4f..e82fe1f0 100644 --- a/configure.ac +++ b/configure.ac @@ -6,7 +6,7 @@ AC_INIT([tox], [0.0.0], [http://tox.im]) AC_CONFIG_AUX_DIR(configure_aux) AC_CONFIG_SRCDIR([toxcore/net_crypto.c]) AC_CONFIG_HEADERS([config.h]) -AM_INIT_AUTOMAKE([1.10 -Wall]) +AM_INIT_AUTOMAKE([1.10 -Wall subdir-objects]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_CONFIG_MACRO_DIR([m4]) @@ -107,6 +107,7 @@ AC_ARG_WITH(libsodium-libs, # Checks for programs. AC_PROG_CC AM_PROG_CC_C_O +m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL diff --git a/other/Makefile.inc b/other/Makefile.inc index 7442fb39..2703f26a 100644 --- a/other/Makefile.inc +++ b/other/Makefile.inc @@ -1,8 +1,8 @@ noinst_PROGRAMS += DHT_bootstrap -DHT_bootstrap_SOURCES = $(top_srcdir)/other/DHT_bootstrap.c \ - $(top_srcdir)/toxcore/DHT.h \ - $(top_srcdir)/toxcore/friend_requests.h +DHT_bootstrap_SOURCES = ../other/DHT_bootstrap.c \ + ../toxcore/DHT.h \ + ../toxcore/friend_requests.h DHT_bootstrap_CFLAGS = -I$(top_srcdir)/other \ $(LIBSODIUM_CFLAGS) diff --git a/other/bootstrap_serverdaemon/Makefile.inc b/other/bootstrap_serverdaemon/Makefile.inc index 1320b761..2eaf7b9c 100644 --- a/other/bootstrap_serverdaemon/Makefile.inc +++ b/other/bootstrap_serverdaemon/Makefile.inc @@ -3,7 +3,7 @@ if BUILD_DHT_BOOTSTRAP_DAEMON noinst_PROGRAMS += DHT_bootstrap_daemon DHT_bootstrap_daemon_SOURCES = \ - $(top_srcdir)/other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c + ../other/bootstrap_serverdaemon/DHT_bootstrap_daemon.c DHT_bootstrap_daemon_CFLAGS = \ -I$(top_srcdir)/other/bootstrap_serverdaemon \ diff --git a/testing/Makefile.inc b/testing/Makefile.inc index 99c203c8..9229f917 100644 --- a/testing/Makefile.inc +++ b/testing/Makefile.inc @@ -2,8 +2,8 @@ if BUILD_NTOX bin_PROGRAMS += nTox -nTox_SOURCES = $(top_srcdir)/testing/nTox.h \ - $(top_srcdir)/testing/nTox.c +nTox_SOURCES = ../testing/nTox.h \ + ../testing/nTox.c nTox_CFLAGS = $(LIBSODIUM_CFLAGS) \ $(NCURSES_CFLAGS) @@ -22,7 +22,7 @@ noinst_PROGRAMS += DHT_test \ Messenger_test \ crypto_speed_test -DHT_test_SOURCES = $(top_srcdir)/testing/DHT_test.c +DHT_test_SOURCES = ../testing/DHT_test.c DHT_test_CFLAGS = $(LIBSODIUM_CFLAGS) @@ -33,7 +33,7 @@ DHT_test_LDADD = $(LIBSODIUM_LDFLAGS) \ Lossless_UDP_testclient_SOURCES = \ - $(top_srcdir)/testing/Lossless_UDP_testclient.c + ../testing/Lossless_UDP_testclient.c Lossless_UDP_testclient_CFLAGS = \ $(LIBSODIUM_CFLAGS) @@ -46,7 +46,7 @@ Lossless_UDP_testclient_LDADD = \ Lossless_UDP_testserver_SOURCES = \ - $(top_srcdir)/testing/Lossless_UDP_testserver.c + ../testing/Lossless_UDP_testserver.c Lossless_UDP_testserver_CFLAGS = \ $(LIBSODIUM_CFLAGS) @@ -59,7 +59,7 @@ Lossless_UDP_testserver_LDADD = \ Messenger_test_SOURCES = \ - $(top_srcdir)/testing/Messenger_test.c + ../testing/Messenger_test.c Messenger_test_CFLAGS = $(LIBSODIUM_CFLAGS) @@ -70,7 +70,7 @@ Messenger_test_LDADD = $(LIBSODIUM_LDFLAGS) \ crypto_speed_test_SOURCES = \ - $(top_srcdir)/testing/crypto_speed_test.c + ../testing/crypto_speed_test.c crypto_speed_test_CFLAGS = \ $(LIBSODIUM_CFLAGS) diff --git a/toxcore/Makefile.inc b/toxcore/Makefile.inc index d79a7e1c..23584953 100644 --- a/toxcore/Makefile.inc +++ b/toxcore/Makefile.inc @@ -1,31 +1,31 @@ lib_LTLIBRARIES = libtoxcore.la libtoxcore_la_include_HEADERS = \ - $(top_srcdir)/toxcore/tox.h + ../toxcore/tox.h libtoxcore_la_includedir = $(includedir)/tox -libtoxcore_la_SOURCES = $(top_srcdir)/toxcore/DHT.h \ - $(top_srcdir)/toxcore/DHT.c \ - $(top_srcdir)/toxcore/network.h \ - $(top_srcdir)/toxcore/network.c \ - $(top_srcdir)/toxcore/Lossless_UDP.h \ - $(top_srcdir)/toxcore/Lossless_UDP.c \ - $(top_srcdir)/toxcore/net_crypto.h \ - $(top_srcdir)/toxcore/net_crypto.c \ - $(top_srcdir)/toxcore/friend_requests.h \ - $(top_srcdir)/toxcore/friend_requests.c \ - $(top_srcdir)/toxcore/LAN_discovery.h \ - $(top_srcdir)/toxcore/LAN_discovery.c \ - $(top_srcdir)/toxcore/Messenger.h \ - $(top_srcdir)/toxcore/Messenger.c \ - $(top_srcdir)/toxcore/ping.h \ - $(top_srcdir)/toxcore/ping.c \ - $(top_srcdir)/toxcore/tox.h \ - $(top_srcdir)/toxcore/tox.c \ - $(top_srcdir)/toxcore/util.h \ - $(top_srcdir)/toxcore/util.c \ - $(top_srcdir)/toxcore/misc_tools.h +libtoxcore_la_SOURCES = ../toxcore/DHT.h \ + ../toxcore/DHT.c \ + ../toxcore/network.h \ + ../toxcore/network.c \ + ../toxcore/Lossless_UDP.h \ + ../toxcore/Lossless_UDP.c \ + ../toxcore/net_crypto.h \ + ../toxcore/net_crypto.c \ + ../toxcore/friend_requests.h \ + ../toxcore/friend_requests.c \ + ../toxcore/LAN_discovery.h \ + ../toxcore/LAN_discovery.c \ + ../toxcore/Messenger.h \ + ../toxcore/Messenger.c \ + ../toxcore/ping.h \ + ../toxcore/ping.c \ + ../toxcore/tox.h \ + ../toxcore/tox.c \ + ../toxcore/util.h \ + ../toxcore/util.c \ + ../toxcore/misc_tools.h libtoxcore_la_CFLAGS = -I$(top_srcdir) \ -I$(top_srcdir)/toxcore \ From d9fc869d2f3a52b536ba6602c08f789efb4d0228 Mon Sep 17 00:00:00 2001 From: jin-eld Date: Sun, 1 Sep 2013 21:43:46 +0300 Subject: [PATCH 2/3] Add .dirstamp to gitignore Seems like the subdir-objects automake option is generating .dirstamp files which should be ignored by git. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 99f6cfe8..059987b5 100644 --- a/.gitignore +++ b/.gitignore @@ -49,6 +49,7 @@ libtool .deps .libs +.dirstamp #netbeans nbproject From 4cb969344c8dc8c3326fc860ce08c6fdf1858a59 Mon Sep 17 00:00:00 2001 From: jin-eld Date: Sun, 1 Sep 2013 21:44:26 +0300 Subject: [PATCH 3/3] Add forgoten source to the dist target --- testing/Makefile.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/testing/Makefile.inc b/testing/Makefile.inc index 9229f917..b63e715a 100644 --- a/testing/Makefile.inc +++ b/testing/Makefile.inc @@ -81,3 +81,4 @@ crypto_speed_test_LDADD = \ $(LIBSODIUM_LIBS) \ $(WINSOCK2_LIBS) +EXTRA_DIST += $(top_srcdir)/testing/misc_tools.c