summaryrefslogtreecommitdiff
path: root/c
diff options
context:
space:
mode:
authorRobert Collins <robertc@robertcollins.net>2006-04-17 14:13:35 +1000
committerRobert Collins <robertc@robertcollins.net>2006-04-17 14:13:35 +1000
commit4ff83274f7a9c20297c3484e994ba584c1771b31 (patch)
tree7271a783780b915b7212f8c389f214ed1c71974c /c
parentf1767091373ba1c3bb98af804b3bcb16802604c0 (diff)
downloadsubunit-4ff83274f7a9c20297c3484e994ba584c1771b31.tar.gz
Finish stage one conversion to scons.
Diffstat (limited to 'c')
-rw-r--r--c/Makefile13
-rw-r--r--c/SConscript16
-rw-r--r--c/SConstruct34
3 files changed, 16 insertions, 47 deletions
diff --git a/c/Makefile b/c/Makefile
deleted file mode 100644
index 0de9221..0000000
--- a/c/Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-all:
- scons -Q
-
-check:
- scons check
-
-clean:
- scons -c
-
-install:
- scons install
-
-.PHONY: all check clean install
diff --git a/c/SConscript b/c/SConscript
new file mode 100644
index 0000000..8468378
--- /dev/null
+++ b/c/SConscript
@@ -0,0 +1,16 @@
+Import('*')
+# describe what we need for C
+subunit = SharedLibrary('lib/subunit', ['lib/child.c'])
+test_child = Program('tests/test_child.c',
+ LIBS=['check', 'subunit'],
+ CPPPATH='include',
+ LIBPATH='lib')
+tests=[]
+tests.append(env.TestRC('check', test_child, LIBPATH='lib'))
+env.Alias('check', tests)
+installs=[]
+installs.append(env.Install(lib, subunit))
+installs.append(env.Install(include, 'include/subunit/child.h'))
+env.Alias('install', installs)
+Default(subunit)
+
diff --git a/c/SConstruct b/c/SConstruct
deleted file mode 100644
index 7f08c10..0000000
--- a/c/SConstruct
+++ /dev/null
@@ -1,34 +0,0 @@
-# setup our tools
-import os.path
-
-default_root = os.path.expanduser('~/local/')
-DESTDIR=ARGUMENTS.get('DESTDIR', default_root)
-if DESTDIR[-1] != '/':
- DESTDIR += '/'
-include = os.path.join(DESTDIR, "include", "subunit")
-lib = os.path.join(DESTDIR, "lib")
-# bin = "#export/$PLATFORM/bin"
-env = Environment()
-Export('env')
-
-# support tools
-def run_test_scripts(source, target, env, for_signature):
- """Run all the sources as executable scripts which return 0 on success."""
- # TODO: make this cross platform compatible.
- return ["LD_LIBRARY_PATH=%s %s" % (env['LIBPATH'], a_source) for a_source in source]
-test_script_runner = Builder(generator=run_test_scripts)
-env.Append(BUILDERS = {'TestRC' : test_script_runner})
-
-
-# describe what we need
-subunit = SharedLibrary('lib/subunit', ['lib/child.c'])
-test_child = Program('tests/test_child.c',
- LIBS=['check', 'subunit'],
- CPPPATH='include',
- LIBPATH='lib')
-env.TestRC('check', test_child, LIBPATH='lib')
-installs = []
-installs.append(env.Install(lib, subunit))
-installs.append(env.Install(include, 'include/subunit/child.h'))
-env.Alias('install', installs)
-Default(subunit)