Commit 4a38de0a5269272e1bfdec25f8dcc1804ff0f860

Authored by Stéphane Raimbault
1 parent f0e7ad21

Revert "Rename src to modbus"

This reverts commit df0cf7927249954f15e0aa85b02d21b990fa9af9.
Use <modbus.h> in tests.
Makefile.am
1 EXTRA_DIST = MIGRATION libmodbus.spec 1 EXTRA_DIST = MIGRATION libmodbus.spec
2 -SUBDIRS = modbus tests 2 +SUBDIRS = src tests
3 3
4 pkgconfigdir = $(libdir)/pkgconfig 4 pkgconfigdir = $(libdir)/pkgconfig
5 pkgconfig_DATA = libmodbus.pc 5 pkgconfig_DATA = libmodbus.pc
configure.ac
@@ -23,7 +23,7 @@ m4_define([mb_version], [mb_version_major.mb_version_minor.mb_version_micro]) @@ -23,7 +23,7 @@ m4_define([mb_version], [mb_version_major.mb_version_minor.mb_version_micro])
23 23
24 AC_PREREQ(2.63) 24 AC_PREREQ(2.63)
25 AC_INIT([libmodbus],[mb_version],[stephane.raimbault@gmail.com]) 25 AC_INIT([libmodbus],[mb_version],[stephane.raimbault@gmail.com])
26 -AC_CONFIG_SRCDIR([modbus/modbus.c]) 26 +AC_CONFIG_SRCDIR([src/modbus.c])
27 AC_CONFIG_HEADERS([config.h]) 27 AC_CONFIG_HEADERS([config.h])
28 AM_INIT_AUTOMAKE([foreign]) 28 AM_INIT_AUTOMAKE([foreign])
29 # enable nice build output on automake1.11 29 # enable nice build output on automake1.11
@@ -74,8 +74,8 @@ AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror]) @@ -74,8 +74,8 @@ AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror])
74 74
75 AC_CONFIG_FILES([ 75 AC_CONFIG_FILES([
76 Makefile 76 Makefile
77 - modbus/Makefile  
78 - modbus/version.h 77 + src/Makefile
  78 + src/version.h
79 tests/Makefile 79 tests/Makefile
80 libmodbus.pc 80 libmodbus.pc
81 ]) 81 ])
modbus/Makefile.am renamed to src/Makefile.am
@@ -3,7 +3,7 @@ libmodbus_la_SOURCES = modbus.c modbus.h version.h @@ -3,7 +3,7 @@ libmodbus_la_SOURCES = modbus.c modbus.h version.h
3 libmodbus_la_LDFLAGS = $(MB_LT_LDFLAGS) 3 libmodbus_la_LDFLAGS = $(MB_LT_LDFLAGS)
4 4
5 # Include files to install 5 # Include files to install
6 -libmodbusincludedir = $(includedir)/modbus 6 +libmodbusincludedir = $(includedir)
7 libmodbusinclude_HEADERS = modbus.h version.h 7 libmodbusinclude_HEADERS = modbus.h version.h
8 8
9 DISTCLEANFILES = version.h 9 DISTCLEANFILES = version.h
modbus/modbus.c renamed to src/modbus.c
@@ -62,8 +62,7 @@ @@ -62,8 +62,7 @@
62 #endif 62 #endif
63 63
64 #include <config.h> 64 #include <config.h>
65 -  
66 -#include <modbus/modbus.h> 65 +#include "modbus.h"
67 66
68 /* Exported version */ 67 /* Exported version */
69 const unsigned int mb_version_major = MB_VERSION_MAJOR; 68 const unsigned int mb_version_major = MB_VERSION_MAJOR;
modbus/modbus.h renamed to src/modbus.h
modbus/version.h.in renamed to src/version.h.in
tests/Makefile.am
@@ -11,7 +11,7 @@ noinst_PROGRAMS = \ @@ -11,7 +11,7 @@ noinst_PROGRAMS = \
11 version 11 version
12 12
13 common_ldflags = \ 13 common_ldflags = \
14 - $(top_builddir)/modbus/libmodbus.la 14 + $(top_builddir)/src/libmodbus.la
15 15
16 random_test_slave_SOURCES = random-test-slave.c 16 random_test_slave_SOURCES = random-test-slave.c
17 random_test_slave_LDADD = $(common_ldflags) 17 random_test_slave_LDADD = $(common_ldflags)
@@ -37,5 +37,5 @@ bandwidth_master_LDADD = $(common_ldflags) @@ -37,5 +37,5 @@ bandwidth_master_LDADD = $(common_ldflags)
37 version_SOURCES = version.c 37 version_SOURCES = version.c
38 version_LDADD = $(common_ldflags) 38 version_LDADD = $(common_ldflags)
39 39
40 -INCLUDES = -I$(top_srcdir) 40 +INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
41 CLEANFILES = *~ 41 CLEANFILES = *~
tests/bandwidth-master.c
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 #include <sys/time.h> 23 #include <sys/time.h>
24 #include <errno.h> 24 #include <errno.h>
25 25
26 -#include <modbus/modbus.h> 26 +#include <modbus.h>
27 27
28 /* Tests based on PI-MBUS-300 documentation */ 28 /* Tests based on PI-MBUS-300 documentation */
29 #define SLAVE 0x11 29 #define SLAVE 0x11
tests/bandwidth-slave-many-up.c
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 #include <errno.h> 22 #include <errno.h>
23 #include <signal.h> 23 #include <signal.h>
24 24
25 -#include <modbus/modbus.h> 25 +#include <modbus.h>
26 26
27 #define SLAVE 0x11 27 #define SLAVE 0x11
28 #define NB_CONNECTION 5 28 #define NB_CONNECTION 5
tests/bandwidth-slave-one.c
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 #include <stdlib.h> 21 #include <stdlib.h>
22 #include <errno.h> 22 #include <errno.h>
23 23
24 -#include <modbus/modbus.h> 24 +#include <modbus.h>
25 25
26 #define SLAVE 0x11 26 #define SLAVE 0x11
27 27
tests/random-test-master.c
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 #include <stdlib.h> 21 #include <stdlib.h>
22 #include <errno.h> 22 #include <errno.h>
23 23
24 -#include <modbus/modbus.h> 24 +#include <modbus.h>
25 25
26 /* The goal of this program is to check all major functions of 26 /* The goal of this program is to check all major functions of
27 libmodbus: 27 libmodbus:
tests/random-test-slave.c
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 #include <stdlib.h> 20 #include <stdlib.h>
21 #include <errno.h> 21 #include <errno.h>
22 22
23 -#include <modbus/modbus.h> 23 +#include <modbus.h>
24 24
25 #define SLAVE 0x11 25 #define SLAVE 0x11
26 26
tests/unit-test-master.c
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 #include <stdlib.h> 21 #include <stdlib.h>
22 #include <errno.h> 22 #include <errno.h>
23 23
24 -#include <modbus/modbus.h> 24 +#include <modbus.h>
25 #include "unit-test.h" 25 #include "unit-test.h"
26 26
27 /* Tests based on PI-MBUS-300 documentation */ 27 /* Tests based on PI-MBUS-300 documentation */
tests/unit-test-slave.c
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 #include <stdlib.h> 21 #include <stdlib.h>
22 #include <errno.h> 22 #include <errno.h>
23 23
24 -#include <modbus/modbus.h> 24 +#include <modbus.h>
25 #include "unit-test.h" 25 #include "unit-test.h"
26 26
27 int main(void) 27 int main(void)
tests/version.c
@@ -16,7 +16,7 @@ @@ -16,7 +16,7 @@
16 */ 16 */
17 17
18 #include <stdio.h> 18 #include <stdio.h>
19 -#include <modbus/modbus.h> 19 +#include <modbus.h>
20 20
21 int main(void) 21 int main(void)
22 { 22 {