38c074d898
scons tests - Compile all tests scons tests/basic - Compile basic tests scons tests/basic/print - Compile text printing test Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
77 lines
2.1 KiB
Python
77 lines
2.1 KiB
Python
#!/usr/bin/python
|
|
|
|
config = SConscript("config")
|
|
|
|
|
|
#import os, sys
|
|
#import config
|
|
#
|
|
#FLAGS = ["-O2"]
|
|
#if config.DEBUG == True:
|
|
# FLAGS = ["-Wall", "-Werror", "-g", "-DDEBUG"]
|
|
# POSTFIX = "-debug"
|
|
#
|
|
#config.env = Environment(CCFLAGS = FLAGS)
|
|
#if ARGUMENTS.get('VERBOSE') != "1":
|
|
# config.env.Append(CXXCOMSTR = "C++ $TARGET")
|
|
# config.env.Append(LINKCOMSTR = "Linking $TARGET")
|
|
#
|
|
## Make sure these directories exist before doing anything
|
|
#if not os.path.exists("bin"):
|
|
# os.mkdir("bin")
|
|
#if not os.path.exists("lib"):
|
|
# os.mkdir("lib")
|
|
#
|
|
#config.include = SConscript("include/Sconscript")
|
|
#config.libsaria = SConscript("libsaria/Sconscript")
|
|
#
|
|
#ocarina = SConscript("ocarina/Sconscript")
|
|
#newgui = SConscript("newgui/Sconscript")
|
|
#Default(ocarina)
|
|
#
|
|
## Install bin/ and lib/
|
|
#def install_dirs(dirs):
|
|
# res = []
|
|
# for dir in dirs:
|
|
# target = os.path.join(config.PREFIX, dir)
|
|
# for file in os.listdir(dir):
|
|
# source = os.path.join(dir, file)
|
|
# config.env.Install(target, source)
|
|
# res += [target]
|
|
# return res
|
|
#
|
|
#dirs = install_dirs(["bin/", "lib/"])
|
|
#config.env.Alias("install", dirs)
|
|
#config.env.Command("uninstall", None, Delete(FindInstalledFiles()))
|
|
#
|
|
## Clean up the build directory
|
|
#clean = Clean(ocarina, ["include/version.h", "bin/", "lib/"])
|
|
#
|
|
## Create a tarball and a PKGBUILD script
|
|
#def prepare_release(target, source, env):
|
|
# import datetime
|
|
#
|
|
# ocarina="ocarina-%s" % config.version
|
|
# os.popen("git archive --prefix=%s/ -o %s.tar.gz HEAD" % (ocarina, ocarina))
|
|
# md5 = os.popen("md5sum %s.tar.gz | awk '{print $1}'" % ocarina).read().strip()
|
|
#
|
|
# now = datetime.datetime.now()
|
|
# year = str(now.year)
|
|
# month = str(now.month)
|
|
# if (len(month) == 1):
|
|
# month = "0" + month
|
|
#
|
|
# f = open("PKGBUILD", "w")
|
|
# for line in open("PKGBUILD.tmpl"):
|
|
# if config.BUG == 0:
|
|
# line = line.replace("pkgver=", "pkgver=%s.%s" % (config.MAJOR, config.MINOR))
|
|
# else:
|
|
# line = line.replace("pkgver=", "pkgver=%s.%s.%s" % (config.MAJOR, config.MINOR, config.BUG))
|
|
# line = line.replace("md5sums=", "md5sums=('%s')" % md5)
|
|
# line = line.replace("YEAR", year)
|
|
# line = line.replace("MONTH", month)
|
|
# f.write(line)
|
|
# f.close()
|
|
#
|
|
#config.env.Command("release", None, [prepare_release])
|