2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 01:12:13 +00:00

build.bat - Change --incremental to --update.

build.sh - implement --update option.


[SVN r26591]
This commit is contained in:
Rene Rivera
2004-12-28 06:09:25 +00:00
parent 4f8c4dbbb0
commit 600978f0a3
4 changed files with 94 additions and 70 deletions

View File

@@ -1,6 +1,6 @@
@ECHO OFF
REM ~ Copyright 2002-2003 Rene Rivera.
REM ~ Copyright 2002-2004 Rene Rivera.
REM ~ Distributed under the Boost Software License, Version 1.0.
REM ~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
@@ -321,28 +321,28 @@ set BJAM_SOURCES=%BJAM_SOURCES% strings.c filesys.c builtins.c pwd.c class.c w32
set BJAM_SOURCES=%BJAM_SOURCES% modules/set.c modules/path.c modules/regex.c
set BJAM_SOURCES=%BJAM_SOURCES% modules/property-set.c modules/sequence.c modules/order.c
set BJAM_INCREMENTAL=
if "_%1" == "_--incremental" (
set BJAM_INCREMENTAL=incremental
set BJAM_UPDATE=
if "_%1" == "_--update" (
set BJAM_UPDATE=update
)
if "_%2" == "_--incremental" (
set BJAM_INCREMENTAL=incremental
if "_%2" == "_--update" (
set BJAM_UPDATE=update
)
if "_%3" == "_--incremental" (
set BJAM_INCREMENTAL=incremental
if "_%3" == "_--update" (
set BJAM_UPDATE=update
)
if "_%4" == "_--incremental" (
set BJAM_INCREMENTAL=incremental
if "_%4" == "_--update" (
set BJAM_UPDATE=update
)
if "_%BJAM_INCREMENTAL%_" == "_incremental_" (
if "_%BJAM_UPDATE%_" == "_update_" (
if not exist ".\bootstrap\jam0.exe" (
set BJAM_INCREMENTAL=
set BJAM_UPDATE=
)
)
@echo ON
@if "_%BJAM_INCREMENTAL%_" == "_incremental_" goto Skip_Bootstrap
@if "_%BJAM_UPDATE%_" == "_update_" goto Skip_Bootstrap
rd /S /Q bootstrap
md bootstrap
@if not exist jamgram.y goto Bootstrap_GrammarPrep
@@ -379,7 +379,7 @@ rename y.tab.h jamgram.h
%BOOST_JAM_CC% %BOOST_JAM_OPT_JAM% %BJAM_SOURCES%
:Skip_Bootstrap
@if not exist ".\bootstrap\jam0.exe" goto Skip_Jam
@if "_%BJAM_INCREMENTAL%_" == "_incremental_" goto Skip_Clean
@if "_%BJAM_UPDATE%_" == "_update_" goto Skip_Clean
.\bootstrap\jam0 -f build.jam --toolset=%BOOST_JAM_TOOLSET% "--toolset-root=%BOOST_JAM_TOOLSET_ROOT% " clean
:Skip_Clean
.\bootstrap\jam0 -f build.jam --toolset=%BOOST_JAM_TOOLSET% "--toolset-root=%BOOST_JAM_TOOLSET_ROOT% " %1 %2 %3 %4 %5 %6 %7 %8 %9

View File

@@ -1,6 +1,6 @@
#!/bin/sh
#~ Copyright 2002-2003 Rene Rivera.
#~ Copyright 2002-2004 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)
@@ -196,30 +196,42 @@ BJAM_SOURCES="\
modules/path.c modules/regex.c modules/property-set.c\
modules/sequence.c modules/order.c"
echo_run rm -rf bootstrap
echo_run mkdir bootstrap
if test ! -r jamgram.y -o ! -r jamgramtab.h ; then
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_YYACC} ${YYACC_SOURCES}
if test -x "./bootstrap/yyacc0" ; then
echo_run ./bootstrap/yyacc0 jamgram.y jamgramtab.h jamgram.yy
fi
BJAM_UPDATE=
if test "$1" = "--update" -o "$2" = "--update" -o "$3" = "--update" -o "$4" = "--update" ; then
BJAM_UPDATE="update"
fi
if test ! -r jamgram.c -o ! -r jamgram.h ; then
if test_path yacc ; then YACC="yacc -d"
elif test_path bison ; then YACC="bison -y -d --yacc"
fi
echo_run $YACC jamgram.y
mv -f y.tab.c jamgram.c
mv -f y.tab.h jamgram.h
if test "${BJAM_UPDATE}" = "update" -a ! -x "./bootstrap/jam0" ; then
BJAM_UPDATE=
fi
if test ! -r jambase.c ; then
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_MKJAMBASE} ${MKJAMBASE_SOURCES}
if test -x "./bootstrap/mkjambase0" ; then
echo_run ./bootstrap/mkjambase0 jambase.c Jambase
if test "${BJAM_UPDATE}" != "update" ; then
echo_run rm -rf bootstrap
echo_run mkdir bootstrap
if test ! -r jamgram.y -o ! -r jamgramtab.h ; then
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_YYACC} ${YYACC_SOURCES}
if test -x "./bootstrap/yyacc0" ; then
echo_run ./bootstrap/yyacc0 jamgram.y jamgramtab.h jamgram.yy
fi
fi
if test ! -r jamgram.c -o ! -r jamgram.h ; then
if test_path yacc ; then YACC="yacc -d"
elif test_path bison ; then YACC="bison -y -d --yacc"
fi
echo_run $YACC jamgram.y
mv -f y.tab.c jamgram.c
mv -f y.tab.h jamgram.h
fi
if test ! -r jambase.c ; then
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_MKJAMBASE} ${MKJAMBASE_SOURCES}
if test -x "./bootstrap/mkjambase0" ; then
echo_run ./bootstrap/mkjambase0 jambase.c Jambase
fi
fi
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES}
fi
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES}
if test -x "./bootstrap/jam0" ; then
echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean
if test "${BJAM_UPDATE}" != "update" ; then
echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean
fi
echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
fi

