Эх сурвалжийг харах

Revert "Rename src to modbus"

This reverts commit df0cf7927249954f15e0aa85b02d21b990fa9af9.
Use <modbus.h> in tests.
Stéphane Raimbault 14 жил өмнө
parent
commit
4a38de0a52

+ 1 - 1
Makefile.am

@@ -1,5 +1,5 @@
 EXTRA_DIST = MIGRATION libmodbus.spec
-SUBDIRS = modbus tests
+SUBDIRS = src tests
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = libmodbus.pc

+ 3 - 3
configure.ac

@@ -23,7 +23,7 @@ m4_define([mb_version], [mb_version_major.mb_version_minor.mb_version_micro])
 
 AC_PREREQ(2.63)
 AC_INIT([libmodbus],[mb_version],[stephane.raimbault@gmail.com])
-AC_CONFIG_SRCDIR([modbus/modbus.c])
+AC_CONFIG_SRCDIR([src/modbus.c])
 AC_CONFIG_HEADERS([config.h])
 AM_INIT_AUTOMAKE([foreign])
 # enable nice build output on automake1.11
@@ -74,8 +74,8 @@ AC_CHECK_FUNCS([gettimeofday inet_ntoa memset select socket strerror])
 
 AC_CONFIG_FILES([
         Makefile
-        modbus/Makefile
-        modbus/version.h
+        src/Makefile
+        src/version.h
         tests/Makefile
         libmodbus.pc
 ])

+ 1 - 1
modbus/Makefile.am → src/Makefile.am

@@ -3,7 +3,7 @@ libmodbus_la_SOURCES = modbus.c modbus.h version.h
 libmodbus_la_LDFLAGS = $(MB_LT_LDFLAGS)
 
 # Include files to install
-libmodbusincludedir = $(includedir)/modbus
+libmodbusincludedir = $(includedir)
 libmodbusinclude_HEADERS = modbus.h version.h
 
 DISTCLEANFILES = version.h

+ 1 - 2
modbus/modbus.c → src/modbus.c

@@ -62,8 +62,7 @@
 #endif
 
 #include <config.h>
-
-#include <modbus/modbus.h>
+#include "modbus.h"
 
 /* Exported version */
 const unsigned int mb_version_major = MB_VERSION_MAJOR;

+ 0 - 0
modbus/modbus.h → src/modbus.h


+ 0 - 0
modbus/version.h.in → src/version.h.in


+ 2 - 2
tests/Makefile.am

@@ -11,7 +11,7 @@ noinst_PROGRAMS = \
 	version
 
 common_ldflags = \
-	$(top_builddir)/modbus/libmodbus.la
+	$(top_builddir)/src/libmodbus.la
 
 random_test_slave_SOURCES = random-test-slave.c
 random_test_slave_LDADD = $(common_ldflags)
@@ -37,5 +37,5 @@ bandwidth_master_LDADD = $(common_ldflags)
 version_SOURCES = version.c
 version_LDADD = $(common_ldflags)
 
-INCLUDES = -I$(top_srcdir)
+INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/src
 CLEANFILES = *~

+ 1 - 1
tests/bandwidth-master.c

@@ -23,7 +23,7 @@
 #include <sys/time.h>
 #include <errno.h>
 
-#include <modbus/modbus.h>
+#include <modbus.h>
 
 /* Tests based on PI-MBUS-300 documentation */
 #define SLAVE     0x11

+ 1 - 1
tests/bandwidth-slave-many-up.c

@@ -22,7 +22,7 @@
 #include <errno.h>
 #include <signal.h>
 
-#include <modbus/modbus.h>
+#include <modbus.h>
 
 #define SLAVE         0x11
 #define NB_CONNECTION    5

+ 1 - 1
tests/bandwidth-slave-one.c

@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include <modbus/modbus.h>
+#include <modbus.h>
 
 #define SLAVE 0x11
 

+ 1 - 1
tests/random-test-master.c

@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include <modbus/modbus.h>
+#include <modbus.h>
 
 /* The goal of this program is to check all major functions of
    libmodbus:

+ 1 - 1
tests/random-test-slave.c

@@ -20,7 +20,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include <modbus/modbus.h>
+#include <modbus.h>
 
 #define SLAVE 0x11
 

+ 1 - 1
tests/unit-test-master.c

@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include <modbus/modbus.h>
+#include <modbus.h>
 #include "unit-test.h"
 
 /* Tests based on PI-MBUS-300 documentation */

+ 1 - 1
tests/unit-test-slave.c

@@ -21,7 +21,7 @@
 #include <stdlib.h>
 #include <errno.h>
 
-#include <modbus/modbus.h>
+#include <modbus.h>
 #include "unit-test.h"
 
 int main(void)

+ 1 - 1
tests/version.c

@@ -16,7 +16,7 @@
  */
 
 #include <stdio.h>
-#include <modbus/modbus.h>
+#include <modbus.h>
 
 int main(void)
 {