[rtems-libbsd commit] Add RTEMS version support, update all python to 2 and 3.

Chris Johns chrisj at rtems.org
Mon Apr 18 00:56:32 UTC 2016


Module:    rtems-libbsd
Branch:    master
Commit:    97c5024a79eda757180eab27949735722030daf1
Changeset: http://git.rtems.org/rtems-libbsd/commit/?id=97c5024a79eda757180eab27949735722030daf1

Author:    Chris Johns <chrisj at rtems.org>
Date:      Mon Apr 18 10:53:20 2016 +1000

Add RTEMS version support, update all python to 2 and 3.

Add support to force the RTEMS version. This remove the need for using
the --rtems-version command line option if the automatic detection fails.

Update all python code to support python 2 and 3.

Update rtems_waf to the latest version to support the RTEMS version,
check environment variables and to display the CC version.

Sort all tests. I think the unsorted list is dependent on the version
of python and so would result in repo noise as if it regenerted.

---

 README.waf          |  30 ++++++++
 builder.py          |  29 +++++---
 freebsd-to-rtems.py |  87 +++++++++++-----------
 libbsd.py           |   8 ++-
 libbsd.txt          |  92 ++++++++----------------
 rtems_waf           |   2 +-
 waf_generator.py    |  20 ++++--
 wscript             | 204 ++++++++++++++++++++++++++--------------------------
 8 files changed, 249 insertions(+), 223 deletions(-)

diff --git a/README.waf b/README.waf
index 54d5abe..0b53d96 100644
--- a/README.waf
+++ b/README.waf
@@ -105,3 +105,33 @@ Steps
     configuration information. If you have a few source trees working at any
     one time with different tool sets or configurations you can easly move
     between them safe in the knowledge that one build will not infect another.
+
+
+Updating RTEMS Waf Support
+~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+If you have a working libbsd repository and new changes to the `rtems_waf`
+submodule has been made, you will need update. A `git status` will indicate
+there are new commits with:
+
+  $ git status
+      [ snip output ]
+            modified:   rtems_waf (new commits)
+      [ snip output ]
+
+To update:
+
+  $ git submodule update rtems_waf
+
+Please make sure you use the exact command or you might find you are cloning
+the whole of the FreeBSD source tree. If that happens simply git ^C and try
+again.
+
+The following is for developers only who need to move libbsd to a newer
+versions:
+
+ $ git submodule update rtems_waf
+ $ cd rtems_waf
+ $ git checkout master
+ $ git pull
+ $ git commit -m "Update rtems_waf" rtems_waf
diff --git a/builder.py b/builder.py
index 3fbe497..58b379a 100755
--- a/builder.py
+++ b/builder.py
@@ -1,5 +1,5 @@
 #
-#  Copyright (c) 2015 Chris Johns <chrisj at rtems.org>. All rights reserved.
+#  Copyright (c) 2015-2016 Chris Johns <chrisj at rtems.org>. All rights reserved.
 #
 #  Copyright (c) 2009-2015 embedded brains GmbH.  All rights reserved.
 #
@@ -34,6 +34,8 @@
 
 # FreeBSD: http://svn.freebsd.org/base/releng/8.2/sys (revision 222485)
 
+from __future__ import print_function
+
 import shutil
 import os
 import re
@@ -50,7 +52,14 @@ FreeBSD_DIR = "freebsd-org"
 isVerbose = False
 isDryRun = False
 isDiffMode = False
-filesProcessed = 0
+filesProcessedCount = 0
+filesProcessed = []
+
+def changedFileSummary():
+    if isDiffMode == False:
+        print('%d file(s) were changed:' % (filesProcessedCount))
+        for f in sorted(filesProcessed):
+            print(' %s' % (f))
 
 class error(Exception):
     """Base class for exceptions."""
@@ -131,20 +140,22 @@ def header_paths():
 #  + copy or diff depending on execution mode
 def processIfDifferent(new, old, src):
 
+    global filesProcessedCount
     global filesProcessed
     global isVerbose, isDryRun, isEarlyExit
 
     if not os.path.exists(old) or \
        filecmp.cmp(new, old, shallow = False) == False:
