initial copy of jade.py
This commit is contained in:
parent
00d67e7e8c
commit
a800b3314c
11
SConstruct
11
SConstruct
|
|
@ -62,6 +62,7 @@ from clients import checkForBuildingClients
|
||||||
from sysconfdir import checkForUserSysconfdir
|
from sysconfdir import checkForUserSysconfdir
|
||||||
from sgmlformat import checkForSGMLFMT
|
from sgmlformat import checkForSGMLFMT
|
||||||
from largefiles import enableLargeFiles
|
from largefiles import enableLargeFiles
|
||||||
|
from jade import checkDSSSLProcessor
|
||||||
|
|
||||||
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
||||||
'MAINTAINER_MODE':checkForMaintainerMode,
|
'MAINTAINER_MODE':checkForMaintainerMode,
|
||||||
|
|
@ -77,7 +78,8 @@ conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
||||||
'autodetectMandir':autodetectMandir,
|
'autodetectMandir':autodetectMandir,
|
||||||
'checkForUserSysconfdir':checkForUserSysconfdir,
|
'checkForUserSysconfdir':checkForUserSysconfdir,
|
||||||
'checkForBuildingClients':checkForBuildingClients,
|
'checkForBuildingClients':checkForBuildingClients,
|
||||||
'checkForSGMLFMT':checkForSGMLFMT
|
'checkForSGMLFMT':checkForSGMLFMT,
|
||||||
|
'checkDSSSLProcessor':checkDSSSLProcessor
|
||||||
})
|
})
|
||||||
if not conf.CheckCC(): Exit(1)
|
if not conf.CheckCC(): Exit(1)
|
||||||
# check for CC options
|
# check for CC options
|
||||||
|
|
@ -96,7 +98,12 @@ for option in Split("""
|
||||||
-fmacro-backtrace-limit=2 -Wno-cast-align -Wno-pointer-sign
|
-fmacro-backtrace-limit=2 -Wno-cast-align -Wno-pointer-sign
|
||||||
"""):
|
"""):
|
||||||
conf.checkForCCOption(option)
|
conf.checkForCCOption(option)
|
||||||
SGML=conf.checkForSGMLFMT()
|
if conf.checkDSSSLProcessor("jade"):
|
||||||
|
JADE = "jade"
|
||||||
|
elif conf.checkDSSSLProcessor("openjade"):
|
||||||
|
JADE = "openjade"
|
||||||
|
else:
|
||||||
|
JADE = False
|
||||||
# Portability build time config
|
# Portability build time config
|
||||||
if conf.CheckFunc('srandomdev'):
|
if conf.CheckFunc('srandomdev'):
|
||||||
conf.env.Append(CPPFLAGS = '-DHAVE_SRANDOMDEV')
|
conf.env.Append(CPPFLAGS = '-DHAVE_SRANDOMDEV')
|
||||||
|
|
|
||||||
24
site_scons/jade.py
Normal file
24
site_scons/jade.py
Normal file
|
|
@ -0,0 +1,24 @@
|
||||||
|
#
|
||||||
|
# SCons JADE executable check
|
||||||
|
#
|
||||||
|
# Version 1.0
|
||||||
|
# 07-Sep-2014
|
||||||
|
#
|
||||||
|
|
||||||
|
from SCons.Script import ARGUMENTS,Touch,Delete,Command
|
||||||
|
import subprocess
|
||||||
|
import SCons.Action
|
||||||
|
import SCons.SConf
|
||||||
|
|
||||||
|
def checkDSSSLProcessor(check, name="jade"):
|
||||||
|
"""Check if DSSSL engine is working. Returns True or False."""
|
||||||
|
check.Message("Checking if DSSSL processor "+name+" works... ")
|
||||||
|
try:
|
||||||
|
echo = subprocess.Popen(('/bin/echo','""'), stdout = subprocess.PIPE )
|
||||||
|
version = subprocess.check_output((name, '-v'), stdin = echo.stdout, stderr = subprocess.STDOUT )
|
||||||
|
except subprocess.CalledProcessError as e:
|
||||||
|
if "version" in e.output:
|
||||||
|
check.Result(True)
|
||||||
|
return True
|
||||||
|
check.Result(False)
|
||||||
|
return False
|
||||||
Loading…
Reference in New Issue
Block a user