support for building without compiling and installing client commands.
SCons argument without-clients=yes
This commit is contained in:
parent
b671faae31
commit
445dc3f419
|
|
@ -9,6 +9,7 @@ EnsurePythonVersion(2,2)
|
|||
PREFIX='/usr/local'
|
||||
VERSION='2.8.1b25'
|
||||
EFENCE=False
|
||||
CLIENTS=True
|
||||
|
||||
env = Environment(CPPPATH='#/include', LIBPATH=['/usr/lib','/usr/local/lib'])
|
||||
|
||||
|
|
@ -56,6 +57,7 @@ from relsignals import checkReliableSignals
|
|||
from mandir import checkForUserMandir
|
||||
from docdir import checkForUserDocdir
|
||||
from mandir import autodetectMandir
|
||||
from clients import checkForBuildingClients
|
||||
from sysconfdir import checkForUserSysconfdir
|
||||
|
||||
conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
||||
|
|
@ -71,7 +73,8 @@ conf = Configure(env,{'checkForCCOption':checkForCCOption,
|
|||
'checkForUserMandir':checkForUserMandir,
|
||||
'checkForUserDocdir':checkForUserDocdir,
|
||||
'autodetectMandir':autodetectMandir,
|
||||
'checkForUserSysconfdir':checkForUserSysconfdir
|
||||
'checkForUserSysconfdir':checkForUserSysconfdir,
|
||||
'checkForBuildingClients':checkForBuildingClients
|
||||
})
|
||||
# check for CC options
|
||||
for option in Split("""
|
||||
|
|
@ -142,10 +145,11 @@ if EFENCE == True:
|
|||
EFENCE=conf.CheckLib("efence","EF_Abort")
|
||||
conf.checkForLamerPack()
|
||||
conf.checkForDebugBuild()
|
||||
CLIENTS=conf.checkForBuildingClients()
|
||||
conf.checkForClientTimeout()
|
||||
conf.Finish()
|
||||
|
||||
env.Append(CPPFLAGS = "-DPACKAGE_VERSION=\\\""+VERSION+"\\\"")
|
||||
# process build rules
|
||||
Export( Split("env PREFIX MANDIR DOCDIR"))
|
||||
Export( Split("env PREFIX MANDIR DOCDIR CLIENTS"))
|
||||
env.SConscript(dirs=Split("doc . bsd_src common server client clients contrib tests man"))
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
Import(Split("env PREFIX common bsdfsp client"))
|
||||
Import(Split("env PREFIX common bsdfsp client CLIENTS"))
|
||||
|
||||
if CLIENTS:
|
||||
fcatcmd=env.Program(target = 'fcatcmd',source=['fcatcmd.c']+client+common)
|
||||
fcdcmd=env.Program(target = 'fcdcmd', source=['fcdcmd.c','printpro.c']+client+common)
|
||||
fducmd=env.Program(target = 'fducmd', source=['fducmd.c']+client+common)
|
||||
|
|
|
|||
|
|
@ -1,17 +1,24 @@
|
|||
from os import symlink, unlink
|
||||
Import(Split("env PREFIX MANDIR"))
|
||||
Import(Split("env PREFIX MANDIR CLIENTS"))
|
||||
|
||||
MAN1=Split("""
|
||||
fgetcmd.1 fmkdir.1 frmcmd.1 fspd.1
|
||||
fcdcmd.1 fspscan.1
|
||||
MAN1=Split("fspscan.1 fspd.1")
|
||||
if CLIENTS:
|
||||
MAN1.extend(Split("""
|
||||
fgetcmd.1 fmkdir.1 frmcmd.1
|
||||
fcdcmd.1
|
||||
fgrabcmd.1 fmvcmd.1 frmdircmd.1
|
||||
fducmd.1
|
||||
fbye.1 fhostcmd.1 fprocmd.1 fsetupcmd.1 fstatcmd.1
|
||||
ffindcmd.1 fput.1 fver.1
|
||||
fcatcmd.1 flscmd.1
|
||||
""")
|
||||
"""))
|
||||
if CLIENTS:
|
||||
MAN5=Split("fspsites.5 fsp_prof.5")
|
||||
MAN7=Split("fsp_env.7")
|
||||
else:
|
||||
MAN5=[]
|
||||
MAN7=[]
|
||||
|
||||
SYMLINKS=[ ('fcdcmd','fcd'), ('fducmd','fdu'), ('fcatcmd','fcat'),
|
||||
('fgetcmd','fget'), ('fgrabcmd','fgrab'), ('ffindcmd','ffind'),
|
||||
('fmvcmd','fmv'), ('fhostcmd','fhost'), ('flscmd','fls'),
|
||||
|
|
@ -32,7 +39,7 @@ for page in MAN7:
|
|||
env.Install(dir=MANDIR+"/man7",source=page+'.gz')
|
||||
|
||||
# install symlinks for man pages
|
||||
if 'install' in COMMAND_LINE_TARGETS:
|
||||
if 'install' in COMMAND_LINE_TARGETS and CLIENTS:
|
||||
for pair in SYMLINKS:
|
||||
env.Symlink(MANDIR+'/man1/'+pair[1]+'.1.gz',MANDIR+'/man1/'+pair[0]+'.1.gz')
|
||||
|
||||
|
|
|
|||
23
site_scons/clients.py
Normal file
23
site_scons/clients.py
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#
|
||||
# SCons client commands build tester
|
||||
#
|
||||
# Version 1.0
|
||||
# 03-Sep-2009
|
||||
#
|
||||
|
||||
from SCons.Script import ARGUMENTS
|
||||
|
||||
def checkForBuildingClients(conf):
|
||||
"""Check command line arguments if user requested to not build client commands."""
|
||||
conf.Message("Checking if we are building client commands... ")
|
||||
buildlamer=ARGUMENTS.get('without-clients', 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