-        filesProcessed += 1
+        filesProcessed += [old]
+        filesProcessedCount += 1
         if isDiffMode == False:
             if isVerbose == True:
-                print "Move " + src + " to " + old
+                print("Move " + src + " to " + old)
             if isDryRun == False:
                 shutil.move(new, old)
         else:
             if isVerbose == True:
-                print "Diff %s => %s" % (src, new)
+                print("Diff %s => %s" % (src, new))
             old_contents = open(old).readlines()
             new_contents = open(new).readlines()
             for line in \
@@ -191,14 +202,14 @@ def revertFixLocalIncludes(data):
 
 def assertHeaderFile(path):
     if path[-2] != '.' or path[-1] != 'h':
-        print "*** " + path + " does not end in .h"
-        print "*** Move it to a C source file list"
+        print("*** " + path + " does not end in .h")
+        print("*** Move it to a C source file list")
         sys.exit(2)
 
 def assertSourceFile(path):
     if path[-2] != '.' or (path[-1] != 'c' and path[-1] != 'S'):
-        print "*** " + path + " does not end in .c"
-        print "*** Move it to a header file list"
+        print("*** " + path + " does not end in .c")
+        print("*** Move it to a header file list")
         sys.exit(2)
 
 class Converter(object):
diff --git a/freebsd-to-rtems.py b/freebsd-to-rtems.py
index 37c70e0..7734377 100755
--- a/freebsd-to-rtems.py
+++ b/freebsd-to-rtems.py
@@ -1,6 +1,6 @@
 #! /usr/bin/env python
 #
-#  Copyright (c) 2015 Chris Johns <chrisj at rtems.org>. All rights reserved.
+#  Copyright (c) 2015-2016 Chris Johns <chrisj at rtems.org>. All rights reserved.
 #
 #  Copyright (c) 2009-2015 embedded brains GmbH.  All rights reserved.
 #
@@ -35,51 +35,54 @@
 
 # FreeBSD: http://svn.freebsd.org/base/releng/8.2/sys (revision 222485)
 
+from __future__ import print_function
+
 import os
 import sys
 import getopt
 
 import builder
-import makefile
 import waf_generator
 import libbsd
 
 isForward = True
 isEarlyExit = False
-isOnlyMakefile = False
+isOnlyBuildScripts = False
 
 def usage():
-    print "freebsd-to-rtems.py [args]"
-    print "  -?|-h|--help     print this and exit"
-    print "  -d|--dry-run     run program but no modifications"
-    print "  -D|--diff        provide diff of files between trees"
-    print "  -e|--early-exit  evaluate arguments, print results, and exit"
-    print "  -m|--makefile    just generate Makefile"
-    print "  -R|--reverse     default FreeBSD -> RTEMS, reverse that"
-    print "  -r|--rtems       RTEMS Libbsd directory (default: '.')"
-    print "  -f|--freebsd     FreeBSD SVN directory (default: 'freebsd-org')"
-    print "  -v|--verbose     enable verbose output mode"
+    print("freebsd-to-rtems.py [args]")
+    print("  -?|-h|--help      print this and exit")
+    print("  -d|--dry-run      run program but no modifications")
+    print("  -D|--diff         provide diff of files between trees")
+    print("  -e|--early-exit   evaluate arguments, print results, and exit")
+    print("  -m|--makefile     Warning: depreciated and will be removed ")
+    print("  -b|--buildscripts just generate the build scripts")
+    print("  -R|--reverse      default FreeBSD -> RTEMS, reverse that")
+    print("  -r|--rtems        RTEMS Libbsd directory (default: '.')")
+    print("  -f|--freebsd      FreeBSD SVN directory (default: 'freebsd-org')")
+    print("  -v|--verbose      enable verbose output mode")
 
 # Parse the arguments
 def parseArguments():
     global isForward, isEarlyExit
-    global isOnlyMakefile
+    global isOnlyBuildScripts
     try:
         opts, args = getopt.getopt(sys.argv[1:],
-                                   "?hdDemRr:f:v",
+                                   "?hdDembRr:f:v",
                                    [ "help",
                                      "help",
                                      "dry-run"
                                      "diff"
                                      "early-exit"
                                      "makefile"
+                                     "buildscripts"
                                      "reverse"
                                      "rtems="
                                      "freebsd="
                                      "verbose" ])
