aboutsummaryrefslogtreecommitdiffstats
path: root/waflib/extras/sas.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-04-21 22:56:13 +0200
committerDavid Robillard <d@drobilla.net>2019-04-21 22:56:13 +0200
commitbc596356af71d95eb2a341d0324a76e6b7e59a73 (patch)
treeb98fff0fffd6503acd8cb1cd452e055749ac94c0 /waflib/extras/sas.py
parent683d47cb7fddf5447de76cdf80041b6b230de93c (diff)
downloadserd-bc596356af71d95eb2a341d0324a76e6b7e59a73.tar.gz
serd-bc596356af71d95eb2a341d0324a76e6b7e59a73.tar.bz2
serd-bc596356af71d95eb2a341d0324a76e6b7e59a73.zip
Switch to using a submodule for autowaf
Diffstat (limited to 'waflib/extras/sas.py')
m---------waflib0
-rw-r--r--waflib/extras/sas.py71
2 files changed, 0 insertions, 71 deletions
diff --git a/waflib b/waflib
new file mode 160000
+Subproject 2314e236ca6e7d94a26c3c17091da0f25f5867f
diff --git a/waflib/extras/sas.py b/waflib/extras/sas.py
deleted file mode 100644
index 754c6148..00000000
--- a/waflib/extras/sas.py
+++ /dev/null
@@ -1,71 +0,0 @@
-#!/usr/bin/env python
-# encoding: utf-8
-# Mark Coggeshall, 2010
-
-"SAS support"
-
-import os
-from waflib import Task, Errors, Logs
-from waflib.TaskGen import feature, before_method
-
-sas_fun, _ = Task.compile_fun('sas -sysin ${SRCFILE} -log ${LOGFILE} -print ${LSTFILE}', shell=False)
-
-class sas(Task.Task):
- vars = ['SAS', 'SASFLAGS']
- def run(task):
- command = 'SAS'
- fun = sas_fun
-
- node = task.inputs[0]
- logfilenode = node.change_ext('.log')
- lstfilenode = node.change_ext('.lst')
-
- # set the cwd
- task.cwd = task.inputs[0].parent.get_src().abspath()
- Logs.debug('runner: %r on %r', command, node)
-
- SASINPUTS = node.parent.get_bld().abspath() + os.pathsep + node.parent.get_src().abspath() + os.pathsep
- task.env.env = {'SASINPUTS': SASINPUTS}
-
- task.env.SRCFILE = node.abspath()
- task.env.LOGFILE = logfilenode.abspath()
- task.env.LSTFILE = lstfilenode.abspath()
- ret = fun(task)
- if ret:
- Logs.error('Running %s on %r returned a non-zero exit', command, node)
- Logs.error('SRCFILE = %r', node)
- Logs.error('LOGFILE = %r', logfilenode)
- Logs.error('LSTFILE = %r', lstfilenode)
- return ret
-
-@feature('sas')
-@before_method('process_source')
-def apply_sas(self):
- if not getattr(self, 'type', None) in ('sas',):
- self.type = 'sas'
-
- self.env['logdir'] = getattr(self, 'logdir', 'log')
- self.env['lstdir'] = getattr(self, 'lstdir', 'lst')
-
- deps_lst = []
-
- if getattr(self, 'deps', None):
- deps = self.to_list(self.deps)
- for filename in deps:
- n = self.path.find_resource(filename)
- if not n:
- n = self.bld.root.find_resource(filename)
- if not n:
- raise Errors.WafError('cannot find input file %s for processing' % filename)
- if not n in deps_lst:
- deps_lst.append(n)
-
- for node in self.to_nodes(self.source):
- if self.type == 'sas':
- task = self.create_task('sas', src=node)
- task.dep_nodes = deps_lst
- self.source = []
-
-def configure(self):
- self.find_program('sas', var='SAS', mandatory=False)
-