I'm trying to build Boost on OpenVMS I64 8.2 and it fails in building jam. Has anyone succeeded in building on 8.2? If so, can you provide the cc and linker options you used? Thanks. P
Philip A. Naecker wrote:
I'm trying to build Boost on OpenVMS I64 8.2 and it fails in building jam. Has anyone succeeded in building on 8.2? If so, can you provide the cc and linker options you used?
There's a build_vms.com script in the jam sources which attempts to build jam. It's not very up to date. So help in making it work is highly appreciated. Are you using that script? What errors do you get? -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Rene Rivera Sent: Wednesday, November 23, 2005 11:51 AM
I'm trying to build Boost on OpenVMS I64 8.2 and it fails in building jam. Has anyone succeeded in building on 8.2? If so, can you provide the cc and linker options you used?
There's a build_vms.com script in the jam sources which attempts to build jam. It's not very up to date. So help in making it work is highly appreciated.
Are you using that script? What errors do you get?
Yes, I am using the build_vms.com script. The script is pretty trivial - it just compiles each .c module and then links them. The errors I get are like this: %ILINK-I_UDFSYM, INIT_ORDER I get an UDFSYM for: init_order init_path init_property_set init_regex init_sequence init_set make_class_module Looking at the source, each of these is used like a function call, like this: init_order(); But clearly there is no function of that name created in the source. Suggestions welcome. P
Philip A. Naecker wrote:
[mailto:boost-users-bounces@lists.boost.org] On Behalf Of Rene Rivera Sent: Wednesday, November 23, 2005 11:51 AM
I'm trying to build Boost on OpenVMS I64 8.2 and it fails in
building jam.
Has anyone succeeded in building on 8.2? If so, can you provide the cc and linker options you used?
There's a build_vms.com script in the jam sources which attempts to build jam. It's not very up to date. So help in making it work is highly appreciated.
Are you using that script? What errors do you get?
Yes, I am using the build_vms.com script. The script is pretty trivial - it just compiles each .c module and then links them. The errors I get are like this:
%ILINK-I_UDFSYM, INIT_ORDER
I get an UDFSYM for: init_order init_path init_property_set init_regex init_sequence init_set make_class_module
Looking at the source, each of these is used like a function call, like this:
init_order();
But clearly there is no function of that name created in the source.
Suggestions welcome.
It's basically not compiling a few more files it needs to. You need to add the files under the "modules" directory (order.c, path.c, etc.) which have all the init_* functions. And also class.c, native.c AFAICT. As you can see on the copyright for the script it's been a while since Johan Nilsson sent me updates for it :-( -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
I'm trying to build Boost on OpenVMS I64 8.2 and it fails in building jam.
It's basically not compiling a few more files it needs to. You need to add the files under the "modules" directory (order.c, path.c, etc.) which have all the init_* functions. And also class.c, native.c AFAICT. As you can see on the copyright for the script it's been a while since Johan Nilsson sent me updates for it :-(
That was the clue I needed - that there are files in ./modules. I was able to build the bootstrap jam by hand. Thanks. But now when I try to build jam using the bootstrap jam, I get the errors shown below. I can't figure out the "don't know how to make modules/*.c" errors. The errors that look like: $ "cc" /OBJECT=[.bin_vms] ... seem to come about because jam insists on wrapping the cc with quotes. Is there some reason it is doing that, or a way to get it to stop? Note that in the example below, I'm using the gnv bash shell on VMS (a Gnu Unix emulation environment for VMS). But I get the same errors if I use the native VMS shell. Any help will be appreciated. P bash$ ./bootstrap_vms/jam0.exe -f build.jam --toolset=vmsdecc don't know how to make modules/set.c don't know how to make modules/path.c don't know how to make modules/regex.c don't know how to make modules/property-set.c don't know how to make modules/sequence.c don't know how to make modules/order.c ...found 91 targets... ...updating 6 targets... ...can't find 6 targets... ...can't make 8 targets... .cc. [.bin_vms]yyacc.o $ $ "cc" /OBJECT=[.bin_vms]yyacc.o /DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,OP T_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_VARIABLES_EXT,OPT_IMPROVED_PA TIEN CE_EXT,VMS,YYSTACKSIZE=5000) /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES - %DCL-E-PARSEFAIL, error parsing DCL$PATH:"cc".* -RMS-F-FNM, error in file name /OPTIMIZE /NODEBUG yyacc.c "cc" /OBJECT=[.bin_vms]yyacc.o /DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,OPT _GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_VARIABLES_EXT,OPT_IMPROVED_PAT IENC E_EXT,VMS,YYSTACKSIZE=5000) /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES /OPTIMIZE /NODEBUG yyacc.c ...failed .cc. [.bin_vms]yyacc.o... ...skipped yyacc.exe for lack of yyacc.o... .cc. [.bin_vms]mkjambase.o $ $ "cc" /OBJECT=[.bin_vms]mkjambase.o /DEFINES=(NDEBUG,OPT_HEADER_CACHE_EX T,OPT_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_VARIABLES_EXT,OPT_IMPROVE D_PA TIENCE_EXT,VMS,YYSTACKSIZE=5000) /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENT R- %DCL-E-PARSEFAIL, error parsing DCL$PATH:"cc".* -RMS-F-FNM, error in file name IES /OPTIMIZE /NODEBUG mkjambase.c "cc" /OBJECT=[.bin_vms]mkjambase.o /DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT ,OPT_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_VARIABLES_EXT,OPT_IMPROVED _PAT IENCE_EXT,VMS,YYSTACKSIZE=5000) /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTR IES /OPTIMIZE /NODEBUG mkjambase.c ...failed .cc. [.bin_vms]mkjambase.o... ...skipped mkjambase.exe for lack of mkjambase.o... .cc. [.bin_vms]hcache.o $ $ "cc" /OBJECT=[.bin_vms]hcache.o /DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,O PT_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_VARIABLES_EXT,OPT_IMPROVED_P ATIE NCE_EXT,VMS,YYSTACKSIZE=5000) /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIE S- %DCL-E-PARSEFAIL, error parsing DCL$PATH:"cc".* -RMS-F-FNM, error in file name /OPTIMIZE /NODEBUG hcache.c "cc" /OBJECT=[.bin_vms]hcache.o /DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,OP T_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_VARIABLES_EXT,OPT_IMPROVED_PA TIEN CE_EXT,VMS,YYSTACKSIZE=5000) /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES /OPTIMIZE /NODEBUG hcache.c ...failed .cc. [.bin_vms]hcache.o... ...skipped jambase.c for lack of mkjambase.exe... ...skipped jambase.o for lack of jambase.c... ...skipped modules/set.o for lack of modules/set.c... ...skipped modules/path.o for lack of modules/path.c... ...skipped modules/regex.o for lack of modules/regex.c... ...skipped modules/property-set.o for lack of modules/property-set.c... ...skipped modules/sequence.o for lack of modules/sequence.c... ...skipped modules/order.o for lack of modules/order.c... ...skipped jam.exe for lack of hcache.o... ...skipped bjam.exe for lack of jam.exe... ...failed updating 3 targets... ...skipped 12 targets... bash$ exit exit
Sorry it took me a while to get back to you, holidays and all that ;-) Philip A. Naecker wrote:
That was the clue I needed - that there are files in ./modules. I was able to build the bootstrap jam by hand. Thanks.
When you get a chance could you send me the changes you did to the build_vms.com so that I can integrate them into the next release.
But now when I try to build jam using the bootstrap jam, I get the errors shown below. I can't figure out the "don't know how to make modules/*.c" errors. The errors that look like:
$ "cc" /OBJECT=[.bin_vms] ...
seem to come about because jam insists on wrapping the cc with quotes. Is there some reason it is doing that, or a way to get it to stop?
OK, I didn't know that restriction :-\ And while I was making changes to account for that I noticed a few more path related issues, thanks to the log you posted :-) I'm attaching a modified build.jam which hopefully works better for you. And of course point out any failures and successes.
Note that in the example below, I'm using the gnv bash shell on VMS (a Gnu Unix emulation environment for VMS). But I get the same errors if I use the native VMS shell.
I think bjam executes commands in the native VMS shell so where you
first execute from doesn't alter the build.
NOTE: The version of build.jam attached is against the one in Boost
1.33.1 which is basically the same as the one in Boost 1.33.0. If you
need one against the Boost 1.34.0 (aka CVS HEAD) I can post that also.
--
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
#~ Copyright 2002-2005 Rene Rivera.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Platform related specifics.
if $(NT) || $(OS2) {
rule .path { if $(>) { return "$(<:J=\\)\\$(>:J=)" ; } else { return "$(<:J=\\)" ; } } }
else if $(VMS) {
rule .path { if $(>) { return "[.$(<:J=/)]$(>:J=)" ; } else { return "[.$(<:J=/)]" ; } } }
else if $(MAC) {
rule .path { if $(>) { return ":$(<:J=\:)\:$(>:J=)" ; } else { return ":$(<:J=\:)" ; } } }
else {
rule .path { if $(>) { return "$(<:J=/)/$(>:J=)" ; } else { return "$(<:J=/)" ; } } }
if $(VMS) { . = "_" ; }
else { . = "." ; }
if $(VMS) { ~ = "" ; }
else { ~ = "\"" ; }
# Info about what we are building.
NAME = boost-jam ;
VERSION = 3$(.)1$(.)11 ;
RELEASE = 1 ;
LICENSE = 1_0 ;
HAVE_PYTHON = 0 ;
PYTHON_INCUDES = /usr/include/python2.3 ;
PYTHON_LIB = -lpython2.3 ;
# Generate development debug binaries?
if --debug in $(ARGV)
{
debug = true ;
}
# Attempt to generate and/or build the grammar?
if --grammar in $(ARGV)
{
grammar = true ;
}
# Do we need to add a default build type argument?
if ! ( --release in $(ARGV) ) &&
! ( --debug in $(ARGV) )
{
ARGV += --release ;
}
# An explicit root for the toolset? (trim spaces)
toolset-root = [ MATCH --toolset-root=(.*) : $(ARGV) ] ;
{
local t = [ MATCH "[ ]*(.*)" : $(toolset-root:J=" ") ] ;
toolset-root = ;
while $(t)
{
t = [ MATCH "([^ ]+)([ ]*)(.*)" : $(t) ] ;
toolset-root += $(t[1]) ;
if $(t[3]) { toolset-root += $(t[2]) ; }
t = $(t[3]) ;
}
toolset-root = $(toolset-root:J="") ;
}
# Configure the implemented toolsets. These are minimal
# commands and options to compile the full Jam. When
# adding new toolsets make sure to add them to the
# "known" list also.
rule toolset ( name command .type ? : opt.out + : opt.define * : flags * : linklibs * )
{
.type ?= "" ;
tool.$(name)$(.type).cc ?= $(command) ;
tool.$(name)$(.type).opt.out ?= $(opt.out) ;
tool.$(name)$(.type).opt.define ?= $(opt.define) ;
tool.$(name)$(.type).flags ?= $(flags) ;
tool.$(name)$(.type).linklibs ?= $(linklibs) ;
if ! $(name) in $(toolsets) { toolsets += $(name) ; }
}
rule opt ( type : yes-opt * : no-opt * ) { if $(type) in $(ARGV) { return $(yes-opt) ; } else { return $(no-opt) ; } }
## HP-UX aCC compiler
toolset acc cc : "-o " : -D
: -Ae
[ opt --release : -s -O3 ]
[ opt --debug : -g -pg ] ;
## Borland C++ 5.5.x
toolset borland bcc32 : -e -n : /D
: -WC -w- -q "-I$(toolset-root)Include" "-L$(toolset-root)Lib"
[ opt --release : -O2 -vi -w-inl ]
[ opt --debug : -v -Od -vi- ] ;
## Generic Unix cc
if ! $(CC) { CC = cc ; }
toolset cc $(CC) : "-o " : -D
: $(CFLAGS)
[ opt --release : -s -O ]
[ opt --debug : -g ]
: $(LIBS) ;
## Comeau C/C++ 4.x
toolset como como : "-o " : -D
: --c
[ opt --release : --inlining ]
[ opt --debug : --no_inlining ] ;
## MacOSX Darwin, using GCC 2.9.x, 3.x
toolset darwin cc : "-o " : -D
:
[ opt --release : -Wl,-x -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline -pg ] ;
## GCC 2.x, 3.x
toolset gcc gcc : "-o " : -D
: -pedantic
[ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline ] ;
## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll
toolset gcc-nocygwin gcc : "-o " : -D
: -s -O3 -mno-cygwin
[ opt --release : -finline-functions ]
[ opt --debug : -s -O3 -fno-inline -pg ] ;
## Intel C/C++ for Linux
toolset intel-linux icc : "-o " : -D
:
[ opt --release : -Xlinker -s -O3 ]
[ opt --debug : -g -O0 -p ] ;
## Intel C/C++ for Win32
toolset intel-win32 icl : /Fe : -D
: /nologo
[ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] ;
## KCC ?
toolset kcc KCC : "-o " : -D
:
[ opt --release : -s +K2 ]
[ opt --debug : -g +K0 ] ;
## Borland Kylix
toolset kylix bc++ : -o : -D
: -tC -q
[ opt --release : -O2 -vi -w-inl ]
[ opt --debug : -v -Od -vi- ] ;
## Metrowerks CodeWarrior 8.x
{
# Even though CW can compile all files at once, it crashes if it tries in the bjam case.
local mwcc = ; if $(NT) { mwcc = mwcc ; } else { mwcc = mwc$(OSPLAT:L) ; }
mwcc ?= mwcc ;
toolset metrowerks $(mwcc) : "-o " : -D
: -c -lang c -subsystem console -cwd include
[ opt --release : -runtime ss -opt full -inline all ]
[ opt --debug : -runtime ssd -opt none -inline off ] ;
toolset metrowerks $(mwcc) .link : "-o " :
: -subsystem console -ladvapi32.lib
[ opt --release : -runtime ss ]
[ opt --debug : -runtime ssd ] ;
}
## MINGW GCC
toolset mingw gcc : "-o " : -D
:
[ opt --release : -s -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline -pg ] ;
## MIPS Pro
toolset mipspro cc : "-o " : -D
:
[ opt --release : -s -O3 -g0 -INLINE:none ]
[ opt --debug : -g -O0 -INLINE ] ;
## Microsoft Visual Studio C++ 6.x
toolset msvc cl : /Fe : -D
: /nologo
[ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
: kernel32.lib advapi32.lib ;
## QNX 6.x GCC 3.x/2.95.3
toolset qcc qcc : "-o " : -D
: -pedantic
[ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline ] ;
## Sun Workshop 6 C++
toolset sunpro cc : "-o " : -D
:
[ opt --release : -s -fast -xO4 ]
[ opt --debug : -g ] ;
## Compaq Alpha CXX
toolset tru64cxx cc : "-o " : -D
:
[ opt --release : -s -O5 -inline speed ]
[ opt --debug : -g -O0 -pg ] ;
## IBM VisualAge C++
toolset vacpp xlc : "-o " : -D
:
[ opt --release : -s -O3 -qstrict -qinline ]
[ opt --debug : -g -qNOOPTimize -qnoinline -pg ] ;
## Microsoft Visual C++ .NET 7.x
toolset vc7 cl : /Fe : -D
: /nologo
[ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
: kernel32.lib advapi32.lib ;
## VMS/OpenVMS DEC C
toolset vmsdecc cc : /OBJECT= : "/DEFINES=(" "," ")"
: /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
[ opt --release : /OPTIMIZE /NODEBUG ]
[ opt --debug : /NOOPTIMIZE /DEBUG ]
;
toolset vmsdecc link .link : /EXECUTABLE= :
: /NOMAP
[ opt --release : /NODEBUG ]
[ opt --debug : /DEBUG ]
;
# First set the build commands and options according to the
# preset toolset.
toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ;
if ! $(toolset)
{
# For some reason, the following test does not catch
# empty toolset.
ECHO "###" ;
ECHO "###" No toolset specified. Please use --toolset option. ;
ECHO "###" ;
ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
EXIT "###" ;
}
if ! $(toolset) in $(toolsets)
{
ECHO "###" ;
ECHO "###" Unknown toolset: $(toolset) ;
ECHO "###" ;
ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
EXIT "###" ;
}
--cc = $(tool.$(toolset).cc) ;
if $(tool.$(toolset).opt.out[2])
{
--bin = $(tool.$(toolset).opt.out[1]) ;
--dir = $(tool.$(toolset).opt.out[2]) ;
}
else
{
--out = $(tool.$(toolset).opt.out) ;
}
--def = $(tool.$(toolset).opt.define) ;
--flags = $(tool.$(toolset).flags) ;
--defs = $(tool.$(toolset).defines) ;
--libs = $(tool.$(toolset).linklibs) ;
if $(tool.$(toolset).link.cc)
{
--link = $(tool.$(toolset).link.cc) ;
if $(tool.$(toolset).link.opt.out[2])
{
--link-bin = $(tool.$(toolset).link.opt.out[1]) ;
--link-dir = $(tool.$(toolset).link.opt.out[2]) ;
}
else
{
--link-out = $(tool.$(toolset).link.opt.out) ;
}
--link-def = $(tool.$(toolset).link.opt.define) ;
--link-flags = $(tool.$(toolset).link.flags) ;
--link-defs = $(tool.$(toolset).link.defines) ;
--link-libs = $(tool.$(toolset).link.linklibs) ;
}
# Put executables in platform-specific subdirectory.
locate-target = $(LOCATE_TARGET) ;
if $(VMS)
{
locate-target ?= bin$(.)vms ;
platform = vms ;
}
else if $(MAC)
{
locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else if $(OSPLAT)
{
locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else
{
locate-target ?= bin$(.)$(OS:L) ;
platform = $(OS:L) ;
}
if $(debug)
{
locate-target = [ .path $(locate-target)$(.)debug ] ;
}
else
{
locate-target = [ .path $(locate-target) ] ;
}
if --show-locate-target in $(ARGV)
{
ECHO $(locate-target) ;
}
# We have some different files for UNIX, VMS, and NT.
jam.source =
command.c compile.c expand.c glob.c
hash.c hcache.c headers.c hdrmacro.c
jam.c jambase.c jamgram.c
lists.c make.c make1.c newstr.c
option.c parse.c regexp.c rules.c
scan.c search.c subst.c
timestamp.c variable.c modules.c strings.c filesys.c
builtins.c pwd.c class.c native.c modules/set.c
modules/path.c modules/regex.c modules/property-set.c
modules/sequence.c modules/order.c
;
if $(NT)
{
jam.source += execnt.c filent.c pathunix.c w32_getreg.c ;
}
else if $(OS2)
{
jam.source += execunix.c fileos2.c pathunix.c ;
}
else if $(VMS)
{
jam.source += execvms.c filevms.c pathvms.c ;
}
else if $(MAC)
{
jam.source += execmac.c filemac.c pathmac.c ;
}
else
{
jam.source += execunix.c fileunix.c pathunix.c ;
}
# Debug assertions, or not.
if ! $(debug) || --noassert in $(ARGV)
{
--defs += NDEBUG ;
}
# Enable some optional features.
--defs += OPT_HEADER_CACHE_EXT ;
--defs += OPT_GRAPH_DEBUG_EXT ;
--defs += OPT_SEMAPHORE ;
# Bug fixes
--defs += OPT_FIX_TARGET_VARIABLES_EXT ;
#~ --defs += OPT_NO_EXTERNAL_VARIABLE_SPLIT ;
# Improvements
--defs += OPT_IMPROVED_PATIENCE_EXT ;
if ( $(OS) = NT || $(NT) ) && ! NT in $(--defs)
{
--defs += NT ;
}
if $(VMS)
{
--defs += VMS ;
}
--defs += YYSTACKSIZE=5000 ;
if $(HAVE_PYTHON) = 1
{
--defs += HAVE_PYTHON ;
--flags += -I$(PYTHON_INCUDES) ;
--flags += -Wno-long-long ;
--libs += $(PYTHON_LIB) ;
}
# The basic symbolic targets...
NOTFILE all clean dist ;
ALWAYS clean ;
# Utility rules and actions...
rule .clean
{
[DELETE] clean : $(<) ;
}
if $(NT) { actions piecemeal together existing [DELETE] {
del /F /Q $(>)
} }
if $(UNIX) { actions piecemeal together existing [DELETE] {
rm -f $(>)
} }
if $(VMS) { actions piecemeal together existing [DELETE] {
DELETE $(>[--2]:J=";*, ") $(>[-1]);*
} }
if $(NT) {
--chmod+w = "attrib -r " ;
}
if $(UNIX) {
--chmod+w = "chmod +w " ;
}
if $(VMS) {
--chmod+w = "SET FILE/PROT=(S:RWED) " ;
}
rule .mkdir
{
NOUPDATE $(<) ;
if $(<:P) { DEPENDS $(<) : $(<:P) ; .mkdir $(<:P) ; }
if ! $(md<$(<)>) { [MKDIR] $(<) ; md<$(<)> = - ; }
}
if $(NT) { actions [MKDIR] {
md $(<)
} }
if $(UNIX) { actions [MKDIR] {
mkdir $(<)
} }
if $(VMS) { actions [MKDIR] {
CREATE/DIR $(
In 2004, I was trying to build jam on VMS and discovered, that
build_vms.com script does not work. I fixed it and was able to
build bootstrap jam. I've attached modified build_vms.com to this
message.
However, like Philip A. Naecker, I could not use the bootstrap jam
to build jam, so, I gave up on the idea of using jam on VMS.
I just tried to build jam using build.jam you've attached to your mail
message, and it failed -- see below. The things I noticed: [.foo.c]
should have been []foo.c or just foo.c : on VMS, []foo.c is an
equivalent of ./foo.c on Unix. Also, the C (and C++) compiler on VMS
generates the .obj file vs. .o file on Unix. From the output below,
it seems to me, that build.jam expects .o.
In this quick experiment, I was using jam sources from 1.31.0
distribution (which was the released version of boost in April, 2004).
I can try it with the CVS HEAD if you think, that it can make a
difference (I doubt it).
Boris
$ cc/ver
HP C X7.1-367 on OpenVMS IA64 V8.2
$
$ @build_vms
Building bootstrap jam...
Cleaning any previous build...
...found 1 target...
...updating 1 target...
...updated 1 target...
Building Boost.Jam...
don't know how to make [.command.c]
don't know how to make [.compile.c]
don't know how to make [.expand.c]
don't know how to make [.glob.c]
don't know how to make [.hash.c]
don't know how to make [.hcache.c]
don't know how to make [.headers.c]
don't know how to make [.hdrmacro.c]
don't know how to make [.jam.c]
don't know how to make [.jambase.c]
don't know how to make [.jamgram.c]
don't know how to make [.lists.c]
don't know how to make [.make.c]
don't know how to make [.make1.c]
don't know how to make [.newstr.c]
don't know how to make [.option.c]
don't know how to make [.parse.c]
don't know how to make [.regexp.c]
don't know how to make [.rules.c]
don't know how to make [.scan.c]
don't know how to make [.search.c]
don't know how to make [.subst.c]
don't know how to make [.timestamp.c]
don't know how to make [.variable.c]
don't know how to make [.modules.c]
don't know how to make [.strings.c]
don't know how to make [.filesys.c]
don't know how to make [.builtins.c]
don't know how to make [.pwd.c]
don't know how to make [.class.c]
don't know how to make [.native.c]
don't know how to make [.modules/set.c]
don't know how to make [.modules/path.c]
don't know how to make [.modules/regex.c]
don't know how to make [.modules/property-set.c]
don't know how to make [.modules/sequence.c]
don't know how to make [.modules/order.c]
don't know how to make [.execvms.c]
don't know how to make [.filevms.c]
don't know how to make [.pathvms.c]
...found 83 targets...
...can't find 40 targets...
...can't make 41 targets...
...skipped command.o for lack of [.command.c]...
...skipped compile.o for lack of [.compile.c]...
...skipped expand.o for lack of [.expand.c]...
...skipped glob.o for lack of [.glob.c]...
...skipped hash.o for lack of [.hash.c]...
...skipped hcache.o for lack of [.hcache.c]...
...skipped headers.o for lack of [.headers.c]...
...skipped hdrmacro.o for lack of [.hdrmacro.c]...
...skipped jam.o for lack of [.jam.c]...
...skipped jambase.o for lack of [.jambase.c]...
...skipped jamgram.o for lack of [.jamgram.c]...
...skipped lists.o for lack of [.lists.c]...
...skipped make.o for lack of [.make.c]...
...skipped make1.o for lack of [.make1.c]...
...skipped newstr.o for lack of [.newstr.c]...
...skipped option.o for lack of [.option.c]...
...skipped parse.o for lack of [.parse.c]...
...skipped regexp.o for lack of [.regexp.c]...
...skipped rules.o for lack of [.rules.c]...
...skipped scan.o for lack of [.scan.c]...
...skipped search.o for lack of [.search.c]...
...skipped subst.o for lack of [.subst.c]...
...skipped timestamp.o for lack of [.timestamp.c]...
...skipped variable.o for lack of [.variable.c]...
...skipped modules.o for lack of [.modules.c]...
...skipped strings.o for lack of [.strings.c]...
...skipped filesys.o for lack of [.filesys.c]...
...skipped builtins.o for lack of [.builtins.c]...
...skipped pwd.o for lack of [.pwd.c]...
...skipped class.o for lack of [.class.c]...
...skipped native.o for lack of [.native.c]...
...skipped modules_set.o for lack of [.modules/set.c]...
...skipped modules_path.o for lack of [.modules/path.c]...
...skipped modules_regex.o for lack of [.modules/regex.c]...
...skipped modules_property-set.o for lack of [.modules/property-set.c]...
...skipped modules_sequence.o for lack of [.modules/sequence.c]...
...skipped modules_order.o for lack of [.modules/order.c]...
...skipped execvms.o for lack of [.execvms.c]...
...skipped filevms.o for lack of [.filevms.c]...
...skipped pathvms.o for lack of [.pathvms.c]...
...skipped bjam.exe for lack of command.o...
...skipped 41 targets...
$
$ mcr [.bootstrap_vms]jam0.exe -V
Boost.Jam Version 3.1.9. OS=VMS.
Copyright 1993-2002 Christopher Seiwald and Perforce Software, Inc.
Copyright 2001 David Turner.
Copyright 2001-2002 David Abrahams.
$
build_vms.com
-------------
$ ! Copyright (C) Rene Rivera, Johan Nilsson, 2002-2003.
$ !
$ ! 8-APR-2004 Boris Gubenko
$ ! Miscellaneous improvements.
$ !
$ ! Use, modification and distribution is subject to the
$ ! Boost Software License, Version 1.0. (See accompanying file
$ ! LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
$ !
$ ! bootstrap build script for Jam
$ !
$ callerverify = 'f$verify(0)
$ set = "set"
$ set symbol /verb/scope=(nolocal,noglobal)
$ on warning then continue
$ say := write sys$output
$ !
$ IF "" .NES. F$SEARCH("[.bootstrap_vms]*.*")
$ THEN
$ say "Cleaning previous boostrap files..."
$ SET FILE/PROTECTION=(W:RWED) [.bootstrap_vms]*.*;*
$ DELETE [.bootstrap_vms]*.*;*
$ say "Removing previous boostrap directory..."
$ SET FILE/PROT=(W:RWED) []bootstrap_vms.dir;1
$ DELETE []bootstrap_vms.dir;1
$ say "Creating boostrap directory..."
$ CREATE/DIR [.bootstrap_vms]
$ ENDIF
$ !
$ say "Building bootstrap jam..."
$ !
$ obj_directory = f$envi("default") - "]" + ".bootstrap_vms]"
$ CC_FLAGS = "/DEFINE=VMS/WARN=NOINFO/PREFIX=(ALL,EXCEPT=GLOB)" + -
"/OBJ=''obj_directory'"
$ cc 'CC_FLAGS -
builtins.c, -
class.c, -
command.c, -
compile.c, -
execvms.c, -
expand.c, -
filesys.c, -
filevms.c, -
glob.c, -
hash.c, -
hdrmacro.c, -
headers.c, -
jam.c, -
jambase.c, -
jamgram.c, -
lists.c, -
make.c, -
make1.c, -
modules.c, -
native.c, -
newstr.c, -
option.c, -
parse.c, -
pathvms.c, -
pwd.c, -
regexp.c, -
rules.c, -
scan.c, -
search.c, -
strings.c, -
subst.c, -
timestamp.c, -
variable.c
$ !
$ set def [.modules]
$ cc 'CC_FLAGS -
path.c, -
property-set.c, -
regex.c, -
sequence.c, -
set.c
$ set def [-]
$ !
$ libr/create [.bootstrap_vms]libjam0.olb [.bootstrap_vms]*.obj
$ link/exec=[.bootstrap_vms]jam0.exe -
[.bootstrap_vms]libjam0.olb/include=jam/lib
$ !
$ say "Cleaning any previous build..."
$ !
$ MCR [.bootstrap_vms]jam0.exe -f build.jam --toolset=vmsdecc clean
$ !
$ say "Building Boost.Jam..."
$ !
$ MCR [.bootstrap_vms]jam0.exe -f build.jam --toolset=vmsdecc
$ !
$ unused = f$verify(callerverify)
$ exit
----- Original Message -----
From: "Rene Rivera"
Sorry it took me a while to get back to you, holidays and all that ;-)
Philip A. Naecker wrote:
That was the clue I needed - that there are files in ./modules. I was able to build the bootstrap jam by hand. Thanks.
When you get a chance could you send me the changes you did to the build_vms.com so that I can integrate them into the next release.
But now when I try to build jam using the bootstrap jam, I get the errors shown below. I can't figure out the "don't know how to make modules/*.c" errors. The errors that look like:
$ "cc" /OBJECT=[.bin_vms] ...
seem to come about because jam insists on wrapping the cc with quotes. Is there some reason it is doing that, or a way to get it to stop?
OK, I didn't know that restriction :-\ And while I was making changes to account for that I noticed a few more path related issues, thanks to the log you posted :-)
I'm attaching a modified build.jam which hopefully works better for you. And of course point out any failures and successes.
Note that in the example below, I'm using the gnv bash shell on VMS (a Gnu Unix emulation environment for VMS). But I get the same errors if I use the native VMS shell.
I think bjam executes commands in the native VMS shell so where you first execute from doesn't alter the build.
NOTE: The version of build.jam attached is against the one in Boost 1.33.1 which is basically the same as the one in Boost 1.33.0. If you need one against the Boost 1.34.0 (aka CVS HEAD) I can post that also.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
--------------------------------------------------------------------------------
#~ Copyright 2002-2005 Rene Rivera. #~ Distributed under the Boost Software License, Version 1.0. #~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Platform related specifics. if $(NT) || $(OS2) { rule .path { if $(>) { return "$(<:J=\\)\\$(>:J=)" ; } else { return "$(<:J=\\)" ; } } } else if $(VMS) { rule .path { if $(>) { return "[.$(<:J=/)]$(>:J=)" ; } else { return "[.$(<:J=/)]" ; } } } else if $(MAC) { rule .path { if $(>) { return ":$(<:J=\:)\:$(>:J=)" ; } else { return ":$(<:J=\:)" ; } } } else { rule .path { if $(>) { return "$(<:J=/)/$(>:J=)" ; } else { return "$(<:J=/)" ; } } } if $(VMS) { . = "_" ; } else { . = "." ; } if $(VMS) { ~ = "" ; } else { ~ = "\"" ; }
# Info about what we are building. NAME = boost-jam ; VERSION = 3$(.)1$(.)11 ; RELEASE = 1 ; LICENSE = 1_0 ;
HAVE_PYTHON = 0 ; PYTHON_INCUDES = /usr/include/python2.3 ; PYTHON_LIB = -lpython2.3 ;
# Generate development debug binaries? if --debug in $(ARGV) { debug = true ; }
# Attempt to generate and/or build the grammar? if --grammar in $(ARGV) { grammar = true ; }
# Do we need to add a default build type argument? if ! ( --release in $(ARGV) ) && ! ( --debug in $(ARGV) ) { ARGV += --release ; }
# An explicit root for the toolset? (trim spaces) toolset-root = [ MATCH --toolset-root=(.*) : $(ARGV) ] ; { local t = [ MATCH "[ ]*(.*)" : $(toolset-root:J=" ") ] ; toolset-root = ; while $(t) { t = [ MATCH "([^ ]+)([ ]*)(.*)" : $(t) ] ; toolset-root += $(t[1]) ; if $(t[3]) { toolset-root += $(t[2]) ; } t = $(t[3]) ; } toolset-root = $(toolset-root:J="") ; }
# Configure the implemented toolsets. These are minimal # commands and options to compile the full Jam. When # adding new toolsets make sure to add them to the # "known" list also. rule toolset ( name command .type ? : opt.out + : opt.define * : flags * : linklibs * ) { .type ?= "" ; tool.$(name)$(.type).cc ?= $(command) ; tool.$(name)$(.type).opt.out ?= $(opt.out) ; tool.$(name)$(.type).opt.define ?= $(opt.define) ; tool.$(name)$(.type).flags ?= $(flags) ; tool.$(name)$(.type).linklibs ?= $(linklibs) ; if ! $(name) in $(toolsets) { toolsets += $(name) ; } } rule opt ( type : yes-opt * : no-opt * ) { if $(type) in $(ARGV) { return $(yes-opt) ; } else { return $(no-opt) ; } } ## HP-UX aCC compiler toolset acc cc : "-o " : -D : -Ae [ opt --release : -s -O3 ] [ opt --debug : -g -pg ] ; ## Borland C++ 5.5.x toolset borland bcc32 : -e -n : /D : -WC -w- -q "-I$(toolset-root)Include" "-L$(toolset-root)Lib" [ opt --release : -O2 -vi -w-inl ] [ opt --debug : -v -Od -vi- ] ; ## Generic Unix cc if ! $(CC) { CC = cc ; } toolset cc $(CC) : "-o " : -D : $(CFLAGS) [ opt --release : -s -O ] [ opt --debug : -g ] : $(LIBS) ; ## Comeau C/C++ 4.x toolset como como : "-o " : -D : --c [ opt --release : --inlining ] [ opt --debug : --no_inlining ] ; ## MacOSX Darwin, using GCC 2.9.x, 3.x toolset darwin cc : "-o " : -D : [ opt --release : -Wl,-x -O3 -finline-functions ] [ opt --debug : -g -O0 -fno-inline -pg ] ; ## GCC 2.x, 3.x toolset gcc gcc : "-o " : -D : -pedantic [ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ] [ opt --debug : -g -O0 -fno-inline ] ; ## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll toolset gcc-nocygwin gcc : "-o " : -D : -s -O3 -mno-cygwin [ opt --release : -finline-functions ] [ opt --debug : -s -O3 -fno-inline -pg ] ; ## Intel C/C++ for Linux toolset intel-linux icc : "-o " : -D : [ opt --release : -Xlinker -s -O3 ] [ opt --debug : -g -O0 -p ] ; ## Intel C/C++ for Win32 toolset intel-win32 icl : /Fe : -D : /nologo [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ] [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] ; ## KCC ? toolset kcc KCC : "-o " : -D : [ opt --release : -s +K2 ] [ opt --debug : -g +K0 ] ; ## Borland Kylix toolset kylix bc++ : -o : -D : -tC -q [ opt --release : -O2 -vi -w-inl ] [ opt --debug : -v -Od -vi- ] ; ## Metrowerks CodeWarrior 8.x { # Even though CW can compile all files at once, it crashes if it tries in the bjam case. local mwcc = ; if $(NT) { mwcc = mwcc ; } else { mwcc = mwc$(OSPLAT:L) ; } mwcc ?= mwcc ; toolset metrowerks $(mwcc) : "-o " : -D : -c -lang c -subsystem console -cwd include [ opt --release : -runtime ss -opt full -inline all ] [ opt --debug : -runtime ssd -opt none -inline off ] ; toolset metrowerks $(mwcc) .link : "-o " : : -subsystem console -ladvapi32.lib [ opt --release : -runtime ss ] [ opt --debug : -runtime ssd ] ; } ## MINGW GCC toolset mingw gcc : "-o " : -D : [ opt --release : -s -O3 -finline-functions ] [ opt --debug : -g -O0 -fno-inline -pg ] ; ## MIPS Pro toolset mipspro cc : "-o " : -D : [ opt --release : -s -O3 -g0 -INLINE:none ] [ opt --debug : -g -O0 -INLINE ] ; ## Microsoft Visual Studio C++ 6.x toolset msvc cl : /Fe : -D : /nologo [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ] [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] : kernel32.lib advapi32.lib ; ## QNX 6.x GCC 3.x/2.95.3 toolset qcc qcc : "-o " : -D : -pedantic [ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ] [ opt --debug : -g -O0 -fno-inline ] ; ## Sun Workshop 6 C++ toolset sunpro cc : "-o " : -D : [ opt --release : -s -fast -xO4 ] [ opt --debug : -g ] ; ## Compaq Alpha CXX toolset tru64cxx cc : "-o " : -D : [ opt --release : -s -O5 -inline speed ] [ opt --debug : -g -O0 -pg ] ; ## IBM VisualAge C++ toolset vacpp xlc : "-o " : -D : [ opt --release : -s -O3 -qstrict -qinline ] [ opt --debug : -g -qNOOPTimize -qnoinline -pg ] ; ## Microsoft Visual C++ .NET 7.x toolset vc7 cl : /Fe : -D : /nologo [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ] [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] : kernel32.lib advapi32.lib ; ## VMS/OpenVMS DEC C toolset vmsdecc cc : /OBJECT= : "/DEFINES=(" "," ")" : /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES [ opt --release : /OPTIMIZE /NODEBUG ] [ opt --debug : /NOOPTIMIZE /DEBUG ] ; toolset vmsdecc link .link : /EXECUTABLE= : : /NOMAP [ opt --release : /NODEBUG ] [ opt --debug : /DEBUG ] ;
# First set the build commands and options according to the # preset toolset. toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ; if ! $(toolset) { # For some reason, the following test does not catch # empty toolset. ECHO "###" ; ECHO "###" No toolset specified. Please use --toolset option. ; ECHO "###" ; ECHO "###" Known toolsets are: $(toolsets:J=", ") ; EXIT "###" ; } if ! $(toolset) in $(toolsets) { ECHO "###" ; ECHO "###" Unknown toolset: $(toolset) ; ECHO "###" ; ECHO "###" Known toolsets are: $(toolsets:J=", ") ; EXIT "###" ; } --cc = $(tool.$(toolset).cc) ; if $(tool.$(toolset).opt.out[2]) { --bin = $(tool.$(toolset).opt.out[1]) ; --dir = $(tool.$(toolset).opt.out[2]) ; } else { --out = $(tool.$(toolset).opt.out) ; } --def = $(tool.$(toolset).opt.define) ; --flags = $(tool.$(toolset).flags) ; --defs = $(tool.$(toolset).defines) ; --libs = $(tool.$(toolset).linklibs) ; if $(tool.$(toolset).link.cc) { --link = $(tool.$(toolset).link.cc) ; if $(tool.$(toolset).link.opt.out[2]) { --link-bin = $(tool.$(toolset).link.opt.out[1]) ; --link-dir = $(tool.$(toolset).link.opt.out[2]) ; } else { --link-out = $(tool.$(toolset).link.opt.out) ; } --link-def = $(tool.$(toolset).link.opt.define) ; --link-flags = $(tool.$(toolset).link.flags) ; --link-defs = $(tool.$(toolset).link.defines) ; --link-libs = $(tool.$(toolset).link.linklibs) ; }
# Put executables in platform-specific subdirectory. locate-target = $(LOCATE_TARGET) ; if $(VMS) { locate-target ?= bin$(.)vms ; platform = vms ; } else if $(MAC) { locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ; platform = $(OS:L)$(OSPLAT:L) ; } else if $(OSPLAT) { locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ; platform = $(OS:L)$(OSPLAT:L) ; } else { locate-target ?= bin$(.)$(OS:L) ; platform = $(OS:L) ; } if $(debug) { locate-target = [ .path $(locate-target)$(.)debug ] ; } else { locate-target = [ .path $(locate-target) ] ; }
if --show-locate-target in $(ARGV) { ECHO $(locate-target) ; }
# We have some different files for UNIX, VMS, and NT. jam.source = command.c compile.c expand.c glob.c hash.c hcache.c headers.c hdrmacro.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c parse.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c ; if $(NT) { jam.source += execnt.c filent.c pathunix.c w32_getreg.c ; } else if $(OS2) { jam.source += execunix.c fileos2.c pathunix.c ; } else if $(VMS) { jam.source += execvms.c filevms.c pathvms.c ; } else if $(MAC) { jam.source += execmac.c filemac.c pathmac.c ; } else { jam.source += execunix.c fileunix.c pathunix.c ; }
# Debug assertions, or not. if ! $(debug) || --noassert in $(ARGV) { --defs += NDEBUG ; }
# Enable some optional features. --defs += OPT_HEADER_CACHE_EXT ; --defs += OPT_GRAPH_DEBUG_EXT ; --defs += OPT_SEMAPHORE ;
# Bug fixes --defs += OPT_FIX_TARGET_VARIABLES_EXT ; #~ --defs += OPT_NO_EXTERNAL_VARIABLE_SPLIT ;
# Improvements --defs += OPT_IMPROVED_PATIENCE_EXT ;
if ( $(OS) = NT || $(NT) ) && ! NT in $(--defs) { --defs += NT ; } if $(VMS) { --defs += VMS ; } --defs += YYSTACKSIZE=5000 ;
if $(HAVE_PYTHON) = 1 { --defs += HAVE_PYTHON ; --flags += -I$(PYTHON_INCUDES) ; --flags += -Wno-long-long ; --libs += $(PYTHON_LIB) ; }
# The basic symbolic targets... NOTFILE all clean dist ; ALWAYS clean ;
# Utility rules and actions... rule .clean { [DELETE] clean : $(<) ; } if $(NT) { actions piecemeal together existing [DELETE] { del /F /Q $(>) } } if $(UNIX) { actions piecemeal together existing [DELETE] { rm -f $(>) } } if $(VMS) { actions piecemeal together existing [DELETE] { DELETE $(>[--2]:J=";*, ") $(>[-1]);* } } if $(NT) { --chmod+w = "attrib -r " ; } if $(UNIX) { --chmod+w = "chmod +w " ; } if $(VMS) { --chmod+w = "SET FILE/PROT=(S:RWED) " ; }
rule .mkdir { NOUPDATE $(<) ; if $(<:P) { DEPENDS $(<) : $(<:P) ; .mkdir $(<:P) ; } if ! $(md<$(<)>) { [MKDIR] $(<) ; md<$(<)> = - ; } } if $(NT) { actions [MKDIR] { md $(<) } } if $(UNIX) { actions [MKDIR] { mkdir $(<) } } if $(VMS) { actions [MKDIR] { CREATE/DIR $(
rule .exe { local exe = $(<) ; if $(NT) || ( $(UNIX) && $(OS) = CYGWIN ) || $(VMS) { exe = $(exe:S=.exe) ; } LOCATE on $(exe) = $(locate-target) ; DEPENDS all : $(exe) ; .mkdir $(locate-target) ; if $(--link) { local objs = ; for local s in $(>) { # Translate any subdir elements into a simple file name. local parts = [ MATCH "([^/]+)[/]?(.*)" : $(s) ] ; if ! $(parts[-1]) { parts = $(parts[1--2]) ; } local o = $(parts:J=_) ; o = $(o:S=.o) ; objs += $(o) ; LOCATE on $(o) = $(locate-target) ; DEPENDS $(exe) : $(o) ; DEPENDS $(o) : [ .path $(parts) ] ; DEPENDS $(o) : $(locate-target) ; [COMPILE] $(o) : [ .path $(parts) ] ; .clean $(o) ; } DEPENDS $(exe) : $(objs) ; DEPENDS $(exe) : $(locate-target) ; [COMPILE.LINK] $(exe) : $(objs) ; .clean $(exe) ; } else { DEPENDS $(exe) : $(>) ; DEPENDS $(exe) : $(locate-target) ; [COMPILE] $(exe) : $(>) ; .clean $(exe) ; } return $(exe) ; } if ! $(--def[2]) { actions [COMPILE] { $(~)$(--cc)$(~) $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def)$(--defs) $(--flags) "$(--libs)" $(>) } } else { actions [COMPILE] { $(~)$(--cc)$(~) $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def[1])$(--defs:J=$(--def[2]))$(--def[3]) $(--flags) "$(--libs)" $(>) } } if $(VMS) { actions [COMPILE.LINK] { $(~)$(--link)$(~) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ") } } else { actions [COMPILE.LINK] { $(~)$(--link)$(~) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>) } }
rule .link { DEPENDS all : $(<) ; DEPENDS $(<) : $(>) ; [LINK] $(<) : $(>) ; .clean $(<) ; } if $(NT) { actions [LINK] { copy $(>) $(<) } } if $(UNIX) { actions [LINK] { ln -fs $(>) $(<) } } if $(VMS) { actions [LINK] { COPY/REPLACE $(>) $(<) } }
rule .move { DEPENDS $(<) : $(>) ; [MOVE] $(<) : $(>) ; } if $(NT) { actions [MOVE] { del /f $(<) rename $(>) $(<) } } if $(UNIX) { actions [MOVE] { mv -f $(>) $(<) } } if $(VMS) { actions [MOVE] { RENAME $(>) $(<) } }
# Generate the grammar tokens table, and the real yacc grammar. rule .yyacc { local exe = [ .exe yyacc : yyacc.c ] ; NOUPDATE $(exe) ; DEPENDS $(<) : $(exe) $(>) ; LEAVES $(<) ; yyacc.exe on $(<) = $(exe:R=$(locate-target)) ; [YYACC] $(<) : $(>) ; } actions [YYACC] { $(--chmod+w)$(<[1]) $(--chmod+w)$(<[2]) "$(yyacc.exe)" $(<) $(>) } if $(grammar) { .yyacc jamgram.y jamgramtab.h : jamgram.yy ; } else if $(debug) { .exe yyacc : yyacc.c ; }
# How to build the grammar. if $(NT) { SUFEXE = .exe ; # try some other likely spellings... PATH ?= $(Path) ; PATH ?= $(path) ; } SUFEXE ?= "" ;
yacc ?= [ GLOB $(PATH) : yacc$(SUFEXE) ] ; yacc ?= [ GLOB $(PATH) : bison$(SUFEXE) ] ; yacc ?= [ GLOB "$(ProgramFiles:J= )\\GnuWin32\\bin" "C:\\Program Files\\GnuWin32\\bin" : bison$(SUFEXE) ] ; yacc = $(yacc[1]) ; switch $(yacc:D=:S=) { case bison : yacc += -d --yacc ; case yacc : yacc += -d ; } if $(debug) && $(yacc) { yacc += -t -v ; } yacc += $(YACCFLAGS) ;
rule .yacc { DEPENDS $(<) : $(>) ; LEAVES $(<) ; [YACC] $(<) : $(>) ; } if $(NT) { actions [YACC] { "$(yacc)" $(>) if not errorlevel 1 ( del /f $(<[1]) rename y.tab$(<[1]:S) $(<[1]) del /f $(<[2]) rename y.tab$(<[2]:S) $(<[2]) ) else set _error_ = } } if $(UNIX) { actions [YACC] { if ` "$(yacc)" $(>) ` ; then mv -f y.tab$(<[1]:S) $(<[1]) mv -f y.tab$(<[2]:S) $(<[2]) else exit 1 fi } } if $(VMS) { actions [YACC] { IF "$(yacc)" $(>) THEN RENAME y_tab$(<[1]:S) $(<[1]) RENAME y_tab$(<[2]:S) $(<[2]) ENDIF } } if $(grammar) && ! $(yacc) { EXIT "Could not find the 'yacc' tool, and therefore can not build the grammar." ; } if $(grammar) && $(yacc) { .yacc jamgram.c jamgram.h : jamgram.y ; }
# How to build the compiled in jambase. rule .mkjambase { local exe = [ .exe mkjambase : mkjambase.c ] ; DEPENDS $(<) : $(exe) $(>) ; LEAVES $(<) ; mkjambase.exe on $(<) = $(exe:R=$(locate-target)) ; [MKJAMBASE] $(<) : $(>) ; } actions [MKJAMBASE] { $(--chmod+w)$(<) $(mkjambase.exe) $(<) $(>) } if $(debug) { .mkjambase jambase.c : Jambase ; }
# How to build Jam. rule .jam { $(>).exe = [ .exe $(>) : $(jam.source) ] ; DEPENDS all : $($(>).exe) ;
if $(debug) { $(<).exe = $(<:S=$($(>).exe:S)) ; LOCATE on $($(<).exe) = $(locate-target) ; .link $($(<).exe) : $($(>).exe) ; DEPENDS all : $($(<).exe) ; } } .jam jam : bjam ;
# Scan sources for header dependencies. # WARNING: Yes those are *REAL TABS* below. DO NOT CHANGE, # under any circumstances, to spaces!! And the tabs # indenting this are so that if someone is in the mood to # replace tabs they hit this comment, and hopefully notice # their error. rule .scan { HDRRULE on $(<:D=) = .hdr.scan ; HDRSCAN on $(<:D=) = "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ; } rule .hdr.scan { local hdrs = [ GLOB . : $(>:D=) ] ; INCLUDES $(<:D=) : $(hdrs:D=) ; HDRRULE on $(>:D=) = .hdr.scan ; HDRSCAN on $(>:D=) = "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ; } .scan [ GLOB . : *.c ] ;
# Distribution making from here on out. dist.license = #~ [ GLOB . : LICENSE_$(LICENSE).txt ] [ GLOB [ .path .. .. .. ] : LICENSE_$(LICENSE).txt ] ; [ GLOB . : LICENSE_$(LICENSE).txt ] [ GLOB [ .path .. .. .. ] : LICENSE_$(LICENSE).txt ] [ GLOB [ .path .. boost ] : LICENSE_$(LICENSE).txt ] ; dist.docs = $(dist.license[1]) index.html Porting Jam.html ; dist.source = [ GLOB . : *.c *.h ] ; dist.source = $(dist.source:D=) $(dist.docs) build.jam build.bat build.sh build_vms.com Jambase jamgram.y jamgram.yy [ .path debian : changelog ] [ .path debian : control ] [ .path debian : copyright ] [ .path debian : jam.man.sgml ] [ .path debian : rules ] [ .path modules : set.c ] [ .path modules : path.c ] [ .path modules : regex.c ] [ .path modules : property-set.c ] [ .path modules : sequence.c ] [ .path modules : order.c ] boost-jam.spec ; dist.bin = bjam ; dist.bin = $(dist.license[1]) $(dist.bin:S=$(bjam.exe:S)) ;
if $(NT) { zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7z.exe" "7zn.exe" ] ; zip ?= [ GLOB $(PATH) : zip.exe ] ; zip ?= zip ; zip = $(zip[1]) ; switch $(zip:D=:S=) { case 7z* : zip += a -r -tzip -mx=9 ; case zip : zip += -9r ; } actions piecemeal [PACK] { "$(zip)" "$(<)" "$(>)" } actions piecemeal [ZIP] { "$(zip)" "$(<)" "$(>)" } actions piecemeal [COPY] { copy /Y "$(>)" "$(<)" >NUL: } } if $(UNIX) { actions [PACK] { tar zcf "$(<)" "$(>)" } actions [ZIP] { gzip -c9 "$(>)" > "$(<)" } actions [COPY] { cp -Rpf "$(>)" "$(<)" } }
# The single binary, compressed. rule .binary { local zip = ; if $(NT) { zip = $($(<).exe:S=.zip) ; } if $(UNIX) { zip = $($(<).exe:S=.tgz) ; } zip = $(zip:S=)-$(VERSION)-$(RELEASE)-$(platform)$(zip:S) ; DEPENDS $(zip) : $($(<).exe) ; DEPENDS dist : $(zip) ; #~ LOCATE on $(zip) = $(locate-target) ; if $(NT) { [ZIP] $(zip) : $($(<).exe) ; } if $(UNIX) { [PACK] $(zip) : $($(<).exe) ; } .clean $(zip) ; }
# Package some file. rule .package ( dst-dir : src-files + ) { local dst-files ; for local src-path in $(src-files) { local src-subdir = $(src-path:D) ; local src-file = $(src-path) ; while $(src-subdir:D) { src-subdir = $(src-subdir:D) ; } if $(src-subdir) = ".." { src-file = $(src-file:D=) ; } dst-files += $(src-file:R=$(dst-dir)) ; }
local pack = ; if $(NT) { pack = $(dst-dir).zip ; } if $(UNIX) { pack = $(dst-dir).tgz ; }
DEPENDS dist : $(pack) ; DEPENDS $(pack) : $(dst-files) ;
local dst-files-queue = $(dst-files) ; for local src-path in $(src-files) { local dst-file = $(dst-files-queue[1]) ; dst-files-queue = $(dst-files-queue[2-]) ; DEPENDS $(dst-file) : $(src-path) $(dst-file:D) ; .mkdir $(dst-file:D) ;
[COPY] $(dst-file) : $(src-path) ; .clean $(dst-file) ; }
[PACK] $(pack) : $(dst-files) ; .clean $(pack) ; }
# RPM distro file. rpm-tool = [ GLOB $(PATH) : "rpmbuild" "rpm" ] ; rule .rpm ( name : source ) { local rpm-arch = ; switch $(OSPLAT) { case X86 : rpm-arch ?= i386 ; case PPC : rpm-arch ?= ppc ; case AXP : rpm-arch ?= alpha ; # no guaranty for these: case IA64 : rpm-arch ?= ia64 ; case ARM : rpm-arch ?= arm ; case SPARC : rpm-arch ?= sparc ; case * : rpm-arch ?= other ; } local target = $(name)-rpm ; NOTFILE $(target) ; DEPENDS dist : $(target) ; DEPENDS $(target) : $(name).$(rpm-arch).rpm $(name).src.rpm ; DEPENDS $(name).$(rpm-arch).rpm : $(source) ; DEPENDS $(name).src.rpm : $(name).$(rpm-arch).rpm ; docs on $(target) = $(dist.docs:J=" ") ; arch on $(target) = $(rpm-arch) ; if $(rpm-arch) = ppc { target-opt on $(target) = --target= ; } else { target-opt on $(target) = "--target " ; } [RPM] $(target) : $(source) ; .clean $(name).$(rpm-arch).rpm $(name).src.rpm ; } actions [RPM] { export BOOST_JAM_TOOLSET="$(toolset)" $(rpm-tool[1]) -ta $(target-opt)$(arch) $(>) | tee rpm.out cp `grep -e '^Wrote:' rpm.out | sed 's/^Wrote: //'` . rm -f rpm.out }
# The distribution targets. Don't bother with the targets if # distribution build not requested. if dist in $(ARGV) { #~ .binary bjam ; .package $(NAME)-$(VERSION) : $(dist.source) ; .package $(NAME)-$(VERSION)-$(RELEASE)-$(platform) : $(dist.bin) ; if $(rpm-tool) { .rpm $(NAME)-$(VERSION)-$(RELEASE) : $(NAME)-$(VERSION).tgz ; } }
--------------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boris Gubenko wrote:
I just tried to build jam using build.jam you've attached to your mail message, and it failed -- see below. The things I noticed: [.foo.c] should have been []foo.c or just foo.c : on VMS, []foo.c is an equivalent of ./foo.c on Unix. Also, the C (and C++) compiler on VMS generates the .obj file vs. .o file on Unix. From the output below, it seems to me, that build.jam expects .o.
Yea, that's what I was trying to accomplish. But missed some conditions.
In this quick experiment, I was using jam sources from 1.31.0 distribution (which was the released version of boost in April, 2004). I can try it with the CVS HEAD if you think, that it can make a difference (I doubt it).
The 3.1.11 bjam sources might be better. But the errors where obvious enough.
don't know how to make [.command.c]
Oops, missed some changes. Attached is another try.
--
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
#~ Copyright 2002-2005 Rene Rivera.
#~ Distributed under the Boost Software License, Version 1.0.
#~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Platform related specifics.
if $(NT) || $(OS2) {
rule .path {
if $(>) && $(<) { return "$(<:J=\\)\\$(>:J=)" ; }
else if $(>) { return "$(>:J=)" ; }
else { return "$(<:J=\\)" ; } } }
else if $(VMS) {
rule .path {
if $(>) && $(<) { return "[.$(<:J=/)]$(>:J=)" ; }
else if $(>) { return "$(>:J=)" ; }
else { return "[.$(<:J=/)]" ; } } }
else if $(MAC) {
rule .path {
if $(>) && $(<) { return ":$(<:J=\:)\:$(>:J=)" ; }
else if $(>) { return "$(>:J=)" ; }
else { return ":$(<:J=\:)" ; } } }
else {
rule .path {
if $(>) && $(<) { return "$(<:J=/)/$(>:J=)" ; }
else if $(>) { return "$(>:J=)" ; }
else { return "$(<:J=/)" ; } } }
if $(VMS) { . = "_" ; }
else { . = "." ; }
if $(VMS) { ~ = "" ; }
else { ~ = "\"" ; }
# Info about what we are building.
NAME = boost-jam ;
VERSION = 3$(.)1$(.)11 ;
RELEASE = 1 ;
LICENSE = 1_0 ;
HAVE_PYTHON = 0 ;
PYTHON_INCUDES = /usr/include/python2.3 ;
PYTHON_LIB = -lpython2.3 ;
# Generate development debug binaries?
if --debug in $(ARGV)
{
debug = true ;
}
# Attempt to generate and/or build the grammar?
if --grammar in $(ARGV)
{
grammar = true ;
}
# Do we need to add a default build type argument?
if ! ( --release in $(ARGV) ) &&
! ( --debug in $(ARGV) )
{
ARGV += --release ;
}
# An explicit root for the toolset? (trim spaces)
toolset-root = [ MATCH --toolset-root=(.*) : $(ARGV) ] ;
{
local t = [ MATCH "[ ]*(.*)" : $(toolset-root:J=" ") ] ;
toolset-root = ;
while $(t)
{
t = [ MATCH "([^ ]+)([ ]*)(.*)" : $(t) ] ;
toolset-root += $(t[1]) ;
if $(t[3]) { toolset-root += $(t[2]) ; }
t = $(t[3]) ;
}
toolset-root = $(toolset-root:J="") ;
}
# Configure the implemented toolsets. These are minimal
# commands and options to compile the full Jam. When
# adding new toolsets make sure to add them to the
# "known" list also.
rule toolset ( name command .type ? : opt.out + : opt.define * : flags * : linklibs * )
{
.type ?= "" ;
tool.$(name)$(.type).cc ?= $(command) ;
tool.$(name)$(.type).opt.out ?= $(opt.out) ;
tool.$(name)$(.type).opt.define ?= $(opt.define) ;
tool.$(name)$(.type).flags ?= $(flags) ;
tool.$(name)$(.type).linklibs ?= $(linklibs) ;
if ! $(name) in $(toolsets) { toolsets += $(name) ; }
}
rule opt ( type : yes-opt * : no-opt * ) { if $(type) in $(ARGV) { return $(yes-opt) ; } else { return $(no-opt) ; } }
## HP-UX aCC compiler
toolset acc cc : "-o " : -D
: -Ae
[ opt --release : -s -O3 ]
[ opt --debug : -g -pg ] ;
## Borland C++ 5.5.x
toolset borland bcc32 : -e -n : /D
: -WC -w- -q "-I$(toolset-root)Include" "-L$(toolset-root)Lib"
[ opt --release : -O2 -vi -w-inl ]
[ opt --debug : -v -Od -vi- ] ;
## Generic Unix cc
if ! $(CC) { CC = cc ; }
toolset cc $(CC) : "-o " : -D
: $(CFLAGS)
[ opt --release : -s -O ]
[ opt --debug : -g ]
: $(LIBS) ;
## Comeau C/C++ 4.x
toolset como como : "-o " : -D
: --c
[ opt --release : --inlining ]
[ opt --debug : --no_inlining ] ;
## MacOSX Darwin, using GCC 2.9.x, 3.x
toolset darwin cc : "-o " : -D
:
[ opt --release : -Wl,-x -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline -pg ] ;
## GCC 2.x, 3.x
toolset gcc gcc : "-o " : -D
: -pedantic
[ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline ] ;
## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll
toolset gcc-nocygwin gcc : "-o " : -D
: -s -O3 -mno-cygwin
[ opt --release : -finline-functions ]
[ opt --debug : -s -O3 -fno-inline -pg ] ;
## Intel C/C++ for Linux
toolset intel-linux icc : "-o " : -D
:
[ opt --release : -Xlinker -s -O3 ]
[ opt --debug : -g -O0 -p ] ;
## Intel C/C++ for Win32
toolset intel-win32 icl : /Fe : -D
: /nologo
[ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] ;
## KCC ?
toolset kcc KCC : "-o " : -D
:
[ opt --release : -s +K2 ]
[ opt --debug : -g +K0 ] ;
## Borland Kylix
toolset kylix bc++ : -o : -D
: -tC -q
[ opt --release : -O2 -vi -w-inl ]
[ opt --debug : -v -Od -vi- ] ;
## Metrowerks CodeWarrior 8.x
{
# Even though CW can compile all files at once, it crashes if it tries in the bjam case.
local mwcc = ; if $(NT) { mwcc = mwcc ; } else { mwcc = mwc$(OSPLAT:L) ; }
mwcc ?= mwcc ;
toolset metrowerks $(mwcc) : "-o " : -D
: -c -lang c -subsystem console -cwd include
[ opt --release : -runtime ss -opt full -inline all ]
[ opt --debug : -runtime ssd -opt none -inline off ] ;
toolset metrowerks $(mwcc) .link : "-o " :
: -subsystem console -ladvapi32.lib
[ opt --release : -runtime ss ]
[ opt --debug : -runtime ssd ] ;
}
## MINGW GCC
toolset mingw gcc : "-o " : -D
:
[ opt --release : -s -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline -pg ] ;
## MIPS Pro
toolset mipspro cc : "-o " : -D
:
[ opt --release : -s -O3 -g0 -INLINE:none ]
[ opt --debug : -g -O0 -INLINE ] ;
## Microsoft Visual Studio C++ 6.x
toolset msvc cl : /Fe : -D
: /nologo
[ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
: kernel32.lib advapi32.lib ;
## QNX 6.x GCC 3.x/2.95.3
toolset qcc qcc : "-o " : -D
: -pedantic
[ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ]
[ opt --debug : -g -O0 -fno-inline ] ;
## Sun Workshop 6 C++
toolset sunpro cc : "-o " : -D
:
[ opt --release : -s -fast -xO4 ]
[ opt --debug : -g ] ;
## Compaq Alpha CXX
toolset tru64cxx cc : "-o " : -D
:
[ opt --release : -s -O5 -inline speed ]
[ opt --debug : -g -O0 -pg ] ;
## IBM VisualAge C++
toolset vacpp xlc : "-o " : -D
:
[ opt --release : -s -O3 -qstrict -qinline ]
[ opt --debug : -g -qNOOPTimize -qnoinline -pg ] ;
## Microsoft Visual C++ .NET 7.x
toolset vc7 cl : /Fe : -D
: /nologo
[ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ]
[ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ]
: kernel32.lib advapi32.lib ;
## VMS/OpenVMS DEC C
toolset vmsdecc cc : /OBJECT= : "/DEFINES=(" "," ")"
: /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES
[ opt --release : /OPTIMIZE /NODEBUG ]
[ opt --debug : /NOOPTIMIZE /DEBUG ]
;
toolset vmsdecc link .link : /EXECUTABLE= :
: /NOMAP
[ opt --release : /NODEBUG ]
[ opt --debug : /DEBUG ]
;
# First set the build commands and options according to the
# preset toolset.
toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ;
if ! $(toolset)
{
# For some reason, the following test does not catch
# empty toolset.
ECHO "###" ;
ECHO "###" No toolset specified. Please use --toolset option. ;
ECHO "###" ;
ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
EXIT "###" ;
}
if ! $(toolset) in $(toolsets)
{
ECHO "###" ;
ECHO "###" Unknown toolset: $(toolset) ;
ECHO "###" ;
ECHO "###" Known toolsets are: $(toolsets:J=", ") ;
EXIT "###" ;
}
--cc = $(tool.$(toolset).cc) ;
if $(tool.$(toolset).opt.out[2])
{
--bin = $(tool.$(toolset).opt.out[1]) ;
--dir = $(tool.$(toolset).opt.out[2]) ;
}
else
{
--out = $(tool.$(toolset).opt.out) ;
}
--def = $(tool.$(toolset).opt.define) ;
--flags = $(tool.$(toolset).flags) ;
--defs = $(tool.$(toolset).defines) ;
--libs = $(tool.$(toolset).linklibs) ;
if $(tool.$(toolset).link.cc)
{
--link = $(tool.$(toolset).link.cc) ;
if $(tool.$(toolset).link.opt.out[2])
{
--link-bin = $(tool.$(toolset).link.opt.out[1]) ;
--link-dir = $(tool.$(toolset).link.opt.out[2]) ;
}
else
{
--link-out = $(tool.$(toolset).link.opt.out) ;
}
--link-def = $(tool.$(toolset).link.opt.define) ;
--link-flags = $(tool.$(toolset).link.flags) ;
--link-defs = $(tool.$(toolset).link.defines) ;
--link-libs = $(tool.$(toolset).link.linklibs) ;
}
# Put executables in platform-specific subdirectory.
locate-target = $(LOCATE_TARGET) ;
if $(VMS)
{
locate-target ?= bin$(.)vms ;
platform = vms ;
}
else if $(MAC)
{
locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else if $(OSPLAT)
{
locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ;
platform = $(OS:L)$(OSPLAT:L) ;
}
else
{
locate-target ?= bin$(.)$(OS:L) ;
platform = $(OS:L) ;
}
if $(debug)
{
locate-target = [ .path $(locate-target)$(.)debug ] ;
}
else
{
locate-target = [ .path $(locate-target) ] ;
}
if --show-locate-target in $(ARGV)
{
ECHO $(locate-target) ;
}
# We have some different files for UNIX, VMS, and NT.
jam.source =
command.c compile.c expand.c glob.c
hash.c hcache.c headers.c hdrmacro.c
jam.c jambase.c jamgram.c
lists.c make.c make1.c newstr.c
option.c parse.c regexp.c rules.c
scan.c search.c subst.c
timestamp.c variable.c modules.c strings.c filesys.c
builtins.c pwd.c class.c native.c modules/set.c
modules/path.c modules/regex.c modules/property-set.c
modules/sequence.c modules/order.c
;
if $(NT)
{
jam.source += execnt.c filent.c pathunix.c w32_getreg.c ;
}
else if $(OS2)
{
jam.source += execunix.c fileos2.c pathunix.c ;
}
else if $(VMS)
{
jam.source += execvms.c filevms.c pathvms.c ;
}
else if $(MAC)
{
jam.source += execmac.c filemac.c pathmac.c ;
}
else
{
jam.source += execunix.c fileunix.c pathunix.c ;
}
# Debug assertions, or not.
if ! $(debug) || --noassert in $(ARGV)
{
--defs += NDEBUG ;
}
# Enable some optional features.
--defs += OPT_HEADER_CACHE_EXT ;
--defs += OPT_GRAPH_DEBUG_EXT ;
--defs += OPT_SEMAPHORE ;
# Bug fixes
--defs += OPT_FIX_TARGET_VARIABLES_EXT ;
#~ --defs += OPT_NO_EXTERNAL_VARIABLE_SPLIT ;
# Improvements
--defs += OPT_IMPROVED_PATIENCE_EXT ;
if ( $(OS) = NT || $(NT) ) && ! NT in $(--defs)
{
--defs += NT ;
}
if $(VMS)
{
--defs += VMS ;
}
--defs += YYSTACKSIZE=5000 ;
if $(HAVE_PYTHON) = 1
{
--defs += HAVE_PYTHON ;
--flags += -I$(PYTHON_INCUDES) ;
--flags += -Wno-long-long ;
--libs += $(PYTHON_LIB) ;
}
# The basic symbolic targets...
NOTFILE all clean dist ;
ALWAYS clean ;
# Utility rules and actions...
rule .clean
{
[DELETE] clean : $(<) ;
}
if $(NT) { actions piecemeal together existing [DELETE] {
del /F /Q $(>)
} }
if $(UNIX) { actions piecemeal together existing [DELETE] {
rm -f $(>)
} }
if $(VMS) { actions piecemeal together existing [DELETE] {
DELETE $(>[--2]:J=";*, ") $(>[-1]);*
} }
if $(NT) {
--chmod+w = "attrib -r " ;
}
if $(UNIX) {
--chmod+w = "chmod +w " ;
}
if $(VMS) {
--chmod+w = "SET FILE/PROT=(S:RWED) " ;
}
rule .mkdir
{
NOUPDATE $(<) ;
if $(<:P) { DEPENDS $(<) : $(<:P) ; .mkdir $(<:P) ; }
if ! $(md<$(<)>) { [MKDIR] $(<) ; md<$(<)> = - ; }
}
if $(NT) { actions [MKDIR] {
md $(<)
} }
if $(UNIX) { actions [MKDIR] {
mkdir $(<)
} }
if $(VMS) { actions [MKDIR] {
CREATE/DIR $(
Tried it -- see attached. "don't know how to make [.modules]order.c"
is because there is no order.c module in 1.31.0.
The real problem though is the one I've fixed in build_vms.com : on
VMS, you cannot compile sources in modules subdirectory unless you cd
into this subdirectory. This is because these sources include header
files from the parent directory using '#include "../native.h"'
directive. This is what I did in build_vms.com:
$ set def [.modules]
$ cc 'CC_FLAGS -
path.c, -
property-set.c, -
regex.c, -
sequence.c, -
set.c
$ set def [-]
btw, it would be the same if the sources used a VMS-style notation:
'#include "[-]native.h"'. In both cases, when compiled from *parent*
directory, the compiler would not find include file.
Attached snapshot. I'm not sure if ".o" instead of ".obj" is a real
problem, I think not.
A couple of comments:
Instead of /STANDARD=VAXC I suggest /WARN=NOINFO which would silence
all informational messages or /WARN=DISABLE=IMPLICITFUNC As far as I
can tell, the only compiler diagnostics for jam sources was
"%CC-I-IMPLICITFUNC the identifier ... is implicitly declared as a
function". You don't really need to place compiler in the VAXC mode
to compile modern sources :-) This is not a bug, of course.
A bug which you cannot see before the link phase is multiply defined
symbol for glob. On modern VMS systems, there is a glob function in
libc (CRTL in VMS terms). If you want to continue to use your own
implementation of glob (which, I think, is a good idea), you need to
specify /PREFIX_LIBRARY_ENTRIES=(ALL,EXCEPT=GLOB) instead of
/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES (there is no symbol preemption on
VMS). I stumble across this bug when linking bootstrap jam. It is
fixed in build_vms.com I sent you.
Boris
$ @build_vms
Cleaning previous boostrap files...
Removing previous boostrap directory...
Creating boostrap directory...
Building bootstrap jam...
Cleaning any previous build...
...found 1 target...
...updating 1 target...
...updated 1 target...
Building Boost.Jam...
don't know how to make [.modules]order.c
...found 83 targets...
...updating 39 targets...
...can't find 1 target...
...can't make 2 targets...
[COMPILE] [.bin_vms]command.o
[COMPILE] [.bin_vms]compile.o
[COMPILE] [.bin_vms]expand.o
[COMPILE] [.bin_vms]glob.o
[COMPILE] [.bin_vms]hash.o
[COMPILE] [.bin_vms]hcache.o
[COMPILE] [.bin_vms]headers.o
[COMPILE] [.bin_vms]hdrmacro.o
[COMPILE] [.bin_vms]jam.o
[COMPILE] [.bin_vms]jambase.o
[COMPILE] [.bin_vms]jamgram.o
[COMPILE] [.bin_vms]lists.o
[COMPILE] [.bin_vms]make.o
[COMPILE] [.bin_vms]make1.o
[COMPILE] [.bin_vms]newstr.o
[COMPILE] [.bin_vms]option.o
[COMPILE] [.bin_vms]parse.o
[COMPILE] [.bin_vms]regexp.o
[COMPILE] [.bin_vms]rules.o
[COMPILE] [.bin_vms]scan.o
[COMPILE] [.bin_vms]search.o
[COMPILE] [.bin_vms]subst.o
[COMPILE] [.bin_vms]timestamp.o
[COMPILE] [.bin_vms]variable.o
[COMPILE] [.bin_vms]modules.o
[COMPILE] [.bin_vms]strings.o
[COMPILE] [.bin_vms]filesys.o
[COMPILE] [.bin_vms]builtins.o
[COMPILE] [.bin_vms]pwd.o
[COMPILE] [.bin_vms]class.o
[COMPILE] [.bin_vms]native.o
[COMPILE] [.bin_vms]modules_set.o
#include "../native.h"
.^
%CC-F-NOINCLFILEF, Cannot find file "../native.h" specified in #include
directive.
at line number 2 in file
CXXL$:[BORIS.JAM.BOOST_1_31_0.TOOLS.BUILD.JAM_SRC.MODULES]SET.C;1
cc /OBJECT=[.bin_vms]modules_set.o
/DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,OPT_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_VA
RIABLES_EXT,OPT_IMPROVED_PATIENCE_EXT,VMS,YYSTACKSIZE=5000) /STANDARD=VAXC
/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES /OPTIMIZE /NODEBUG
[.modules]set.c
...failed [COMPILE] [.bin_vms]modules_set.o...
[COMPILE] [.bin_vms]modules_path.o
#include "../native.h"
.^
%CC-F-NOINCLFILEF, Cannot find file "../native.h" specified in #include
directive.
at line number 2 in file
CXXL$:[BORIS.JAM.BOOST_1_31_0.TOOLS.BUILD.JAM_SRC.MODULES]PATH.C;1
cc /OBJECT=[.bin_vms]modules_path.o
/DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,OPT_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_V
ARIABLES_EXT,OPT_IMPROVED_PATIENCE_EXT,VMS,YYSTACKSIZE=5000) /STANDARD=VAXC
/PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES /OPTIMIZE /NODEBUG
[.modules]path.c
...failed [COMPILE] [.bin_vms]modules_path.o...
[COMPILE] [.bin_vms]modules_regex.o
#include "../native.h"
.^
%CC-F-NOINCLFILEF, Cannot find file "../native.h" specified in #include
directive.
at line number 2 in file
CXXL$:[BORIS.JAM.BOOST_1_31_0.TOOLS.BUILD.JAM_SRC.MODULES]REGEX.C;1
cc /OBJECT=[.bin_vms]modules_regex.o
/DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,OPT_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARGET_
VARIABLES_EXT,OPT_IMPROVED_PATIENCE_EXT,VMS,YYSTACKSIZE=5000)
/STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES /OPTIMIZE /NODEBUG
[.modules]regex.c
...failed [COMPILE] [.bin_vms]modules_regex.o...
[COMPILE] [.bin_vms]modules_property-set.o
#include "../native.h"
.^
%CC-F-NOINCLFILEF, Cannot find file "../native.h" specified in #include
directive.
at line number 2 in file
CXXL$:[BORIS.JAM.BOOST_1_31_0.TOOLS.BUILD.JAM_SRC.MODULES]PROPERTY-SET.C;1
cc /OBJECT=[.bin_vms]modules_property-set.o
/DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,OPT_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_
TARGET_VARIABLES_EXT,OPT_IMPROVED_PATIENCE_EXT,VMS,YYSTACKSIZE=5000)
/STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES /OPTIMIZE /
NODEBUG [.modules]property-set.c
...failed [COMPILE] [.bin_vms]modules_property-set.o...
[COMPILE] [.bin_vms]modules_sequence.o
#include "../native.h"
.^
%CC-F-NOINCLFILEF, Cannot find file "../native.h" specified in #include
directive.
at line number 2 in file
CXXL$:[BORIS.JAM.BOOST_1_31_0.TOOLS.BUILD.JAM_SRC.MODULES]SEQUENCE.C;1
cc /OBJECT=[.bin_vms]modules_sequence.o
/DEFINES=(NDEBUG,OPT_HEADER_CACHE_EXT,OPT_GRAPH_DEBUG_EXT,OPT_SEMAPHORE,OPT_FIX_TARG
ET_VARIABLES_EXT,OPT_IMPROVED_PATIENCE_EXT,VMS,YYSTACKSIZE=5000)
/STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES /OPTIMIZE /NODE
BUG [.modules]sequence.c
...failed [COMPILE] [.bin_vms]modules_sequence.o...
...skipped modules_order.o for lack of [.modules]order.c...
[COMPILE] [.bin_vms]execvms.o
[COMPILE] [.bin_vms]filevms.o
[COMPILE] [.bin_vms]pathvms.o
...skipped bjam.exe for lack of modules_set.o...
...failed updating 5 targets...
...skipped 2 targets...
...updated 34 targets...
$
----- Original Message -----
From: "Rene Rivera"
Boris Gubenko wrote:
I just tried to build jam using build.jam you've attached to your mail message, and it failed -- see below. The things I noticed: [.foo.c] should have been []foo.c or just foo.c : on VMS, []foo.c is an equivalent of ./foo.c on Unix. Also, the C (and C++) compiler on VMS generates the .obj file vs. .o file on Unix. From the output below, it seems to me, that build.jam expects .o.
Yea, that's what I was trying to accomplish. But missed some conditions.
In this quick experiment, I was using jam sources from 1.31.0 distribution (which was the released version of boost in April, 2004). I can try it with the CVS HEAD if you think, that it can make a difference (I doubt it).
The 3.1.11 bjam sources might be better. But the errors where obvious enough.
don't know how to make [.command.c]
Oops, missed some changes. Attached is another try.
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
--------------------------------------------------------------------------------
#~ Copyright 2002-2005 Rene Rivera. #~ Distributed under the Boost Software License, Version 1.0. #~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# Platform related specifics. if $(NT) || $(OS2) { rule .path { if $(>) && $(<) { return "$(<:J=\\)\\$(>:J=)" ; } else if $(>) { return "$(>:J=)" ; } else { return "$(<:J=\\)" ; } } } else if $(VMS) { rule .path { if $(>) && $(<) { return "[.$(<:J=/)]$(>:J=)" ; } else if $(>) { return "$(>:J=)" ; } else { return "[.$(<:J=/)]" ; } } } else if $(MAC) { rule .path { if $(>) && $(<) { return ":$(<:J=\:)\:$(>:J=)" ; } else if $(>) { return "$(>:J=)" ; } else { return ":$(<:J=\:)" ; } } } else { rule .path { if $(>) && $(<) { return "$(<:J=/)/$(>:J=)" ; } else if $(>) { return "$(>:J=)" ; } else { return "$(<:J=/)" ; } } } if $(VMS) { . = "_" ; } else { . = "." ; } if $(VMS) { ~ = "" ; } else { ~ = "\"" ; }
# Info about what we are building. NAME = boost-jam ; VERSION = 3$(.)1$(.)11 ; RELEASE = 1 ; LICENSE = 1_0 ;
HAVE_PYTHON = 0 ; PYTHON_INCUDES = /usr/include/python2.3 ; PYTHON_LIB = -lpython2.3 ;
# Generate development debug binaries? if --debug in $(ARGV) { debug = true ; }
# Attempt to generate and/or build the grammar? if --grammar in $(ARGV) { grammar = true ; }
# Do we need to add a default build type argument? if ! ( --release in $(ARGV) ) && ! ( --debug in $(ARGV) ) { ARGV += --release ; }
# An explicit root for the toolset? (trim spaces) toolset-root = [ MATCH --toolset-root=(.*) : $(ARGV) ] ; { local t = [ MATCH "[ ]*(.*)" : $(toolset-root:J=" ") ] ; toolset-root = ; while $(t) { t = [ MATCH "([^ ]+)([ ]*)(.*)" : $(t) ] ; toolset-root += $(t[1]) ; if $(t[3]) { toolset-root += $(t[2]) ; } t = $(t[3]) ; } toolset-root = $(toolset-root:J="") ; }
# Configure the implemented toolsets. These are minimal # commands and options to compile the full Jam. When # adding new toolsets make sure to add them to the # "known" list also. rule toolset ( name command .type ? : opt.out + : opt.define * : flags * : linklibs * ) { .type ?= "" ; tool.$(name)$(.type).cc ?= $(command) ; tool.$(name)$(.type).opt.out ?= $(opt.out) ; tool.$(name)$(.type).opt.define ?= $(opt.define) ; tool.$(name)$(.type).flags ?= $(flags) ; tool.$(name)$(.type).linklibs ?= $(linklibs) ; if ! $(name) in $(toolsets) { toolsets += $(name) ; } } rule opt ( type : yes-opt * : no-opt * ) { if $(type) in $(ARGV) { return $(yes-opt) ; } else { return $(no-opt) ; } } ## HP-UX aCC compiler toolset acc cc : "-o " : -D : -Ae [ opt --release : -s -O3 ] [ opt --debug : -g -pg ] ; ## Borland C++ 5.5.x toolset borland bcc32 : -e -n : /D : -WC -w- -q "-I$(toolset-root)Include" "-L$(toolset-root)Lib" [ opt --release : -O2 -vi -w-inl ] [ opt --debug : -v -Od -vi- ] ; ## Generic Unix cc if ! $(CC) { CC = cc ; } toolset cc $(CC) : "-o " : -D : $(CFLAGS) [ opt --release : -s -O ] [ opt --debug : -g ] : $(LIBS) ; ## Comeau C/C++ 4.x toolset como como : "-o " : -D : --c [ opt --release : --inlining ] [ opt --debug : --no_inlining ] ; ## MacOSX Darwin, using GCC 2.9.x, 3.x toolset darwin cc : "-o " : -D : [ opt --release : -Wl,-x -O3 -finline-functions ] [ opt --debug : -g -O0 -fno-inline -pg ] ; ## GCC 2.x, 3.x toolset gcc gcc : "-o " : -D : -pedantic [ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ] [ opt --debug : -g -O0 -fno-inline ] ; ## GCC 2.x, 3.x on CYGWIN but without cygwin1.dll toolset gcc-nocygwin gcc : "-o " : -D : -s -O3 -mno-cygwin [ opt --release : -finline-functions ] [ opt --debug : -s -O3 -fno-inline -pg ] ; ## Intel C/C++ for Linux toolset intel-linux icc : "-o " : -D : [ opt --release : -Xlinker -s -O3 ] [ opt --debug : -g -O0 -p ] ; ## Intel C/C++ for Win32 toolset intel-win32 icl : /Fe : -D : /nologo [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ] [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] ; ## KCC ? toolset kcc KCC : "-o " : -D : [ opt --release : -s +K2 ] [ opt --debug : -g +K0 ] ; ## Borland Kylix toolset kylix bc++ : -o : -D : -tC -q [ opt --release : -O2 -vi -w-inl ] [ opt --debug : -v -Od -vi- ] ; ## Metrowerks CodeWarrior 8.x { # Even though CW can compile all files at once, it crashes if it tries in the bjam case. local mwcc = ; if $(NT) { mwcc = mwcc ; } else { mwcc = mwc$(OSPLAT:L) ; } mwcc ?= mwcc ; toolset metrowerks $(mwcc) : "-o " : -D : -c -lang c -subsystem console -cwd include [ opt --release : -runtime ss -opt full -inline all ] [ opt --debug : -runtime ssd -opt none -inline off ] ; toolset metrowerks $(mwcc) .link : "-o " : : -subsystem console -ladvapi32.lib [ opt --release : -runtime ss ] [ opt --debug : -runtime ssd ] ; } ## MINGW GCC toolset mingw gcc : "-o " : -D : [ opt --release : -s -O3 -finline-functions ] [ opt --debug : -g -O0 -fno-inline -pg ] ; ## MIPS Pro toolset mipspro cc : "-o " : -D : [ opt --release : -s -O3 -g0 -INLINE:none ] [ opt --debug : -g -O0 -INLINE ] ; ## Microsoft Visual Studio C++ 6.x toolset msvc cl : /Fe : -D : /nologo [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ] [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] : kernel32.lib advapi32.lib ; ## QNX 6.x GCC 3.x/2.95.3 toolset qcc qcc : "-o " : -D : -pedantic [ opt --release : [ opt --symbols : -g : -s ] -O3 -finline-functions ] [ opt --debug : -g -O0 -fno-inline ] ; ## Sun Workshop 6 C++ toolset sunpro cc : "-o " : -D : [ opt --release : -s -fast -xO4 ] [ opt --debug : -g ] ; ## Compaq Alpha CXX toolset tru64cxx cc : "-o " : -D : [ opt --release : -s -O5 -inline speed ] [ opt --debug : -g -O0 -pg ] ; ## IBM VisualAge C++ toolset vacpp xlc : "-o " : -D : [ opt --release : -s -O3 -qstrict -qinline ] [ opt --debug : -g -qNOOPTimize -qnoinline -pg ] ; ## Microsoft Visual C++ .NET 7.x toolset vc7 cl : /Fe : -D : /nologo [ opt --release : /ML /O2 /Ob2 /Gy /GF /GA /GB ] [ opt --debug : /MLd /DEBUG /Z7 /Od /Ob0 ] : kernel32.lib advapi32.lib ; ## VMS/OpenVMS DEC C toolset vmsdecc cc : /OBJECT= : "/DEFINES=(" "," ")" : /STANDARD=VAXC /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES [ opt --release : /OPTIMIZE /NODEBUG ] [ opt --debug : /NOOPTIMIZE /DEBUG ] ; toolset vmsdecc link .link : /EXECUTABLE= : : /NOMAP [ opt --release : /NODEBUG ] [ opt --debug : /DEBUG ] ;
# First set the build commands and options according to the # preset toolset. toolset = [ MATCH --toolset=(.*) : $(ARGV) ] ; if ! $(toolset) { # For some reason, the following test does not catch # empty toolset. ECHO "###" ; ECHO "###" No toolset specified. Please use --toolset option. ; ECHO "###" ; ECHO "###" Known toolsets are: $(toolsets:J=", ") ; EXIT "###" ; } if ! $(toolset) in $(toolsets) { ECHO "###" ; ECHO "###" Unknown toolset: $(toolset) ; ECHO "###" ; ECHO "###" Known toolsets are: $(toolsets:J=", ") ; EXIT "###" ; } --cc = $(tool.$(toolset).cc) ; if $(tool.$(toolset).opt.out[2]) { --bin = $(tool.$(toolset).opt.out[1]) ; --dir = $(tool.$(toolset).opt.out[2]) ; } else { --out = $(tool.$(toolset).opt.out) ; } --def = $(tool.$(toolset).opt.define) ; --flags = $(tool.$(toolset).flags) ; --defs = $(tool.$(toolset).defines) ; --libs = $(tool.$(toolset).linklibs) ; if $(tool.$(toolset).link.cc) { --link = $(tool.$(toolset).link.cc) ; if $(tool.$(toolset).link.opt.out[2]) { --link-bin = $(tool.$(toolset).link.opt.out[1]) ; --link-dir = $(tool.$(toolset).link.opt.out[2]) ; } else { --link-out = $(tool.$(toolset).link.opt.out) ; } --link-def = $(tool.$(toolset).link.opt.define) ; --link-flags = $(tool.$(toolset).link.flags) ; --link-defs = $(tool.$(toolset).link.defines) ; --link-libs = $(tool.$(toolset).link.linklibs) ; }
# Put executables in platform-specific subdirectory. locate-target = $(LOCATE_TARGET) ; if $(VMS) { locate-target ?= bin$(.)vms ; platform = vms ; } else if $(MAC) { locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ; platform = $(OS:L)$(OSPLAT:L) ; } else if $(OSPLAT) { locate-target ?= bin$(.)$(OS:L)$(OSPLAT:L) ; platform = $(OS:L)$(OSPLAT:L) ; } else { locate-target ?= bin$(.)$(OS:L) ; platform = $(OS:L) ; } if $(debug) { locate-target = [ .path $(locate-target)$(.)debug ] ; } else { locate-target = [ .path $(locate-target) ] ; }
if --show-locate-target in $(ARGV) { ECHO $(locate-target) ; }
# We have some different files for UNIX, VMS, and NT. jam.source = command.c compile.c expand.c glob.c hash.c hcache.c headers.c hdrmacro.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c parse.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c filesys.c builtins.c pwd.c class.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules/sequence.c modules/order.c ; if $(NT) { jam.source += execnt.c filent.c pathunix.c w32_getreg.c ; } else if $(OS2) { jam.source += execunix.c fileos2.c pathunix.c ; } else if $(VMS) { jam.source += execvms.c filevms.c pathvms.c ; } else if $(MAC) { jam.source += execmac.c filemac.c pathmac.c ; } else { jam.source += execunix.c fileunix.c pathunix.c ; }
# Debug assertions, or not. if ! $(debug) || --noassert in $(ARGV) { --defs += NDEBUG ; }
# Enable some optional features. --defs += OPT_HEADER_CACHE_EXT ; --defs += OPT_GRAPH_DEBUG_EXT ; --defs += OPT_SEMAPHORE ;
# Bug fixes --defs += OPT_FIX_TARGET_VARIABLES_EXT ; #~ --defs += OPT_NO_EXTERNAL_VARIABLE_SPLIT ;
# Improvements --defs += OPT_IMPROVED_PATIENCE_EXT ;
if ( $(OS) = NT || $(NT) ) && ! NT in $(--defs) { --defs += NT ; } if $(VMS) { --defs += VMS ; } --defs += YYSTACKSIZE=5000 ;
if $(HAVE_PYTHON) = 1 { --defs += HAVE_PYTHON ; --flags += -I$(PYTHON_INCUDES) ; --flags += -Wno-long-long ; --libs += $(PYTHON_LIB) ; }
# The basic symbolic targets... NOTFILE all clean dist ; ALWAYS clean ;
# Utility rules and actions... rule .clean { [DELETE] clean : $(<) ; } if $(NT) { actions piecemeal together existing [DELETE] { del /F /Q $(>) } } if $(UNIX) { actions piecemeal together existing [DELETE] { rm -f $(>) } } if $(VMS) { actions piecemeal together existing [DELETE] { DELETE $(>[--2]:J=";*, ") $(>[-1]);* } } if $(NT) { --chmod+w = "attrib -r " ; } if $(UNIX) { --chmod+w = "chmod +w " ; } if $(VMS) { --chmod+w = "SET FILE/PROT=(S:RWED) " ; }
rule .mkdir { NOUPDATE $(<) ; if $(<:P) { DEPENDS $(<) : $(<:P) ; .mkdir $(<:P) ; } if ! $(md<$(<)>) { [MKDIR] $(<) ; md<$(<)> = - ; } } if $(NT) { actions [MKDIR] { md $(<) } } if $(UNIX) { actions [MKDIR] { mkdir $(<) } } if $(VMS) { actions [MKDIR] { CREATE/DIR $(
rule .exe { local exe = $(<) ; if $(NT) || ( $(UNIX) && $(OS) = CYGWIN ) || $(VMS) { exe = $(exe:S=.exe) ; } LOCATE on $(exe) = $(locate-target) ; DEPENDS all : $(exe) ; .mkdir $(locate-target) ; if $(--link) { local objs = ; for local s in $(>) { # Translate any subdir elements into a simple file name. local parts = [ MATCH "([^/]+)[/]?(.*)" : $(s) ] ; if ! $(parts[-1]) { parts = $(parts[1--2]) ; } local obj = $(parts:J=_) ; obj = $(obj:S=.o) ; objs += $(obj) ; local src = [ .path $(parts[1--2]) : $(parts[-1]) ] ; LOCATE on $(obj) = $(locate-target) ; DEPENDS $(exe) : $(obj) ; DEPENDS $(obj) : $(src) ; DEPENDS $(obj) : $(locate-target) ; [COMPILE] $(obj) : $(src) ; .clean $(obj) ; } DEPENDS $(exe) : $(objs) ; DEPENDS $(exe) : $(locate-target) ; [COMPILE.LINK] $(exe) : $(objs) ; .clean $(exe) ; } else { DEPENDS $(exe) : $(>) ; DEPENDS $(exe) : $(locate-target) ; [COMPILE] $(exe) : $(>) ; .clean $(exe) ; } return $(exe) ; } if ! $(--def[2]) { actions [COMPILE] { $(~)$(--cc)$(~) $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def)$(--defs) $(--flags) "$(--libs)" $(>) } } else { actions [COMPILE] { $(~)$(--cc)$(~) $(--bin)$(<:D=) $(--dir)$(<:D) $(--out)$(<) $(--def[1])$(--defs:J=$(--def[2]))$(--def[3]) $(--flags) "$(--libs)" $(>) } } if $(VMS) { actions [COMPILE.LINK] { $(~)$(--link)$(~) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>J=", ") } } else { actions [COMPILE.LINK] { $(~)$(--link)$(~) $(--link-bin)$(<:D=) $(--link-dir)$(<:D) $(--link-out)$(<) $(--link-def)$(--link-defs) $(--link-flags) "$(--link-libs)" $(>) } }
rule .link { DEPENDS all : $(<) ; DEPENDS $(<) : $(>) ; [LINK] $(<) : $(>) ; .clean $(<) ; } if $(NT) { actions [LINK] { copy $(>) $(<) } } if $(UNIX) { actions [LINK] { ln -fs $(>) $(<) } } if $(VMS) { actions [LINK] { COPY/REPLACE $(>) $(<) } }
rule .move { DEPENDS $(<) : $(>) ; [MOVE] $(<) : $(>) ; } if $(NT) { actions [MOVE] { del /f $(<) rename $(>) $(<) } } if $(UNIX) { actions [MOVE] { mv -f $(>) $(<) } } if $(VMS) { actions [MOVE] { RENAME $(>) $(<) } }
# Generate the grammar tokens table, and the real yacc grammar. rule .yyacc { local exe = [ .exe yyacc : yyacc.c ] ; NOUPDATE $(exe) ; DEPENDS $(<) : $(exe) $(>) ; LEAVES $(<) ; yyacc.exe on $(<) = $(exe:R=$(locate-target)) ; [YYACC] $(<) : $(>) ; } actions [YYACC] { $(--chmod+w)$(<[1]) $(--chmod+w)$(<[2]) "$(yyacc.exe)" $(<) $(>) } if $(grammar) { .yyacc jamgram.y jamgramtab.h : jamgram.yy ; } else if $(debug) { .exe yyacc : yyacc.c ; }
# How to build the grammar. if $(NT) { SUFEXE = .exe ; # try some other likely spellings... PATH ?= $(Path) ; PATH ?= $(path) ; } SUFEXE ?= "" ;
yacc ?= [ GLOB $(PATH) : yacc$(SUFEXE) ] ; yacc ?= [ GLOB $(PATH) : bison$(SUFEXE) ] ; yacc ?= [ GLOB "$(ProgramFiles:J= )\\GnuWin32\\bin" "C:\\Program Files\\GnuWin32\\bin" : bison$(SUFEXE) ] ; yacc = $(yacc[1]) ; switch $(yacc:D=:S=) { case bison : yacc += -d --yacc ; case yacc : yacc += -d ; } if $(debug) && $(yacc) { yacc += -t -v ; } yacc += $(YACCFLAGS) ;
rule .yacc { DEPENDS $(<) : $(>) ; LEAVES $(<) ; [YACC] $(<) : $(>) ; } if $(NT) { actions [YACC] { "$(yacc)" $(>) if not errorlevel 1 ( del /f $(<[1]) rename y.tab$(<[1]:S) $(<[1]) del /f $(<[2]) rename y.tab$(<[2]:S) $(<[2]) ) else set _error_ = } } if $(UNIX) { actions [YACC] { if ` "$(yacc)" $(>) ` ; then mv -f y.tab$(<[1]:S) $(<[1]) mv -f y.tab$(<[2]:S) $(<[2]) else exit 1 fi } } if $(VMS) { actions [YACC] { IF "$(yacc)" $(>) THEN RENAME y_tab$(<[1]:S) $(<[1]) RENAME y_tab$(<[2]:S) $(<[2]) ENDIF } } if $(grammar) && ! $(yacc) { EXIT "Could not find the 'yacc' tool, and therefore can not build the grammar." ; } if $(grammar) && $(yacc) { .yacc jamgram.c jamgram.h : jamgram.y ; }
# How to build the compiled in jambase. rule .mkjambase { local exe = [ .exe mkjambase : mkjambase.c ] ; DEPENDS $(<) : $(exe) $(>) ; LEAVES $(<) ; mkjambase.exe on $(<) = $(exe:R=$(locate-target)) ; [MKJAMBASE] $(<) : $(>) ; } actions [MKJAMBASE] { $(--chmod+w)$(<) $(mkjambase.exe) $(<) $(>) } if $(debug) { .mkjambase jambase.c : Jambase ; }
# How to build Jam. rule .jam { $(>).exe = [ .exe $(>) : $(jam.source) ] ; DEPENDS all : $($(>).exe) ;
if $(debug) { $(<).exe = $(<:S=$($(>).exe:S)) ; LOCATE on $($(<).exe) = $(locate-target) ; .link $($(<).exe) : $($(>).exe) ; DEPENDS all : $($(<).exe) ; } } .jam jam : bjam ;
# Scan sources for header dependencies. # WARNING: Yes those are *REAL TABS* below. DO NOT CHANGE, # under any circumstances, to spaces!! And the tabs # indenting this are so that if someone is in the mood to # replace tabs they hit this comment, and hopefully notice # their error. rule .scan { HDRRULE on $(<:D=) = .hdr.scan ; HDRSCAN on $(<:D=) = "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ; } rule .hdr.scan { local hdrs = [ GLOB . : $(>:D=) ] ; INCLUDES $(<:D=) : $(hdrs:D=) ; HDRRULE on $(>:D=) = .hdr.scan ; HDRSCAN on $(>:D=) = "^[ ]*#[ ]*include[ ]*([<\"][^\">]*[\">]).*$" ; } .scan [ GLOB . : *.c ] ;
# Distribution making from here on out. dist.license = #~ [ GLOB . : LICENSE_$(LICENSE).txt ] [ GLOB [ .path .. .. .. ] : LICENSE_$(LICENSE).txt ] ; [ GLOB . : LICENSE_$(LICENSE).txt ] [ GLOB [ .path .. .. .. ] : LICENSE_$(LICENSE).txt ] [ GLOB [ .path .. boost ] : LICENSE_$(LICENSE).txt ] ; dist.docs = $(dist.license[1]) index.html Porting Jam.html ; dist.source = [ GLOB . : *.c *.h ] ; dist.source = $(dist.source:D=) $(dist.docs) build.jam build.bat build.sh build_vms.com Jambase jamgram.y jamgram.yy [ .path debian : changelog ] [ .path debian : control ] [ .path debian : copyright ] [ .path debian : jam.man.sgml ] [ .path debian : rules ] [ .path modules : set.c ] [ .path modules : path.c ] [ .path modules : regex.c ] [ .path modules : property-set.c ] [ .path modules : sequence.c ] [ .path modules : order.c ] boost-jam.spec ; dist.bin = bjam ; dist.bin = $(dist.license[1]) $(dist.bin:S=$(bjam.exe:S)) ;
if $(NT) { zip ?= [ GLOB "$(ProgramFiles:J= )\\7-ZIP" "C:\\Program Files\\7-ZIP" : "7z.exe" "7zn.exe" ] ; zip ?= [ GLOB $(PATH) : zip.exe ] ; zip ?= zip ; zip = $(zip[1]) ; switch $(zip:D=:S=) { case 7z* : zip += a -r -tzip -mx=9 ; case zip : zip += -9r ; } actions piecemeal [PACK] { "$(zip)" "$(<)" "$(>)" } actions piecemeal [ZIP] { "$(zip)" "$(<)" "$(>)" } actions piecemeal [COPY] { copy /Y "$(>)" "$(<)" >NUL: } } if $(UNIX) { actions [PACK] { tar zcf "$(<)" "$(>)" } actions [ZIP] { gzip -c9 "$(>)" > "$(<)" } actions [COPY] { cp -Rpf "$(>)" "$(<)" } }
# The single binary, compressed. rule .binary { local zip = ; if $(NT) { zip = $($(<).exe:S=.zip) ; } if $(UNIX) { zip = $($(<).exe:S=.tgz) ; } zip = $(zip:S=)-$(VERSION)-$(RELEASE)-$(platform)$(zip:S) ; DEPENDS $(zip) : $($(<).exe) ; DEPENDS dist : $(zip) ; #~ LOCATE on $(zip) = $(locate-target) ; if $(NT) { [ZIP] $(zip) : $($(<).exe) ; } if $(UNIX) { [PACK] $(zip) : $($(<).exe) ; } .clean $(zip) ; }
# Package some file. rule .package ( dst-dir : src-files + ) { local dst-files ; for local src-path in $(src-files) { local src-subdir = $(src-path:D) ; local src-file = $(src-path) ; while $(src-subdir:D) { src-subdir = $(src-subdir:D) ; } if $(src-subdir) = ".." { src-file = $(src-file:D=) ; } dst-files += $(src-file:R=$(dst-dir)) ; }
local pack = ; if $(NT) { pack = $(dst-dir).zip ; } if $(UNIX) { pack = $(dst-dir).tgz ; }
DEPENDS dist : $(pack) ; DEPENDS $(pack) : $(dst-files) ;
local dst-files-queue = $(dst-files) ; for local src-path in $(src-files) { local dst-file = $(dst-files-queue[1]) ; dst-files-queue = $(dst-files-queue[2-]) ; DEPENDS $(dst-file) : $(src-path) $(dst-file:D) ; .mkdir $(dst-file:D) ;
[COPY] $(dst-file) : $(src-path) ; .clean $(dst-file) ; }
[PACK] $(pack) : $(dst-files) ; .clean $(pack) ; }
# RPM distro file. rpm-tool = [ GLOB $(PATH) : "rpmbuild" "rpm" ] ; rule .rpm ( name : source ) { local rpm-arch = ; switch $(OSPLAT) { case X86 : rpm-arch ?= i386 ; case PPC : rpm-arch ?= ppc ; case AXP : rpm-arch ?= alpha ; # no guaranty for these: case IA64 : rpm-arch ?= ia64 ; case ARM : rpm-arch ?= arm ; case SPARC : rpm-arch ?= sparc ; case * : rpm-arch ?= other ; } local target = $(name)-rpm ; NOTFILE $(target) ; DEPENDS dist : $(target) ; DEPENDS $(target) : $(name).$(rpm-arch).rpm $(name).src.rpm ; DEPENDS $(name).$(rpm-arch).rpm : $(source) ; DEPENDS $(name).src.rpm : $(name).$(rpm-arch).rpm ; docs on $(target) = $(dist.docs:J=" ") ; arch on $(target) = $(rpm-arch) ; if $(rpm-arch) = ppc { target-opt on $(target) = --target= ; } else { target-opt on $(target) = "--target " ; } [RPM] $(target) : $(source) ; .clean $(name).$(rpm-arch).rpm $(name).src.rpm ; } actions [RPM] { export BOOST_JAM_TOOLSET="$(toolset)" $(rpm-tool[1]) -ta $(target-opt)$(arch) $(>) | tee rpm.out cp `grep -e '^Wrote:' rpm.out | sed 's/^Wrote: //'` . rm -f rpm.out }
# The distribution targets. Don't bother with the targets if # distribution build not requested. if dist in $(ARGV) { #~ .binary bjam ; .package $(NAME)-$(VERSION) : $(dist.source) ; .package $(NAME)-$(VERSION)-$(RELEASE)-$(platform) : $(dist.bin) ; if $(rpm-tool) { .rpm $(NAME)-$(VERSION)-$(RELEASE) : $(NAME)-$(VERSION).tgz ; } }
--------------------------------------------------------------------------------
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boris Gubenko wrote:
Tried it -- see attached. "don't know how to make [.modules]order.c" is because there is no order.c module in 1.31.0.
Makes sense.
The real problem though is the one I've fixed in build_vms.com : on VMS, you cannot compile sources in modules subdirectory unless you cd into this subdirectory. This is because these sources include header files from the parent directory using '#include "../native.h"' directive. This is what I did in build_vms.com:
$ set def [.modules] $ cc 'CC_FLAGS - path.c, - property-set.c, - regex.c, - sequence.c, - set.c $ set def [-]
btw, it would be the same if the sources used a VMS-style notation: '#include "[-]native.h"'. In both cases, when compiled from *parent* directory, the compiler would not find include file.
Many compilers support changing the way user includes (#include "") are handled. They let you specify if the paths should be interpreted relative to the source point or relative to the include path, for example. Does VMS have such an option? Does it understand relative include paths at all? Barring that those includes could be changed to plain '#include "native.h"' and adding the appropriate include path. What is the option for adding an include path? The other solution is to move the files themselves out of the modules dir, and that's a painful alternative.
A couple of comments:
Instead of /STANDARD=VAXC I suggest /WARN=NOINFO which would silence all informational messages or /WARN=DISABLE=IMPLICITFUNC As far as I can tell, the only compiler diagnostics for jam sources was "%CC-I-IMPLICITFUNC the identifier ... is implicitly declared as a function". You don't really need to place compiler in the VAXC mode to compile modern sources :-) This is not a bug, of course.
If I remember correctly, I would have to search the boost.build list archives to be sure, if it's not in the VAXC mode it would not just generate warnings but errors. Don't remember what or why though.
A bug which you cannot see before the link phase is multiply defined symbol for glob. On modern VMS systems, there is a glob function in libc (CRTL in VMS terms). If you want to continue to use your own implementation of glob (which, I think, is a good idea), you need to specify /PREFIX_LIBRARY_ENTRIES=(ALL,EXCEPT=GLOB) instead of /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES (there is no symbol preemption on VMS). I stumble across this bug when linking bootstrap jam. It is fixed in build_vms.com I sent you.
OK. Thanks. Hopefully Philip will post his version of the script so I can compare and merge. [...]
#~ Copyright 2002-2005 Rene Rivera.
[...] You really don't need to quote my entire message with the attachment ;-) -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
Rene Rivera wrote:
Many compilers support changing the way user includes (#include "") are handled. They let you specify if the paths should be interpreted relative to the source point or relative to the include path, for example. Does VMS have such an option? Does it understand relative include paths at all? Barring that those includes could be changed to plain '#include "native.h"' and adding the appropriate include path. What is the option for adding an include path? The other solution is to move the files themselves out of the modules dir, and that's a painful alternative.
The compilers on VMS understand relative include paths and there is an option telling the compiler how to interpret a relative path: /NESTED_INCLUDE_DIRECTORY=[INCLUDE_FILE,PRIMARY_FILE]. This is what I tried first, but, to my surprise, it did not work in this case. It may be a bug in the compiler, or it may be a "feature" :-). I've asked our include file processing expert to look into this. I also asked if there is some other compiler option we can apply in this case and I'm waiting for the reply (there are tons of include file processing options on VMS). However, if it turns out to be a compiler bug which will be fixed in some future release of the compiler, it makes sense to implement a solution which would work with the current released compilers. If changing directory is not an option (it was convenient enough to do in the .com script), changing includes to plain '#include "native.h"' (probably, under the '#ifdef __vms' condition) and adding include path pointing to current working directory (via /INCLUDE=[] switch) is an obvious workaround.
If I remember correctly, I would have to search the boost.build list archives to be sure, if it's not in the VAXC mode it would not just generate warnings but errors. Don't remember what or why though.
On VMS, there are informational messages, warnings and errors. What I'm talking about is disabling informational messages or just one particular informational message which was generated when compiling the sources in relaxed ANSI mode (the default). On VMS, warnings are bad because the compiler marks the .obj file as having compilation warnings and it has ramifications for linking and dlopen'ing. Although the warnings can be disabled, if the source generates warnings in relaxed ANSI mode, perhaps, the source should be fixed. But, again, all I saw in relaxed ANSI mode was: "the identifier ... is implicitly declared as a function".
OK. Thanks. Hopefully Philip will post his version of the script so I can compare and merge.
Sure.
You really don't need to quote my entire message with the attachment ;-)
I know. I realized that after I hit "send" :-)
Boris
----- Original Message -----
From: "Rene Rivera"
Boris Gubenko wrote:
Tried it -- see attached. "don't know how to make [.modules]order.c" is because there is no order.c module in 1.31.0.
Makes sense.
The real problem though is the one I've fixed in build_vms.com : on VMS, you cannot compile sources in modules subdirectory unless you cd into this subdirectory. This is because these sources include header files from the parent directory using '#include "../native.h"' directive. This is what I did in build_vms.com:
$ set def [.modules] $ cc 'CC_FLAGS - path.c, - property-set.c, - regex.c, - sequence.c, - set.c $ set def [-]
btw, it would be the same if the sources used a VMS-style notation: '#include "[-]native.h"'. In both cases, when compiled from *parent* directory, the compiler would not find include file.
Many compilers support changing the way user includes (#include "") are handled. They let you specify if the paths should be interpreted relative to the source point or relative to the include path, for example. Does VMS have such an option? Does it understand relative include paths at all? Barring that those includes could be changed to plain '#include "native.h"' and adding the appropriate include path. What is the option for adding an include path? The other solution is to move the files themselves out of the modules dir, and that's a painful alternative.
A couple of comments:
Instead of /STANDARD=VAXC I suggest /WARN=NOINFO which would silence all informational messages or /WARN=DISABLE=IMPLICITFUNC As far as I can tell, the only compiler diagnostics for jam sources was "%CC-I-IMPLICITFUNC the identifier ... is implicitly declared as a function". You don't really need to place compiler in the VAXC mode to compile modern sources :-) This is not a bug, of course.
If I remember correctly, I would have to search the boost.build list archives to be sure, if it's not in the VAXC mode it would not just generate warnings but errors. Don't remember what or why though.
A bug which you cannot see before the link phase is multiply defined symbol for glob. On modern VMS systems, there is a glob function in libc (CRTL in VMS terms). If you want to continue to use your own implementation of glob (which, I think, is a good idea), you need to specify /PREFIX_LIBRARY_ENTRIES=(ALL,EXCEPT=GLOB) instead of /PREFIX_LIBRARY_ENTRIES=ALL_ENTRIES (there is no symbol preemption on VMS). I stumble across this bug when linking bootstrap jam. It is fixed in build_vms.com I sent you.
OK. Thanks. Hopefully Philip will post his version of the script so I can compare and merge.
[...]
#~ Copyright 2002-2005 Rene Rivera.
[...]
You really don't need to quote my entire message with the attachment ;-)
-- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
Boris Gubenko wrote:
[...] I've asked our include file processing expert to look into this. I also asked if there is some other compiler option we can apply [...]
The trick here is to specify include directory in a Unix-style form pointing to the location of the source file. In this case, it would be: /INCLUDE="./modules" With this command line switch, the compiler is able to process a path relative to source file in '#include "../native.h"' directive. The quotas around "./modules" are necessary and cannot be omitted. Without quotas, the command line interpreted will interpret /modules as a separate command line switch instead of a value of the /INCLUDE switch. I modified build_vms.com script so that it defines cc command as having /INCLUDE switch above. I've attached modified script. It also fixes a bug in cleaning/restoring [.bootstrap_vms] directory which I overlooked in 2004 :-) With modified build_vms.com and build.jam sent in e-mail, I was able to build bootstrap jam which compiled all jam modules -- see below. I did not have to modify build.jam to specify /INCLUDE switch because, when executed from a script, the bootstrap jam "inherits" cc command defined by the script. Since I was using the 1.31.0 distribution which does not have the [.modules]order.c module, I did not get to the link phase. However, when I modified build.jam to remove order.c, I got the following error: $ MCR [.bootstrap_vms]jam0.exe -f x.jam --toolset=vmsdecc ...found 81 targets... ...updating 1 target... [COMPILE.LINK] [.bin_vms]bjam.exe %ILINK-F-OPENIN, error opening ") as input -RMS-F-SYN, file specification syntax error link /EXECUTABLE=[.bin_vms]bjam.exe /NOMAP /NODEBUG ") ...failed [COMPILE.LINK] [.bin_vms]bjam.exe... ...failed updating 1 target... $ It looks like build.jam still needs some work for VMS to eliminate ") in the link command. Boris $ @build_vms Removing previous boostrap directory... Creating boostrap directory... Building bootstrap jam... Cleaning any previous build... ...found 1 target... ...updating 1 target... ...updated 1 target... Building Boost.Jam... don't know how to make [.modules]order.c ...found 83 targets... ...updating 39 targets... ...can't find 1 target... ...can't make 2 targets... [COMPILE] [.bin_vms]command.o [COMPILE] [.bin_vms]compile.o [COMPILE] [.bin_vms]expand.o [COMPILE] [.bin_vms]glob.o [COMPILE] [.bin_vms]hash.o [COMPILE] [.bin_vms]hcache.o [COMPILE] [.bin_vms]headers.o [COMPILE] [.bin_vms]hdrmacro.o [COMPILE] [.bin_vms]jam.o [COMPILE] [.bin_vms]jambase.o [COMPILE] [.bin_vms]jamgram.o [COMPILE] [.bin_vms]lists.o [COMPILE] [.bin_vms]make.o [COMPILE] [.bin_vms]make1.o [COMPILE] [.bin_vms]newstr.o [COMPILE] [.bin_vms]option.o [COMPILE] [.bin_vms]parse.o [COMPILE] [.bin_vms]regexp.o [COMPILE] [.bin_vms]rules.o [COMPILE] [.bin_vms]scan.o [COMPILE] [.bin_vms]search.o [COMPILE] [.bin_vms]subst.o [COMPILE] [.bin_vms]timestamp.o [COMPILE] [.bin_vms]variable.o [COMPILE] [.bin_vms]modules.o [COMPILE] [.bin_vms]strings.o [COMPILE] [.bin_vms]filesys.o [COMPILE] [.bin_vms]builtins.o [COMPILE] [.bin_vms]pwd.o [COMPILE] [.bin_vms]class.o [COMPILE] [.bin_vms]native.o [COMPILE] [.bin_vms]modules_set.o [COMPILE] [.bin_vms]modules_path.o [COMPILE] [.bin_vms]modules_regex.o [COMPILE] [.bin_vms]modules_property-set.o [COMPILE] [.bin_vms]modules_sequence.o ...skipped modules_order.o for lack of [.modules]order.c... [COMPILE] [.bin_vms]execvms.o [COMPILE] [.bin_vms]filevms.o [COMPILE] [.bin_vms]pathvms.o ...skipped bjam.exe for lack of modules_order.o... ...skipped 2 targets... ...updated 39 targets... $ build_vms.com ------------- $ ! Copyright (C) Rene Rivera, Johan Nilsson, 2002-2003. $ ! $ ! 8-APR-2004 Boris Gubenko $ ! Miscellaneous improvements. $ ! $ ! Use, modification and distribution is subject to the $ ! Boost Software License, Version 1.0. (See accompanying file $ ! LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) $ ! $ ! bootstrap build script for Jam $ ! $ callerverify = 'f$verify(0) $ set = "set" $ set symbol /verb/scope=(nolocal,noglobal) $ on warning then continue $ say := write sys$output $ ! $ IF "" .NES. F$SEARCH("[.bootstrap_vms]*.*") $ THEN $ say "Cleaning previous boostrap files..." $ SET FILE/PROTECTION=(W:RWED) [.bootstrap_vms]*.*;* $ DELETE [.bootstrap_vms]*.*;* $ ENDIF $ ! $ IF "" .NES. F$SEARCH("bootstrap_vms.dir") $ THEN $ say "Removing previous boostrap directory..." $ SET FILE/PROT=(W:RWED) []bootstrap_vms.dir;1 $ DELETE []bootstrap_vms.dir;1 $ ENDIF $ ! $ say "Creating boostrap directory..." $ CREATE/DIR [.bootstrap_vms] $ ! $ say "Building bootstrap jam..." $ ! $ CC_FLAGS = "/DEFINE=VMS/WARN=NOINFO/PREFIX=(ALL,EXCEPT=GLOB)" + - "/OBJ=[.bootstrap_vms]/INCLUDE=""""./modules""""" $ cc := "cc''CC_FLAGS'" $ cc - builtins.c, - class.c, - command.c, - compile.c, - execvms.c, - expand.c, - filesys.c, - filevms.c, - glob.c, - hash.c, - hdrmacro.c, - headers.c, - jam.c, - jambase.c, - jamgram.c, - lists.c, - make.c, - make1.c, - modules.c, - native.c, - newstr.c, - option.c, - parse.c, - pathvms.c, - pwd.c, - regexp.c, - rules.c, - scan.c, - search.c, - strings.c, - subst.c, - timestamp.c, - variable.c, - [.modules]path.c, - [.modules]property-set.c, - [.modules]regex.c, - [.modules]sequence.c, - [.modules]set.c $ ! $ libr/create [.bootstrap_vms]libjam0.olb [.bootstrap_vms]*.obj $ link/exec=[.bootstrap_vms]jam0.exe - [.bootstrap_vms]libjam0.olb/include=jam/lib $ ! $ say "Cleaning any previous build..." $ ! $ MCR [.bootstrap_vms]jam0.exe -f build.jam --toolset=vmsdecc clean $ ! $ say "Building Boost.Jam..." $ ! $ MCR [.bootstrap_vms]jam0.exe -f build.jam --toolset=vmsdecc $ ! $ unused = f$verify(callerverify) $ exit
Thanks, Rene. The latest buld.jam was pretty close. But not quite there yet. The problem with #include <../native.h> I worked around by specifying an additional include directory that points to ../ . But the real problem is, as Boris pointed out, that the VMS compiler assumes the directory for includes is relative to the current working directory, not relative to the source file directory. So if you want to compile files with #include <../native.h> and where native.h is in the parent directory, then you need to cd into the subdirectory before compiling. That means you would also do cc (filename) instead of cc [.modules](filename). There is also a problem that build.jam seems to assume that object files are named .o, and on VMS they are named .obj. Also, the Link step fails, with: [COMPILE.LINK] [.bin_vms]bjam.exe %ILINK-F-OPENIN, error opening ") as input -RMS-F-SYN, file specification syntax error link /EXECUTABLE=[.bin_vms]bjam.exe /NOMAP /NODEBUG ") It seems that the link statement doesn't specify an input object module name. That name should be the name that contains the main(). I was able to do the link by hand, so I have a bjam.exe. But I suspect that won't do me much good, as what I need is the changes you made to the build.jam also made to a number of other .jam files, right? Thanks very much for the help so far. P
Philip,
The problem with #include <../native.h> I worked around by specifying an additional include directory that points to ../ . But the real problem is, as Boris pointed out, that the VMS compiler assumes the directory for includes is relative to the current working directory, not relative to the source file directory. So if you want to compile files with #include <../native.h> and where native.h is in the parent directory, then you need to cd into the subdirectory before compiling. That means you would also do cc (filename) instead of cc [.modules](filename).
/INCLUDE="./modules" switch eliminates the need to cd into the [.modules] subdirectory before compiling. build_vms.com script I sent yesterday is using this technique. Thanks, Boris
Thanks for the help.
/INCLUDE="./modules" switch eliminates the need to cd into the [.modules] subdirectory before compiling. build_vms.com script I sent yesterday is using this technique.
Thanks, Boris
After you built jam, were you able to build the entire boost library using jam? P
Philip A. Naecker wrote:
After you built jam, were you able to build the entire boost library using jam?
I did not try. As you pointed out in your previous mail, VMS-specific changes should be done not only to build.jam, but to other jam files as well. Until this is done, there is no point in even trying to use jam on VMS, I believe. In 2004, I was trying to build and test boost on VMS (this task is currently not on my list, but it can reappear at some point). Instead of using jam, I was converting jam files to DCL scripts. As far as I remember, most of the times it was pretty straightforward. The easiest part was header-only libraries, of course, but even a library with a run-time binary component like date_time library was easy enough. I was running boost tests for a number of libraries and the results were on par with what you get on a supported platform. All this was under DCL. There is no reason VMS cannot be a supported platform for boost. Recently, Tru64 was certified as supported platform. AlphaVMS has the same C++ compiler and std. library that Tru64. VMS/IA64 has better std. library and the compiler which is as least as good as that on AlphaVMS. VMS C++ compilers are using the EDG front end and the C++ std. library is Rogue Wave library (v2.0 on AlphaVMS and v3.0 on VMS/IA64). The main problem on VMS is tools, like jam. And a toolset for VMS, of course. If you are interested in more details like compilation options or environmental settings I was using, please, let me know. If you are interested in porting automated boost regression test environment to VMS, please, let me know. We can arrange a machine for you and provide all necessary assistance. Thanks, Boris
Boris Gubenko wrote:
Philip A. Naecker wrote:
After you built jam, were you able to build the entire boost library using jam?
I did not try. As you pointed out in your previous mail, VMS-specific changes should be done not only to build.jam, but to other jam files as well. Until this is done, there is no point in even trying to use jam on VMS, I believe.
AFAIK most of the building of Boost should work at this point. But that's only as far as the build system is concerned. Yes there are going to be some minor exceptions to that but theoretically we wrote the build system so that most of the platform work is done by bjam itself. But then since VMS hasn't been attempted in some time it might be a rocky start.
The main problem on VMS is tools, like jam. And a toolset for VMS, of course.
Yea, that would be the main problem. Someone needs to write a Boost.Build toolset for VMS. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim - Grafik/jabber.org
participants (3)
-
Boris Gubenko
-
Philip A. Naecker
-
Rene Rivera