-    except getopt.GetoptError, err:
+    except getopt.GetoptError as err:
         # print help information and exit:
-        print str(err) # will print something like "option -a not recognized"
+        print(str(err)) # will print something like "option -a not recognized"
         usage()
         sys.exit(2)
     for o, a in opts:
@@ -94,8 +97,8 @@ def parseArguments():
             builder.isDiffMode = True
         elif o in ("-e", "--early-exit"):
             isEarlyExit = True
-        elif o in ("-m", "--makefile"):
-            isOnlyMakefile = True
+        elif o in ("-b", "--buildscripts") or o in ("-m", "--makefile"):
+            isOnlyBuildScripts = True
         elif o in ("-R", "--reverse"):
             isForward = False
         elif o in ("-r", "--rtems"):
@@ -107,22 +110,22 @@ def parseArguments():
 
 parseArguments()
 
-print "Verbose:                " + ("no", "yes")[builder.isVerbose]
-print "Dry Run:                " + ("no", "yes")[builder.isDryRun]
-print "Diff Mode Enabled:      " + ("no", "yes")[builder.isDiffMode]
-print "Only Generate Makefile: " + ("no", "yes")[isOnlyMakefile]
-print "RTEMS Libbsd Directory: " + builder.RTEMS_DIR
-print "FreeBSD SVN Directory:  " + builder.FreeBSD_DIR
-print "Direction:              " + ("reverse", "forward")[isForward]
+print("Verbose:                     " + ("no", "yes")[builder.isVerbose])
+print("Dry Run:                     " + ("no", "yes")[builder.isDryRun])
+print("Diff Mode Enabled:           " + ("no", "yes")[builder.isDiffMode])
+print("Only Generate Build Scripts: " + ("no", "yes")[isOnlyBuildScripts])
+print("RTEMS Libbsd Directory:      " + builder.RTEMS_DIR)
+print("FreeBSD SVN Directory:       " + builder.FreeBSD_DIR)
+print("Direction:                   " + ("reverse", "forward")[isForward])
 
 # Check directory argument was set and exist
 def wasDirectorySet(desc, path):
     if path == "not_set":
-        print "error:" + desc + " Directory was not specified on command line"
+        print("error:" + desc + " Directory was not specified on command line")
         sys.exit(2)
 
     if os.path.isdir( path ) != True:
-        print "error:" + desc + " Directory (" + path + ") does not exist"
+        print("error:" + desc + " Directory (" + path + ") does not exist")
         sys.exit(2)
 
 # Were RTEMS and FreeBSD directories specified
@@ -131,33 +134,29 @@ wasDirectorySet( "FreeBSD", builder.FreeBSD_DIR )
 
 # Are we generating or reverting?
 if isForward == True:
-    print "Forward from FreeBSD GIT into ", builder.RTEMS_DIR
+    print("Forward from FreeBSD GIT into ", builder.RTEMS_DIR)
 else:
-    print "Reverting from ", builder.RTEMS_DIR
-    if isOnlyMakefile == True:
-        print "error: Makefile Mode and Reverse are contradictory"
+    print("Reverting from ", builder.RTEMS_DIR)
+    if isOnlyBuildScripts == True:
+        print("error: Build Script generation and Reverse are contradictory")
         sys.exit(2)
 
 if isEarlyExit == True:
-    print "Early exit at user request"
+    print("Early exit at user request")
     sys.exit(0)
 
 try:
-    makefile_gen = makefile.ModuleManager()
     waf_gen = waf_generator.ModuleManager()
 
-    libbsd.sources(makefile_gen)
     libbsd.sources(waf_gen)
 
     # Perform the actual file manipulation
     if isForward:
-        if not isOnlyMakefile:
-            makefile_gen.copyFromFreeBSDToRTEMS()
-        waf_gen.generate()
+        if not isOnlyBuildScripts:
+            waf_gen.copyFromFreeBSDToRTEMS()
+        waf_gen.generate(libbsd.rtems_version())
     else:
