Add scons switch to compile without fspd server
This commit is contained in:
parent
0e87ba32bb
commit
e52e815694
|
|
@ -3,6 +3,7 @@ Version NEXT
|
|||
minor whitespace cleanup
|
||||
do not fail hard if we can't write to pid file and running from
|
||||
inetd
|
||||
added scons switch without-server=yes to not build fspd
|
||||
|
||||
Version 2.8.1b29 - 24 Aug 2019
|
||||
added scons command line argument without-fspscan=yes for building
|
||||
|
|
|
|||
7
INSTALL
7
INSTALL
|
|
@ -56,11 +56,12 @@ SCons command line options:
|
|||
sysconfdir=directory where to look for fspd and client configuration
|
||||
files. Default prefix/etc
|
||||
docdir=directory where to put documentation.
|
||||
Default prefix/share/doc/fsp
|
||||
Default prefix/share/doc/fsp
|
||||
examplesdir=directory where to install examples
|
||||
Default is docdir/examples
|
||||
without-clients=yes dont build and install client commands
|
||||
without-fspscan=yes dont build and install fspcan command
|
||||
without-clients=yes dont build and install client commands
|
||||
without-fspscan=yes dont build and install fspcan command
|
||||
without-server=yes don't build fspd server
|
||||
dsssl=directory Look for DocBook DSSSL Stylesheets there
|
||||
|
||||
Client utilities:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,8 @@ env.Install(dir=DOCDIR,source=Split("""BETA.README COPYRIGHT ChangeLog
|
|||
FILES INFO INSTALL MACHINES TODO
|
||||
"""))
|
||||
|
||||
env.Install(dir=EXAMPLESDIR,source="fspd.conf")
|
||||
if SERVER:
|
||||
env.Install(dir=EXAMPLESDIR,source="fspd.conf")
|
||||
if CLIENTS:
|
||||
env.Install(dir=EXAMPLESDIR,source=Split("setup.sh setup.csh"))
|
||||
env.Alias("install", EXAMPLESDIR)
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ from docdir import checkForUserDocdir
|
|||
from mandir import autodetectMandir
|
||||
from examplesdir import checkForUserExamplesdir
|
||||
from clients import checkForBuildingClients
|
||||
from server import checkForBuildingServer
|
||||
from fspscan import checkForBuildingFspscan
|
||||
from sysconfdir import checkForUserSysconfdir
|
||||
from largefiles import enableLargeFiles
|
||||
|
|
@ -66,7 +67,7 @@ from jade import checkDSSSLProcessor
|
|||
from dsssl import findDocbookStylesheets
|
||||
|
||||
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
||||
'MAINTAINER_MODE':checkForMaintainerMode,
|
||||
'MAINTAINER_MODE':checkForMaintainerMode,
|
||||
'checkForLockPrefix':checkForLockPrefix,
|
||||
'checkPrefix':checkForUserPrefix,
|
||||
'checkForLockingType':checkForLockingType,
|
||||
|
|
@ -80,6 +81,7 @@ conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
|||
'autodetectMandir':autodetectMandir,
|
||||
'checkForUserSysconfdir':checkForUserSysconfdir,
|
||||
'checkForBuildingClients':checkForBuildingClients,
|
||||
'checkForBuildingServer':checkForBuildingServer,
|
||||
'checkForBuildingFspscan':checkForBuildingFspscan,
|
||||
'checkDSSSLProcessor':checkDSSSLProcessor,
|
||||
'findDocbookStylesheets':findDocbookStylesheets
|
||||
|
|
@ -160,11 +162,12 @@ if EFENCE == True:
|
|||
EFENCE=conf.CheckLib("efence","EF_Abort")
|
||||
conf.checkForLamerPack()
|
||||
CLIENTS=conf.checkForBuildingClients()
|
||||
SERVER=conf.checkForBuildingServer()
|
||||
FSPSCAN=conf.checkForBuildingFspscan()
|
||||
conf.checkForClientTimeout()
|
||||
conf.Finish()
|
||||
|
||||
env.Append(CPPFLAGS = "-DPACKAGE_VERSION=\\\""+VERSION+"\\\"")
|
||||
# process build rules
|
||||
Export( Split("env PREFIX MANDIR DOCDIR EXAMPLESDIR CLIENTS FSPSCAN JADE DSSSL"))
|
||||
Export( Split("env PREFIX MANDIR DOCDIR EXAMPLESDIR CLIENTS SERVER FSPSCAN JADE DSSSL"))
|
||||
env.SConscript(dirs=Split("doc . bsd_src common server client clients contrib tests man"))
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
Import(Split("env PREFIX common bsdfsp"))
|
||||
Import(Split("env PREFIX common bsdfsp SERVER"))
|
||||
|
||||
fspd=env.Program(target = 'fspd', source = Split('''
|
||||
if SERVER:
|
||||
fspd=env.Program(target = 'fspd', source = Split('''
|
||||
acl.c file.c info.c main.c random.c
|
||||
conf.c filecache.c iprange.c path.c server.c
|
||||
fifocache.c host.c log.c pidfile.c
|
||||
''') + common + bsdfsp)
|
||||
|
||||
env.Install(dir = PREFIX+'/bin', source = fspd)
|
||||
env.Install(dir = PREFIX+'/bin', source = fspd)
|
||||
|
|
|
|||
23
site_scons/server.py
Normal file
23
site_scons/server.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# SCons client commands build tester
|
||||
#
|
||||
# Version 1.0
|
||||
# 03-Jun-2020
|
||||
#
|
||||
|
||||
from SCons.Script import ARGUMENTS
|
||||
|
||||
def checkForBuildingServer(conf):
|
||||
"""Check command line arguments if user requested to not build server."""
|
||||
conf.Message("Checking if we are building client commands... ")
|
||||
buildlamer=ARGUMENTS.get('without-server', 0)
|
||||
try:
|
||||
buildlamer2=int(buildlamer)
|
||||
except ValueError:
|
||||
buildlamer2=None
|
||||
if buildlamer2 == 1 or str(buildlamer).lower() == 'yes':
|
||||
conf.Result(0)
|
||||
return False
|
||||
else:
|
||||
conf.Result(1)
|
||||
return True
|
||||
Loading…
Reference in New Issue
Block a user