added SCons support for building SGML FSP FAQ-NG
This commit is contained in:
parent
47a62afa3f
commit
33bba2a125
|
|
@ -10,6 +10,7 @@ PREFIX='/usr/local'
|
|||
VERSION='2.8.1b25'
|
||||
EFENCE=False
|
||||
CLIENTS=True
|
||||
SGML=False
|
||||
|
||||
env = Environment(CPPPATH='#/include', LIBPATH=['/usr/lib','/usr/local/lib'])
|
||||
|
||||
|
|
@ -59,6 +60,7 @@ from docdir import checkForUserDocdir
|
|||
from mandir import autodetectMandir
|
||||
from clients import checkForBuildingClients
|
||||
from sysconfdir import checkForUserSysconfdir
|
||||
from sgmldoc import checkForSGMLFMT
|
||||
|
||||
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
||||
'MAINTAINER_MODE':checkForMaintainerMode,
|
||||
|
|
@ -74,7 +76,8 @@ conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
|||
'checkForUserDocdir':checkForUserDocdir,
|
||||
'autodetectMandir':autodetectMandir,
|
||||
'checkForUserSysconfdir':checkForUserSysconfdir,
|
||||
'checkForBuildingClients':checkForBuildingClients
|
||||
'checkForBuildingClients':checkForBuildingClients,
|
||||
'checkForSGMLFMT':checkForSGMLFMT
|
||||
})
|
||||
# check for CC options
|
||||
for option in Split("""
|
||||
|
|
@ -91,7 +94,7 @@ for option in Split("""
|
|||
-Wunreachable-code
|
||||
"""):
|
||||
conf.checkForCCOption(option)
|
||||
|
||||
SGML=conf.checkForSGMLFMT()
|
||||
# Portability build time config
|
||||
if conf.CheckFunc('srandomdev'):
|
||||
conf.env.Append(CPPFLAGS = '-DHAVE_SRANDOMDEV')
|
||||
|
|
@ -151,5 +154,5 @@ conf.Finish()
|
|||
|
||||
env.Append(CPPFLAGS = "-DPACKAGE_VERSION=\\\""+VERSION+"\\\"")
|
||||
# process build rules
|
||||
Export( Split("env PREFIX MANDIR DOCDIR CLIENTS"))
|
||||
Export( Split("env PREFIX MANDIR DOCDIR CLIENTS SGML"))
|
||||
env.SConscript(dirs=Split("doc . bsd_src common server client clients contrib tests man"))
|
||||
|
|
|
|||
|
|
@ -1,4 +1,7 @@
|
|||
Import(Split("env PREFIX DOCDIR"))
|
||||
Import(Split("env PREFIX DOCDIR SGML"))
|
||||
|
||||
env.Install(dir=DOCDIR,source=Split("PROTOCOL HISTORY faq.html"))
|
||||
env.Alias("install",DOCDIR)
|
||||
if SGML:
|
||||
env.Command('fsp-faq.html','fsp-faq.sgml','sgmlfmt -d docbook -f html fsp-faq.sgml',chdir=1)
|
||||
env.Install(dir=DOCDIR,source='fsp-faq.html')
|
||||
|
|
|
|||
21
site_scons/sgmldoc.py
Normal file
21
site_scons/sgmldoc.py
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#
|
||||
# SCons SGML Doc building check
|
||||
#
|
||||
# Version 1.0
|
||||
# 10-Sep-2009
|
||||
#
|
||||
|
||||
from SCons.Script import ARGUMENTS,Touch,Delete
|
||||
|
||||
def checkForSGMLFMT(check):
|
||||
"""Returns True if we have working sgmlfmt executable for building documentation."""
|
||||
check.Message("Checking for working sgmlfmt... ")
|
||||
Touch('empty')
|
||||
rc,out=check.TryAction("sgmlfmt -d docbook -f html empty")
|
||||
Delete(['empty','empty.html'])
|
||||
if rc == 0:
|
||||
check.Result(True)
|
||||
return True
|
||||
else:
|
||||
check.Result(False)
|
||||
return False
|
||||
Loading…
Reference in New Issue
Block a user