-        makefile_gen.copyFromRTEMSToFreeBSD()
-    # Print a summary if changing files
-    if builder.isDiffMode == False:
-        print '%d file(s) were changed.' % (builder.filesProcessed)
-except IOError, ioe:
-    print 'error: %s' % (ioe)
+        waf_gen.copyFromRTEMSToFreeBSD()
+    builder.changedFileSummary()
+except IOError as ioe:
+    print('error: %s' % (ioe))
diff --git a/libbsd.py b/libbsd.py
index 3fd4c4b..388aedf 100755
--- a/libbsd.py
+++ b/libbsd.py
@@ -1,5 +1,5 @@
 #
-#  Copyright (c) 2015 Chris Johns <chrisj at rtems.org>. All rights reserved.
+#  Copyright (c) 2015-2016 Chris Johns <chrisj at rtems.org>. All rights reserved.
 #
 #  Copyright (c) 2009-2015 embedded brains GmbH.  All rights reserved.
 #
@@ -35,6 +35,12 @@
 import builder
 
 #
+# RTEMS version
+#
+def rtems_version():
+    return '4.12'
+
+#
 # RTEMS
 #
 def rtems(mm):
diff --git a/libbsd.txt b/libbsd.txt
index 131e599..a122266 100644
--- a/libbsd.txt
+++ b/libbsd.txt
@@ -32,26 +32,26 @@ Please help by adding to it.
 
 === Tool Chain ===
 
-You need a tool chain for RTEMS based on at least
-
-* Binutils 2.24, and
-* Newlib 2.1.0.
-
-The Binutils version is required to ease the handling of linker command files.
-The Newlib version is required since some standard files like `<sys/types.h>`
-must be compatible enough for the files provided by the FreeBSD sources, e.g.
-`<sys/socket.h>`.
-
+You need a tool chain for RTEMS based on at least RSB 4.12 April 2016 or later.
 === Installation Overview ===
 
 . You must configure your BSP with the +--disable-networking+ option to disable
 the old network stack.  Make sure no header files of the old network stack are
 installed.
+
 . Clone the Git repository +git clone git://git.rtems.org/rtems-libbsd.git+.
 . Change into the RTEMS BSD library root directory.
-. Edit the `config.inc` Makefile configuration file and adjust it to your environment.
-. Run +make clean+.
-. Run +make install+.
+. Edit the `config.inc` configuration file and adjust it to your environment.
+. Run +waf configure ...+.
+. Run +waf+.
+. Run +waf install+.
+
+Refer to the README.waf for Waf building instructions.
+
+Make sure the submodules have been initialised and are updated. If a 'git
+status' says `rtems_waf` need updating run the submodule update command:
+
+ $ git submodule rtems_waf update
 
 === Board Support Package Requirements ===
 
@@ -115,15 +115,10 @@ devices (you can run multiple test instances on one virtual network).
 
 === BSD Library Configuration and Build ===
 
-There are currently 2 build systems supported. The first is based on the RTEMS
-Makefile support in RTEMS and installed with the BSP and the second is a stand
-alone environment based on the Waf build system. The Makefile build system will
-be removed when RTEMS moves away from its existing build system and Waf will
-be the preferred build environment.
+The build system based on the Waf build system. To build with Waf please refer
+to the README.waf file.
 
-To build with Waf please refer to the README.waf file.
-
-===== Makefile Building =====
+===== Example Configuration =====
 
 In the BSD library source directory edit the file `config.inc`.  Continuing on
 the above, the `config.inc` used to match the above is:
@@ -146,36 +141,6 @@ NET_CFG_GATEWAY_IP = 10.0.0.1
 NET_TAP_INTERFACE = tap0
 -------------------------------------------------------------------------------
 
-Now you can build the BSD library and run the tests:
-
--------------------------------------------------------------------------------
-make clean
-make
-make run_tests
--------------------------------------------------------------------------------
-
-You can only run the tests directly in case a test runner is available.  The
-following tests run without an external network.  It is strongly advised to run
-them.
-
-* commands01
-* init01
-* loopback01
-* rwlock01
-* selectpollkqueue01
-* sleep01
-* swi01
-* syscalls01
-* thread01
-* timeout01
-* unix01
-
-To install the BSD library use this:
-
--------------------------------------------------------------------------------
-make install
--------------------------------------------------------------------------------
-
 === BSD Library Initialization ===
 
 Use the following code to initialize the BSD library:
