Boost logo

Boost-Build :

From: TEMPLIE Cédric (cedric.templie_at_[hidden])
Date: 2005-01-03 13:12:04


TEMPLIE Cédric wrote:
> First of all, I wish you an Happy New Year :)
>
> I come back with another question...
>
> I want to to the following thing: If I have files of the project I build
> it, else I do nothing (It means that project has already been build, and
> I just have to retrieve libraries, in my case from perforce)
>
> My_project use all sips libs.
> in the jamfile of My_projet I had in project requirements
> <dependency>/interpr//library
>
> #Jamfile ---
>
> build-project TEST/My_project ;
>
> if [ glob SIPS ]
> {
> #SIPS sources available
> #SIPS Executables...
> build-project SIPS/Components/ARS ;
> build-project SIPS/Components/CRS ;
> build-project SIPS/Components/IPRS ;
> build-project SIPS/Components/KDS ;
> build-project SIPS/Components/sipscore ;
> build-project SIPS/Components/TS ;
>
> #SDK Executables...
> #build-project SIPS/SDK/C/Wrapper ;
> #build-project SIPS/SDK/C++/Wrapper ;
>
> #SIPS Libraries...
> #build-project SIPS/Libraries/sips_ag_public ;
> use-project /interpr : SIPS/Libraries/interpr ;
> use-project /simde : SIPS/Libraries/simde ;
> use-project /simde_ex : SIPS/Libraries/simde_ex ;
> use-project /sips_ag : SIPS/Libraries/sips_ag ;
> use-project /su_base : SIPS/Libraries/su_base ;
> use-project /su_cript : SIPS/Libraries/su_cript ;
> use-project /su_thread : SIPS/Libraries/su_thread ;
> use-project /su_xml : SIPS/Libraries/su_xml ;
> use-project /usb_devices : SIPS/Libraries/usb_devices ;
> }
> else
> {
> #SIPS sources unavailable,
> #so use already build libraries
> # Just a p4 sync...
> use-project /interpr : $(LIB_ROOT) ;
> use-project /simde : $(LIB_ROOT) ;
> use-project /simde_ex : $(LIB_ROOT) ;
> use-project /sips_ag : $(LIB_ROOT) ;
> use-project /su_base : $(LIB_ROOT) ;
> use-project /su_cript : $(LIB_ROOT) ;
> use-project /su_thread : $(LIB_ROOT) ;
> use-project /su_xml : $(LIB_ROOT) ;
> use-project /usb_devices : $(LIB_ROOT) ;
> }
>
> # Jamfile ---

I correct some part of my issues, now I create an "empty" Jamfile for
each project...

else
{
#SIPS sources unavailable,
#so use already build libraries
# Just a p4 sync...
use-project /interpr : $(JAMFILES_ROOT)/interpr ;
use-project /simde : $(JAMFILES_ROOT)/simde ;
use-project /simde_ex : $(JAMFILES_ROOT)/simde_ex ;
use-project /sips_ag : $(JAMFILES_ROOT)/sips_ag ;
use-project /su_base : $(JAMFILES_ROOT)/su_base ;
use-project /su_cript : $(JAMFILES_ROOT)/su_cript ;
use-project /su_thread : $(JAMFILES_ROOT)/su_thread ;
use-project /su_xml : $(JAMFILES_ROOT)/su_xml ;
use-project /usb_devices : $(JAMFILES_ROOT)/usb_devices ;
}

The Jamfile is not really empty, it contains the following lines:
project interpr ;

alias library ;
alias export_headers ;

When I build from the top level it works...
But, I also want to have the possibility to build subprojects alone....
For that, I just launch bjam from the directory of the project I want to
build, and I have an error :

error: Recursion in main target references
error: the following target are being built currently:
error: ../../../Applications/MgtTools/AsiCredMgr/executable
/P:/jamfiles/interpr/library /P:/jamfiles/interpr/library

