summaryrefslogtreecommitdiffstats
path: root/waflib/extras/proc.py
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-04-21 23:05:06 +0200
committerDavid Robillard <d@drobilla.net>2019-04-21 23:05:06 +0200
commit202873cf9bfdeb669365a6d76e54ad657c550fe2 (patch)
tree79db4dee998f1ef093c3e81f1d0ea708901ab96c /waflib/extras/proc.py
parentde6492738adf1794bf5fa39c1fe1ebbd167727ac (diff)
downloadsratom-202873cf9bfdeb669365a6d76e54ad657c550fe2.tar.gz
sratom-202873cf9bfdeb669365a6d76e54ad657c550fe2.tar.bz2
sratom-202873cf9bfdeb669365a6d76e54ad657c550fe2.zip
Switch to using a submodule for autowaf
Diffstat (limited to 'waflib/extras/proc.py')
m---------waflib0
-rw-r--r--waflib/extras/proc.py54
2 files changed, 0 insertions, 54 deletions
diff --git a/waflib b/waflib
new file mode 160000
+Subproject 2314e236ca6e7d94a26c3c17091da0f25f5867f
diff --git a/waflib/extras/proc.py b/waflib/extras/proc.py
deleted file mode 100644
index 764abec..0000000
--- a/waflib/extras/proc.py
+++ /dev/null
@@ -1,54 +0,0 @@
-#! /usr/bin/env python
-# per rosengren 2011
-
-from os import environ, path
-from waflib import TaskGen, Utils
-
-def options(opt):
- grp = opt.add_option_group('Oracle ProC Options')
- grp.add_option('--oracle_home', action='store', default=environ.get('PROC_ORACLE'), help='Path to Oracle installation home (has bin/lib)')
- grp.add_option('--tns_admin', action='store', default=environ.get('TNS_ADMIN'), help='Directory containing server list (TNS_NAMES.ORA)')
- grp.add_option('--connection', action='store', default='dummy-user/dummy-password@dummy-server', help='Format: user/password@server')
-
-def configure(cnf):
- env = cnf.env
- if not env.PROC_ORACLE:
- env.PROC_ORACLE = cnf.options.oracle_home
- if not env.PROC_TNS_ADMIN:
- env.PROC_TNS_ADMIN = cnf.options.tns_admin
- if not env.PROC_CONNECTION:
- env.PROC_CONNECTION = cnf.options.connection
- cnf.find_program('proc', var='PROC', path_list=env.PROC_ORACLE + path.sep + 'bin')
-
-def proc(tsk):
- env = tsk.env
- gen = tsk.generator
- inc_nodes = gen.to_incnodes(Utils.to_list(getattr(gen,'includes',[])) + env['INCLUDES'])
-
- cmd = (
- [env.PROC] +
- ['SQLCHECK=SEMANTICS'] +
- (['SYS_INCLUDE=(' + ','.join(env.PROC_INCLUDES) + ')']
- if env.PROC_INCLUDES else []) +
- ['INCLUDE=(' + ','.join(
- [i.bldpath() for i in inc_nodes]
- ) + ')'] +
- ['userid=' + env.PROC_CONNECTION] +
- ['INAME=' + tsk.inputs[0].bldpath()] +
- ['ONAME=' + tsk.outputs[0].bldpath()]
- )
- exec_env = {
- 'ORACLE_HOME': env.PROC_ORACLE,
- 'LD_LIBRARY_PATH': env.PROC_ORACLE + path.sep + 'lib',
- }
- if env.PROC_TNS_ADMIN:
- exec_env['TNS_ADMIN'] = env.PROC_TNS_ADMIN
- return tsk.exec_command(cmd, env=exec_env)
-
-TaskGen.declare_chain(
- name = 'proc',
- rule = proc,
- ext_in = '.pc',
- ext_out = '.c',
-)
-