@@ -556,7 +521,7 @@ Do not format original FreeBSD code.
 === What is in the Git Repository
 
 There is a self-contained kit with FreeBSD and RTEMS components pre-merged. The
-Makefile in this kit is automatically generated.
+Waf wscript in this kit is automatically generated.
 
 Any changes to source in the `freebsd` directories will need to be merged
 upstream into our master FreeBSD checkout, the `freebsd-org` submodule.
@@ -578,7 +543,7 @@ The top level directory contains a few directories and files. The following
 are important to understand
 
 * `freebsd-to-rtems.py` - script to convert to and free FreeBSD and RTEMS trees,
-* `Makefile` - automatically generated,
+* `wscript` - automatically generated,
 * `freebsd/` - from FreeBSD by script,
 * `rtemsbsd/` - RTEMS specific implementations of FreeBSD kernel support routines,
 * `testsuite/` - RTEMS specific tests, and
@@ -593,20 +558,21 @@ on the FreeBSD code. Its command line arguments are shown below:
 
 ----
 freebsd-to-rtems.py [args]
-  -?|-h|--help     print this and exit
-  -d|--dry-run     run program but no modifications
-  -D|--diff        provide diff of files between trees
-  -e|--early-exit  evaluate arguments, print results, and exit
-  -m|--makefile    just generate Makefile
-  -R|--reverse     default FreeBSD -> RTEMS, reverse that
-  -r|--rtems       RTEMS directory
-  -f|--freebsd     FreeBSD directory
-  -v|--verbose     enable verbose output mode
+  -?|-h|--help      print this and exit
+  -d|--dry-run      run program but no modifications
+  -D|--diff         provide diff of files between trees
+  -e|--early-exit   evaluate arguments, print results, and exit
+  -m|--makefile     Warning: depreciated and will be removed
+  -b|--buildscripts just generate the build scripts
+  -R|--reverse      default FreeBSD -> RTEMS, reverse that
+  -r|--rtems        RTEMS directory
+  -f|--freebsd      FreeBSD directory
+  -v|--verbose      enable verbose output mode
 ----
 
 In its default mode of operation, freebsd-to-rtems.py is used to copy code
 from FreeBSD to the rtems-libbsd tree and perform transformations.  In forward
-mode, the script may be requested to just generate the Makefile and Waf script.
+mode, the script may be requested to just generate the Waf script.
 
 In "reverse mode", this script undoes those transformations and copies
 the source code back to the FreeBSD SVN tree. This allows us to do
diff --git a/rtems_waf b/rtems_waf
index b548c77..8220ad1 160000
--- a/rtems_waf
+++ b/rtems_waf
@@ -1 +1 @@
-Subproject commit b548c77d81e390a40d4afba8afc35c8175191f0b
+Subproject commit 8220ad187c2570a758b666ba7dbd068361aec1a2
diff --git a/waf_generator.py b/waf_generator.py
index 0af712a..adc7a4c 100755
--- a/waf_generator.py
+++ b/waf_generator.py
@@ -1,5 +1,5 @@
 #
-#  Copyright (c) 2015 Chris Johns <chrisj at rtems.org>. All rights reserved.
+#  Copyright (c) 2015-2016 Chris Johns <chrisj at rtems.org>. All rights reserved.
 #
 #  Copyright (c) 2009-2015 embedded brains GmbH.  All rights reserved.
 #
@@ -32,7 +32,10 @@
 #  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 #  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
+from __future__ import print_function
+
 import os
+import sys
 import tempfile
 
 import builder
@@ -146,7 +149,10 @@ class ModuleManager(builder.ModuleManager):
     def write(self):
         try:
             out = tempfile.NamedTemporaryFile(delete = False)
-            out.write(self.script)
+            try:
+                out.write(bytes(self.script, sys.stdin.encoding))
+            except:
+                out.write(self.script)
             out.close()
             wscript = builder.RTEMS_DIR + '/wscript'
             builder.processIfDifferent(out.name, wscript, "wscript")
@@ -176,7 +182,7 @@ class ModuleManager(builder.ModuleManager):
         self.generator['lex'] = LexFragmentComposer
         self.generator['yacc'] = YaccFragmentComposer
 