View File

@@ -1,6 +1,6 @@
@ECHO OFF
REM ~ Copyright 2002-2003 Rene Rivera.
REM ~ Copyright 2002-2004 Rene Rivera.
REM ~ Distributed under the Boost Software License, Version 1.0.
REM ~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
@@ -321,28 +321,28 @@ set BJAM_SOURCES=%BJAM_SOURCES% strings.c filesys.c builtins.c pwd.c class.c w32
set BJAM_SOURCES=%BJAM_SOURCES% modules/set.c modules/path.c modules/regex.c
set BJAM_SOURCES=%BJAM_SOURCES% modules/property-set.c modules/sequence.c modules/order.c
set BJAM_INCREMENTAL=
if "_%1" == "_--incremental" (
set BJAM_INCREMENTAL=incremental
set BJAM_UPDATE=
if "_%1" == "_--update" (
set BJAM_UPDATE=update
)
if "_%2" == "_--incremental" (
set BJAM_INCREMENTAL=incremental
if "_%2" == "_--update" (
set BJAM_UPDATE=update
)
if "_%3" == "_--incremental" (
set BJAM_INCREMENTAL=incremental
if "_%3" == "_--update" (
set BJAM_UPDATE=update
)
if "_%4" == "_--incremental" (
set BJAM_INCREMENTAL=incremental
if "_%4" == "_--update" (
set BJAM_UPDATE=update
)
if "_%BJAM_INCREMENTAL%_" == "_incremental_" (
if "_%BJAM_UPDATE%_" == "_update_" (
if not exist ".\bootstrap\jam0.exe" (
set BJAM_INCREMENTAL=
set BJAM_UPDATE=
)
)
@echo ON
@if "_%BJAM_INCREMENTAL%_" == "_incremental_" goto Skip_Bootstrap
@if "_%BJAM_UPDATE%_" == "_update_" goto Skip_Bootstrap
rd /S /Q bootstrap
md bootstrap
@if not exist jamgram.y goto Bootstrap_GrammarPrep
@@ -379,7 +379,7 @@ rename y.tab.h jamgram.h
%BOOST_JAM_CC% %BOOST_JAM_OPT_JAM% %BJAM_SOURCES%
:Skip_Bootstrap
@if not exist ".\bootstrap\jam0.exe" goto Skip_Jam
@if "_%BJAM_INCREMENTAL%_" == "_incremental_" goto Skip_Clean
@if "_%BJAM_UPDATE%_" == "_update_" goto Skip_Clean
.\bootstrap\jam0 -f build.jam --toolset=%BOOST_JAM_TOOLSET% "--toolset-root=%BOOST_JAM_TOOLSET_ROOT% " clean
:Skip_Clean
.\bootstrap\jam0 -f build.jam --toolset=%BOOST_JAM_TOOLSET% "--toolset-root=%BOOST_JAM_TOOLSET_ROOT% " %1 %2 %3 %4 %5 %6 %7 %8 %9

View File

@@ -1,6 +1,6 @@
#!/bin/sh
#~ Copyright 2002-2003 Rene Rivera.
#~ Copyright 2002-2004 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)
@@ -196,30 +196,42 @@ BJAM_SOURCES="\
modules/path.c modules/regex.c modules/property-set.c\
modules/sequence.c modules/order.c"
echo_run rm -rf bootstrap
echo_run mkdir bootstrap
if test ! -r jamgram.y -o ! -r jamgramtab.h ; then
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_YYACC} ${YYACC_SOURCES}
if test -x "./bootstrap/yyacc0" ; then
echo_run ./bootstrap/yyacc0 jamgram.y jamgramtab.h jamgram.yy
fi
BJAM_UPDATE=
if test "$1" = "--update" -o "$2" = "--update" -o "$3" = "--update" -o "$4" = "--update" ; then
BJAM_UPDATE="update"
fi
if test ! -r jamgram.c -o ! -r jamgram.h ; then
if test_path yacc ; then YACC="yacc -d"
elif test_path bison ; then YACC="bison -y -d --yacc"
fi
echo_run $YACC jamgram.y
mv -f y.tab.c jamgram.c
mv -f y.tab.h jamgram.h
if test "${BJAM_UPDATE}" = "update" -a ! -x "./bootstrap/jam0" ; then
BJAM_UPDATE=
fi
if test ! -r jambase.c ; then
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_MKJAMBASE} ${MKJAMBASE_SOURCES}
if test -x "./bootstrap/mkjambase0" ; then
echo_run ./bootstrap/mkjambase0 jambase.c Jambase
if test "${BJAM_UPDATE}" != "update" ; then
echo_run rm -rf bootstrap
echo_run mkdir bootstrap
if test ! -r jamgram.y -o ! -r jamgramtab.h ; then
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_YYACC} ${YYACC_SOURCES}
if test -x "./bootstrap/yyacc0" ; then
echo_run ./bootstrap/yyacc0 jamgram.y jamgramtab.h jamgram.yy
fi
fi
if test ! -r jamgram.c -o ! -r jamgram.h ; then
if test_path yacc ; then YACC="yacc -d"
elif test_path bison ; then YACC="bison -y -d --yacc"
fi
echo_run $YACC jamgram.y
mv -f y.tab.c jamgram.c
mv -f y.tab.h jamgram.h
fi
if test ! -r jambase.c ; then
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_MKJAMBASE} ${MKJAMBASE_SOURCES}
if test -x "./bootstrap/mkjambase0" ; then
echo_run ./bootstrap/mkjambase0 jambase.c Jambase
fi
fi
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES}
fi
echo_run ${BOOST_JAM_CC} ${BOOST_JAM_OPT_JAM} ${BJAM_SOURCES}
if test -x "./bootstrap/jam0" ; then
echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean
if test "${BJAM_UPDATE}" != "update" ; then
echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" clean
fi
echo_run ./bootstrap/jam0 -f build.jam --toolset=$BOOST_JAM_TOOLSET "--toolset-root=$BOOST_JAM_TOOLSET_ROOT" "$@"
fi