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
|
minor whitespace cleanup
|
||||||
do not fail hard if we can't write to pid file and running from
|
do not fail hard if we can't write to pid file and running from
|
||||||
inetd
|
inetd
|
||||||
|
added scons switch without-server=yes to not build fspd
|
||||||
|
|
||||||
Version 2.8.1b29 - 24 Aug 2019
|
Version 2.8.1b29 - 24 Aug 2019
|
||||||
added scons command line argument without-fspscan=yes for building
|
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
|
sysconfdir=directory where to look for fspd and client configuration
|
||||||
files. Default prefix/etc
|
files. Default prefix/etc
|
||||||
docdir=directory where to put documentation.
|
docdir=directory where to put documentation.
|
||||||
Default prefix/share/doc/fsp
|
Default prefix/share/doc/fsp
|
||||||
examplesdir=directory where to install examples
|
examplesdir=directory where to install examples
|
||||||
Default is docdir/examples
|
Default is docdir/examples
|
||||||
without-clients=yes dont build and install client commands
|
without-clients=yes dont build and install client commands
|
||||||
without-fspscan=yes dont build and install fspcan command
|
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
|
dsssl=directory Look for DocBook DSSSL Stylesheets there
|
||||||
|
|
||||||
Client utilities:
|
Client utilities:
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,8 @@ env.Install(dir=DOCDIR,source=Split("""BETA.README COPYRIGHT ChangeLog
|
||||||
FILES INFO INSTALL MACHINES TODO
|
FILES INFO INSTALL MACHINES TODO
|
||||||
"""))
|
"""))
|
||||||
|
|
||||||
env.Install(dir=EXAMPLESDIR,source="fspd.conf")
|
if SERVER:
|
||||||
|
env.Install(dir=EXAMPLESDIR,source="fspd.conf")
|
||||||
if CLIENTS:
|
if CLIENTS:
|
||||||
env.Install(dir=EXAMPLESDIR,source=Split("setup.sh setup.csh"))
|
env.Install(dir=EXAMPLESDIR,source=Split("setup.sh setup.csh"))
|
||||||
env.Alias("install", EXAMPLESDIR)
|
env.Alias("install", EXAMPLESDIR)
|
||||||
|
|
|
||||||
|
|
@ -59,6 +59,7 @@ from docdir import checkForUserDocdir
|
||||||
from mandir import autodetectMandir
|
from mandir import autodetectMandir
|
||||||
from examplesdir import checkForUserExamplesdir
|
from examplesdir import checkForUserExamplesdir
|
||||||
from clients import checkForBuildingClients
|
from clients import checkForBuildingClients
|
||||||
|
from server import checkForBuildingServer
|
||||||
from fspscan import checkForBuildingFspscan
|
from fspscan import checkForBuildingFspscan
|
||||||
from sysconfdir import checkForUserSysconfdir
|
from sysconfdir import checkForUserSysconfdir
|
||||||
from largefiles import enableLargeFiles
|
from largefiles import enableLargeFiles
|
||||||
|
|
@ -66,7 +67,7 @@ from jade import checkDSSSLProcessor
|
||||||
from dsssl import findDocbookStylesheets
|
from dsssl import findDocbookStylesheets
|
||||||
|
|
||||||
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
||||||
'MAINTAINER_MODE':checkForMaintainerMode,
|
'MAINTAINER_MODE':checkForMaintainerMode,
|
||||||
'checkForLockPrefix':checkForLockPrefix,
|
'checkForLockPrefix':checkForLockPrefix,
|
||||||
'checkPrefix':checkForUserPrefix,
|
'checkPrefix':checkForUserPrefix,
|
||||||
'checkForLockingType':checkForLockingType,
|
'checkForLockingType':checkForLockingType,
|
||||||
|
|
@ -80,6 +81,7 @@ conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
||||||
'autodetectMandir':autodetectMandir,
|
'autodetectMandir':autodetectMandir,
|
||||||
'checkForUserSysconfdir':checkForUserSysconfdir,
|
'checkForUserSysconfdir':checkForUserSysconfdir,
|
||||||
'checkForBuildingClients':checkForBuildingClients,
|
'checkForBuildingClients':checkForBuildingClients,
|
||||||
|
'checkForBuildingServer':checkForBuildingServer,
|
||||||
'checkForBuildingFspscan':checkForBuildingFspscan,
|
'checkForBuildingFspscan':checkForBuildingFspscan,
|
||||||
'checkDSSSLProcessor':checkDSSSLProcessor,
|
'checkDSSSLProcessor':checkDSSSLProcessor,
|
||||||
'findDocbookStylesheets':findDocbookStylesheets
|
'findDocbookStylesheets':findDocbookStylesheets
|
||||||
|
|
@ -160,11 +162,12 @@ if EFENCE == True:
|
||||||
EFENCE=conf.CheckLib("efence","EF_Abort")
|
EFENCE=conf.CheckLib("efence","EF_Abort")
|
||||||
conf.checkForLamerPack()
|
conf.checkForLamerPack()
|
||||||
CLIENTS=conf.checkForBuildingClients()
|
CLIENTS=conf.checkForBuildingClients()
|
||||||
|
SERVER=conf.checkForBuildingServer()
|
||||||
FSPSCAN=conf.checkForBuildingFspscan()
|
FSPSCAN=conf.checkForBuildingFspscan()
|
||||||
conf.checkForClientTimeout()
|
conf.checkForClientTimeout()
|
||||||
conf.Finish()
|
conf.Finish()
|
||||||
|
|
||||||
env.Append(CPPFLAGS = "-DPACKAGE_VERSION=\\\""+VERSION+"\\\"")
|
env.Append(CPPFLAGS = "-DPACKAGE_VERSION=\\\""+VERSION+"\\\"")
|
||||||
# process build rules
|
# 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"))
|
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
|
acl.c file.c info.c main.c random.c
|
||||||
conf.c filecache.c iprange.c path.c server.c
|
conf.c filecache.c iprange.c path.c server.c
|
||||||
fifocache.c host.c log.c pidfile.c
|
fifocache.c host.c log.c pidfile.c
|
||||||
''') + common + bsdfsp)
|
''') + 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