-    def generate(self):
+    def generate(self, rtems_version):
 
         def _source_list(lhs, files, append = False):
             if append:
@@ -257,8 +263,12 @@ class ModuleManager(builder.ModuleManager):
         self.add('# To use see README.waf shipped with this file.')
         self.add('#')
         self.add('')
+        self.add('from __future__ import print_function')
+        self.add('')
         self.add('import os.path')
         self.add('')
+        self.add('rtems_version = "%s"' % (rtems_version))
+        self.add('')
         self.add('try:')
         self.add('    import rtems_waf.rtems as rtems')
         self.add('except:')
@@ -267,7 +277,7 @@ class ModuleManager(builder.ModuleManager):
         self.add('    sys.exit(1)')
         self.add('')
         self.add('def init(ctx):')
-        self.add('    rtems.init(ctx)')
+        self.add('    rtems.init(ctx, version = rtems_version)')
         self.add('')
         self.add('def options(opt):')
         self.add('    rtems.options(opt)')
@@ -569,7 +579,7 @@ class ModuleManager(builder.ModuleManager):
 
         self.add('    # Tests')
         tests = data['tests']
-        for test_name in tests:
+        for test_name in sorted(tests):
             files = ['testsuite/%s/%s.c' % (test_name, f) for f in  data['tests'][test_name]['all']['files']]
             _source_list('    test_%s' % (test_name), sorted(files))
             self.add('    bld.program(target = "%s.exe",' % (test_name))
diff --git a/wscript b/wscript
index 57edce3..4c01900 100644
--- a/wscript
+++ b/wscript
@@ -6,8 +6,12 @@
 # To use see README.waf shipped with this file.
 #
 
+from __future__ import print_function
+
 import os.path
 
+rtems_version = "4.12"
+
 try:
     import rtems_waf.rtems as rtems
 except:
@@ -16,7 +20,7 @@ except:
     sys.exit(1)
 
 def init(ctx):
-    rtems.init(ctx)
+    rtems.init(ctx, version = rtems_version)
 
 def options(opt):
     rtems.options(opt)
@@ -180,18 +184,6 @@ def build(bld):
     libbsd_use += ["lex__nsyy"]
 
     if bld.env.AUTO_REGEN:
-        bld(target = "freebsd/lib/libipsec/policy_token.c",
-            source = "freebsd/lib/libipsec/policy_token.l",
-            rule = "${LEX} -P __libipsecyy -t ${SRC} | sed -e '/YY_BUF_SIZE/s/16384/1024/' > ${TGT}")
-    bld.objects(target = "lex___libipsecyy",
-                features = "c",
-                cflags = cflags,
-                includes = [] + includes,
-                defines = [],
-                source = "freebsd/lib/libipsec/policy_token.c")
-    libbsd_use += ["lex___libipsecyy"]
-
-    if bld.env.AUTO_REGEN:
         bld(target = "freebsd/contrib/libpcap/scanner.c",
             source = "freebsd/contrib/libpcap/scanner.l",
             rule = "${LEX} -P pcap -t ${SRC} | sed -e '/YY_BUF_SIZE/s/16384/1024/' > ${TGT}")
@@ -203,6 +195,18 @@ def build(bld):
                 source = "freebsd/contrib/libpcap/scanner.c")
     libbsd_use += ["lex_pcap"]
 
+    if bld.env.AUTO_REGEN:
+        bld(target = "freebsd/lib/libipsec/policy_token.c",
+            source = "freebsd/lib/libipsec/policy_token.l",
+            rule = "${LEX} -P __libipsecyy -t ${SRC} | sed -e '/YY_BUF_SIZE/s/16384/1024/' > ${TGT}")
+    bld.objects(target = "lex___libipsecyy",
+                features = "c",
+                cflags = cflags,
+                includes = [] + includes,
+                defines = [],
+                source = "freebsd/lib/libipsec/policy_token.c")
+    libbsd_use += ["lex___libipsecyy"]
+
     # Yacc
     if bld.env.AUTO_REGEN:
         bld(target = "freebsd/lib/libipsec/policy_parse.c",
@@ -1131,265 +1135,265 @@ def build(bld):
                           relative_trick = True)
 
     # Tests