The AsiCredMgr Jamfile is given as an attachement.
I also attach my Root Jamfile for a better understanding of my build system.

This error appear only when I do not have the source files (ie when I
use the basic Jamfile). If the source files are present, I use the more
complex Jamfile that build the library, I do not have the error....

What can I do....

I hope that someone could help me...

Thx in advance

TEMPLIE Cédric

>
> The Jamfile in $(LIB_ROOT) only contain the following 2 lines:
> alias library ;
> alias export_headers ;
>
> But I have an error that tell me that project loaded by use-project has
> no project id...
>
> I understand why... but how can I deal with this problem ?
> If I had a project Id, in Jamfile of $(LIB_ROOT) I have another error
> that tell me that project Id is redefined....
>
> At the end, what I need, it is just that a project can be defined with
> multiple name... and of course I don't if it is possible, that is why I
> am looking for an alternative to do that.
>
> Thanks in advance
>
> TEMPLIE Cédric
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>

 --------------090005080003050302030609 Content-Type: text/plain;
name="Jamfile-Root"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Jamfile-Root"

#Define the root project
#All subprojects will use same settings than this one

project root
: requirements
#DEFINE
#RELEASE
<variant>release:<define>NDEBUG
#DEBUG
<variant>debug:<define>_DEBUG
#MSVC DEFINE
<toolset>msvc:<define>WIN32
<toolset>msvc:<define>_WINDOWS
<toolset>msvc:<define>_MBCS
#INCLUDE
<include>$(INCLUDE_ROOT)/stlport&&.&&$(INCLUDE_ROOT)
#LIB
<library-path>$(LIB_ROOT)

: default-build <threading>multi ;

if [ glob Applications/EndUser/SIM ]
{
#SIM sources available
#SIM Executables...
build-project Applications/EndUser/SIM/SIES ;
build-project Applications/EndUser/SIM/SIMServer ;

#SIM Libraries...
use-project /messengerlib : Applications/EndUser/SIM/MessengerLib ;
use-project /sieshook : Applications/EndUser/SIM/SIESHook ;
}
else
{
#SIM sources unavailable,
#so use already build libraries
use-project /messengerlib : $(JAMFILES_ROOT)/messengerlib ;
use-project /sieshook : $(JAMFILES_ROOT)/sieshook ;
}

if [ glob Applications/MgtTools ]
{
#MgtTools sources available
#MgtTools Executables...
build-project Applications/MgtTools/AsiCredMgr ;
build-project Applications/MgtTools/ASIManager ;
build-project Applications/MgtTools/CredDB ;
build-project Applications/MgtTools/FetchFile ;
build-project Applications/MgtTools/Launcher ;
build-project Applications/MgtTools/n_config ;
#build-project Applications/MgtTools/SendBug ;

#MgtTools Libraries...
use-project /mgttoolslib : Applications/MgtTools/MgtToolsLib ;
}
else
{
#MgtTools sources unavailable,
#so use already build libraries
use-project /mgttoolslib : $(JAMFILES_ROOT)/mgttoolslib ;
}

