Commit 18abc726fb28c979a6a3b7c7123d6a779e0cd01e

Authored by Stéphane Raimbault
1 parent b80577a5

Removed Waf support

I don't want to put a burden on build system support anymore
@@ -19,29 +19,11 @@ The licence of programs in the tests directory is GPL v3. @@ -19,29 +19,11 @@ The licence of programs in the tests directory is GPL v3.
19 https://launchpad.net/libmodbus 19 https://launchpad.net/libmodbus
20 http://copyleft.free.fr/wordpress/index.php/libmodbus/ 20 http://copyleft.free.fr/wordpress/index.php/libmodbus/
21 21
22 -  
23 Installation 22 Installation
24 ============ 23 ============
25 24
26 -WARNING, don't use the two build systems at the same time.  
27 -  
28 -With autotools  
29 ---------------  
30 The shell commands are './configure; make; make install'. 25 The shell commands are './configure; make; make install'.
31 26
32 -With Waf  
33 ---------  
34 -The build system is Waf (http://code.google.com/p/waf), the shell commandes are:  
35 - $ ./waf configure  
36 - $ ./waf build  
37 - $ sudo ./waf install  
38 -  
39 -or 'waf' if you use a global Waf script.  
40 -  
41 -The sources are built in the 'build' directory at the root of the  
42 -project source files.  
43 -  
44 -  
45 Testing 27 Testing
46 ======= 28 =======
47 29
src/wscript_build deleted
1 -obj = bld.new_task_gen(  
2 - features='cc cshlib',  
3 - source='modbus.c',  
4 - target='modbus',  
5 - vnum=VERSION,  
6 - includes='. ..')  
7 -  
8 -bld.install_files('${PREFIX}/include/modbus', 'modbus.h')  
tests/wscript_build deleted
1 -programs = ('random-test-slave',  
2 - 'unit-test-slave',  
3 - 'unit-test-master',  
4 - 'bandwidth-slave-one',  
5 - 'bandwidth-slave-many-up',  
6 - 'bandwidth-master')  
7 -  
8 -for program in programs:  
9 - obj = bld.new_task_gen(  
10 - features = 'cc cprogram',  
11 - source = program + '.c',  
12 - target = program,  
13 - includes = '. ../src',  
14 - uselib_local = 'modbus',  
15 - install_path='')  
waf deleted
No preview for this file type
wscript deleted
1 -#! /usr/bin/env python  
2 -# encoding: utf-8  
3 -  
4 -VERSION = '2.2.0'  
5 -APPNAME = 'libmodbus'  
6 -  
7 -# these variables are mandatory ('/' are converted automatically)  
8 -srcdir = '.'  
9 -blddir = 'build'  
10 -  
11 -def set_options(opt):  
12 - # options provided by the modules  
13 - opt.tool_options('compiler_cc')  
14 -  
15 -def configure(conf):  
16 - conf.check_tool('compiler_cc')  
17 - conf.check_tool('misc')  
18 -  
19 - headers = 'string.h termios.h sys/time.h \  
20 - unistd.h errno.h limits.h fcntl.h \  
21 - sys/types.h sys/socket.h sys/ioctl.h \  
22 - netinet/in.h netinet/ip.h netinet/tcp.h arpa/inet.h'  
23 -  
24 - # check for headers and append found headers to headers_found for later use  
25 - headers_found = []  
26 - for header in headers.split():  
27 - if conf.check_cc(header_name=header):  
28 - headers_found.append(header)  
29 -  
30 - functions_headers = (  
31 - ('setsockopt', 'sys/socket.h'),  
32 - ('inet_ntoa', 'arpa/inet.h'),  
33 - ('memset', 'string.h'),  
34 - ('select', 'sys/select.h'),  
35 - ('socket', 'sys/socket.h'),  
36 - )  
37 -  
38 - for (function, headers) in functions_headers:  
39 - conf.check_cc(function_name=function, header_name=headers, mandatory=1)  
40 -  
41 - conf.define('VERSION', VERSION)  
42 - conf.define('PACKAGE', 'libmodbus')  
43 - conf.write_config_header('config.h')  
44 -  
45 -def build(bld):  
46 - import misc  
47 -  
48 - bld.add_subdirs('src tests')  
49 -  
50 - obj = bld.new_task_gen(features='subst',  
51 - source='modbus.pc.in',  
52 - target='modbus.pc',  
53 - dict = {'VERSION' : VERSION,  
54 - 'prefix': bld.env['PREFIX'],  
55 - 'exec_prefix': bld.env['PREFIX'],  
56 - 'libdir': bld.env['PREFIX'] + 'lib',  
57 - 'includedir': bld.env['PREFIX'] + 'include'}  
58 - )  
59 -  
60 - bld.install_files('${PREFIX}/lib/pkgconfig', 'modbus.pc')  
61 -  
62 -def shutdown():  
63 - import UnitTest  
64 - unittest = UnitTest.unit_test()  
65 - unittest.run()  
66 - unittest.print_results()