-    test_init01 = ['testsuite/init01/test_main.c']
-    bld.program(target = "init01.exe",
+    test_arphole = ['testsuite/arphole/test_main.c']
+    bld.program(target = "arphole.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_init01,
+                source = test_arphole,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_syscalls01 = ['testsuite/syscalls01/test_main.c']
-    bld.program(target = "syscalls01.exe",
+    test_commands01 = ['testsuite/commands01/test_main.c']
+    bld.program(target = "commands01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_syscalls01,
+                source = test_commands01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_thread01 = ['testsuite/thread01/test_main.c']
-    bld.program(target = "thread01.exe",
+    test_condvar01 = ['testsuite/condvar01/test_main.c']
+    bld.program(target = "condvar01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_thread01,
+                source = test_condvar01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_loopback01 = ['testsuite/loopback01/test_main.c']
-    bld.program(target = "loopback01.exe",
+    test_dhcpcd01 = ['testsuite/dhcpcd01/test_main.c']
+    bld.program(target = "dhcpcd01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_loopback01,
+                source = test_dhcpcd01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_foobarclient = ['testsuite/foobarclient/test_main.c']
-    bld.program(target = "foobarclient.exe",
+    test_dhcpcd02 = ['testsuite/dhcpcd02/test_main.c']
+    bld.program(target = "dhcpcd02.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_foobarclient,
+                source = test_dhcpcd02,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_lagg01 = ['testsuite/lagg01/test_main.c']
-    bld.program(target = "lagg01.exe",
+    test_foobarclient = ['testsuite/foobarclient/test_main.c']
+    bld.program(target = "foobarclient.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_lagg01,
+                source = test_foobarclient,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_timeout01 = ['testsuite/timeout01/init.c',
-                      'testsuite/timeout01/timeout_test.c']
-    bld.program(target = "timeout01.exe",
+    test_foobarserver = ['testsuite/foobarserver/test_main.c']
+    bld.program(target = "foobarserver.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_timeout01,
+                source = test_foobarserver,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_dhcpcd02 = ['testsuite/dhcpcd02/test_main.c']
-    bld.program(target = "dhcpcd02.exe",
+    test_ftpd01 = ['testsuite/ftpd01/test_main.c']
+    bld.program(target = "ftpd01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_dhcpcd02,
+                source = test_ftpd01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_ftpd01 = ['testsuite/ftpd01/test_main.c']
-    bld.program(target = "ftpd01.exe",
+    test_init01 = ['testsuite/init01/test_main.c']
+    bld.program(target = "init01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_ftpd01,
+                source = test_init01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_vlan01 = ['testsuite/vlan01/test_main.c']
-    bld.program(target = "vlan01.exe",
+    test_lagg01 = ['testsuite/lagg01/test_main.c']
+    bld.program(target = "lagg01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_vlan01,
+                source = test_lagg01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_foobarserver = ['testsuite/foobarserver/test_main.c']
-    bld.program(target = "foobarserver.exe",
+    test_loopback01 = ['testsuite/loopback01/test_main.c']
+    bld.program(target = "loopback01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_foobarserver,
+                source = test_loopback01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_selectpollkqueue01 = ['testsuite/selectpollkqueue01/test_main.c']
-    bld.program(target = "selectpollkqueue01.exe",
+    test_media01 = ['testsuite/media01/test_main.c']
+    bld.program(target = "media01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_selectpollkqueue01,
+                source = test_media01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_zerocopy01 = ['testsuite/zerocopy01/test_main.c']
-    bld.program(target = "zerocopy01.exe",
+    test_mutex01 = ['testsuite/mutex01/test_main.c']
+    bld.program(target = "mutex01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_zerocopy01,
+                source = test_mutex01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_smp01 = ['testsuite/smp01/test_main.c']
-    bld.program(target = "smp01.exe",
+    test_netshell01 = ['testsuite/netshell01/shellconfig.c',
+                       'testsuite/netshell01/test_main.c']
+    bld.program(target = "netshell01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_smp01,
+                source = test_netshell01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_media01 = ['testsuite/media01/test_main.c']
-    bld.program(target = "media01.exe",
+    test_ping01 = ['testsuite/ping01/test_main.c']
+    bld.program(target = "ping01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_media01,
+                source = test_ping01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_condvar01 = ['testsuite/condvar01/test_main.c']
-    bld.program(target = "condvar01.exe",
+    test_ppp01 = ['testsuite/ppp01/test_main.c']
+    bld.program(target = "ppp01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_condvar01,
+                source = test_ppp01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_telnetd01 = ['testsuite/telnetd01/test_main.c']
-    bld.program(target = "telnetd01.exe",
+    test_rwlock01 = ['testsuite/rwlock01/test_main.c']
+    bld.program(target = "rwlock01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_telnetd01,
+                source = test_rwlock01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_ppp01 = ['testsuite/ppp01/test_main.c']
-    bld.program(target = "ppp01.exe",
+    test_selectpollkqueue01 = ['testsuite/selectpollkqueue01/test_main.c']
+    bld.program(target = "selectpollkqueue01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_ppp01,
+                source = test_selectpollkqueue01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_swi01 = ['testsuite/swi01/init.c',
-                  'testsuite/swi01/swi_test.c']
-    bld.program(target = "swi01.exe",
+    test_sleep01 = ['testsuite/sleep01/test_main.c']
+    bld.program(target = "sleep01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_swi01,
+                source = test_sleep01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_netshell01 = ['testsuite/netshell01/shellconfig.c',
-                       'testsuite/netshell01/test_main.c']
-    bld.program(target = "netshell01.exe",
+    test_smp01 = ['testsuite/smp01/test_main.c']
+    bld.program(target = "smp01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_netshell01,
+                source = test_smp01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_rwlock01 = ['testsuite/rwlock01/test_main.c']
-    bld.program(target = "rwlock01.exe",
+    test_swi01 = ['testsuite/swi01/init.c',
+                  'testsuite/swi01/swi_test.c']
+    bld.program(target = "swi01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_rwlock01,
+                source = test_swi01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_mutex01 = ['testsuite/mutex01/test_main.c']
-    bld.program(target = "mutex01.exe",
+    test_syscalls01 = ['testsuite/syscalls01/test_main.c']
+    bld.program(target = "syscalls01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_mutex01,
+                source = test_syscalls01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_dhcpcd01 = ['testsuite/dhcpcd01/test_main.c']
-    bld.program(target = "dhcpcd01.exe",
+    test_telnetd01 = ['testsuite/telnetd01/test_main.c']
+    bld.program(target = "telnetd01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_dhcpcd01,
+                source = test_telnetd01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_unix01 = ['testsuite/unix01/test_main.c']
-    bld.program(target = "unix01.exe",
+    test_thread01 = ['testsuite/thread01/test_main.c']
+    bld.program(target = "thread01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_unix01,
+                source = test_thread01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_commands01 = ['testsuite/commands01/test_main.c']
-    bld.program(target = "commands01.exe",
+    test_timeout01 = ['testsuite/timeout01/init.c',
+                      'testsuite/timeout01/timeout_test.c']
+    bld.program(target = "timeout01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_commands01,
+                source = test_timeout01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_ping01 = ['testsuite/ping01/test_main.c']
-    bld.program(target = "ping01.exe",
+    test_unix01 = ['testsuite/unix01/test_main.c']
+    bld.program(target = "unix01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_ping01,
+                source = test_unix01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
@@ -1405,22 +1409,22 @@ def build(bld):
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_arphole = ['testsuite/arphole/test_main.c']
-    bld.program(target = "arphole.exe",
+    test_vlan01 = ['testsuite/vlan01/test_main.c']
+    bld.program(target = "vlan01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_arphole,
+                source = test_vlan01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)
 
-    test_sleep01 = ['testsuite/sleep01/test_main.c']
-    bld.program(target = "sleep01.exe",
+    test_zerocopy01 = ['testsuite/zerocopy01/test_main.c']
+    bld.program(target = "zerocopy01.exe",
                 features = "cprogram",
                 cflags = cflags,
                 includes = includes,
-                source = test_sleep01,
+                source = test_zerocopy01,
                 use = ["bsd"],
                 lib = ["m", "z"],
                 install_path = None)



More information about the vc mailing list