if [ glob SIPS ]
{
#SIPS sources available
#SIPS Executables...
build-project SIPS/Components/ARS ;
build-project SIPS/Components/CRS ;
build-project SIPS/Components/IPRS ;
build-project SIPS/Components/KDS ;
build-project SIPS/Components/sipscore ;
build-project SIPS/Components/TS ;

#SDK Executables...
#build-project SIPS/SDK/C/Wrapper ;
#build-project SIPS/SDK/C++/Wrapper ;

#SIPS Libraries...
#build-project SIPS/Libraries/sips_ag_public ;
use-project /interpr : SIPS/Libraries/interpr ;
use-project /simde : SIPS/Libraries/simde ;
use-project /simde_ex : SIPS/Libraries/simde_ex ;
use-project /sips_ag : SIPS/Libraries/sips_ag ;
use-project /su_base : SIPS/Libraries/su_base ;
use-project /su_cript : SIPS/Libraries/su_cript ;
use-project /su_thread : SIPS/Libraries/su_thread ;
use-project /su_xml : SIPS/Libraries/su_xml ;
use-project /usb_devices : SIPS/Libraries/usb_devices ;
}
else
{
#SIPS sources unavailable,
#so use already build libraries
use-project /interpr : $(JAMFILES_ROOT)/interpr ;
use-project /simde : $(JAMFILES_ROOT)/simde ;
use-project /simde_ex : $(JAMFILES_ROOT)/simde_ex ;
use-project /sips_ag : $(JAMFILES_ROOT)/sips_ag ;
use-project /su_base : $(JAMFILES_ROOT)/su_base ;
use-project /su_cript : $(JAMFILES_ROOT)/su_cript ;
use-project /su_thread : $(JAMFILES_ROOT)/su_thread ;
use-project /su_xml : $(JAMFILES_ROOT)/su_xml ;
use-project /usb_devices : $(JAMFILES_ROOT)/usb_devices ;
} --------------090005080003050302030609 Content-Type: text/plain;
name="Jamfile-AsiCredMgr"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="Jamfile-AsiCredMgr"

#Define the ASICredMgr project

#Already defined:
# -Release
# NDEBUG
#
# -Debug
# _DEBUG
#
# -Using MSVC
# WIN32
# _WINDOWS
# _MBCS

project ASICredMgr
: requirements
#DEPENDENCES
<dependency>/su_base//library/<variant>release
<dependency>/su_xml//library/<variant>release
<dependency>/interpr//library/<variant>release
<dependency>/su_cript//library/<variant>release
<dependency>/simde//library/<variant>release
<dependency>/sips_ag//library/<variant>release
<dependency>/mgttoolslib//library
#INCLUDE
<include>./QtSingleApplication
#MSVC
#DEFINE
<toolset>msvc:<define>UNICODE
<toolset>msvc:<define>QT_DLL
<toolset>msvc:<define>QT_PLUGIN
<toolset>msvc:<define>QT_THREAD_SUPPORT
<toolset>msvc,<variant>release:<define>QT_NO_DEBUG
#LINKFLAGS
<toolset>msvc:<linkflags>"qt-mt333.lib qtmain.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib imm32..lib winmm.lib wsock32.lib winspool.lib delayimp.lib"
<toolset>msvc:<linkflags>su_base.lib
<toolset>msvc:<linkflags>su_xml.lib
<toolset>msvc:<linkflags>interpr.lib
<toolset>msvc:<linkflags>su_cript.lib
<toolset>msvc:<linkflags>simde.lib
<toolset>msvc:<linkflags>sips_ag.lib
<toolset>msvc:<linkflags>mgttoolslib.lib
;

# Main target : to build the executable
alias executable : ASICredMgr export_exe ;
explicit ASICredMgr export_exe ;

# Files needed to build the project
local cppFiles = [ glob *.cpp ] ;
local headerFiles = [ glob *.h ] ;
local rcFiles = [ glob *.rc ] ;
local uiFiles = [ glob *.ui ] ;
local QTFiles = QtSingleApplication/qtsingleapplication.cpp
QtSingleApplication/qtsingleapplication.h ;

# OS dependant Stuff

###########
# Windows #
###########
local QTFiles_win = $(QTFiles)
QtSingleApplication/qtsingleapplication_win.cpp ;

# Build the project from source files
exe ASICredMgr
: $(cppFiles:BS) $(headerFiles:BS) $(rcFiles:BS) $(uiFiles:BS) $(QTFiles_win)
#Need su_base su_xml interpr
# su_cript simde sips_ag (release version)
# mgttoolslib
: <toolset>msvc
<library>/qt//qt
;

# Exports
stage export_exe
: ASICredMgr
: <variant>release:<location>$(BIN_ROOT_RELEASE)
<variant>debug:<location>$(BIN_ROOT_DEBUG)
<include-type>EXE
; --------------090005080003050302030609--


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk