diff options
-rw-r--r-- | bootstrap-mingw.bat | 2 | ||||
-rw-r--r-- | bootstrap-msvc.bat | 2 | ||||
-rw-r--r-- | bootstrap.gmake | 2 | ||||
-rwxr-xr-x | bootstrap.sh | 2 | ||||
-rw-r--r-- | build2/utility.hxx | 13 | ||||
-rw-r--r-- | build2/version.hxx.in | 5 |
6 files changed, 20 insertions, 6 deletions
diff --git a/bootstrap-mingw.bat b/bootstrap-mingw.bat index 7884569..fbec68a 100644 --- a/bootstrap-mingw.bat +++ b/bootstrap-mingw.bat @@ -96,7 +96,7 @@ rem rem Note that echo does not override errorlevel. rem echo on -%cxx% -I%libbutl% -I. -DBUILD2_HOST_TRIPLET=\"i686-w64-mingw32\" %ops% -o build2\b-boot.exe %src% -limagehlp +%cxx% -I%libbutl% -I. -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"i686-w64-mingw32\" %ops% -o build2\b-boot.exe %src% -limagehlp @echo off if errorlevel 1 goto error diff --git a/bootstrap-msvc.bat b/bootstrap-msvc.bat index 3964d6a..a83bb5b 100644 --- a/bootstrap-msvc.bat +++ b/bootstrap-msvc.bat @@ -40,7 +40,7 @@ goto :eof rem Note that echo does not override errorlevel. rem echo on - %cxx% /I%owd%\%libbutl% /I%owd% /DBUILD2_HOST_TRIPLET=\"i686-microsoft-win32-msvc\" %ops% /c /TP %* + %cxx% /I%owd%\%libbutl% /I%owd% /DBUILD2_BOOTSTRAP /DBUILD2_HOST_TRIPLET=\"i686-microsoft-win32-msvc\" %ops% /c /TP %* @echo off if errorlevel 1 goto error goto :eof diff --git a/bootstrap.gmake b/bootstrap.gmake index 650607e..0b2c43f 100644 --- a/bootstrap.gmake +++ b/bootstrap.gmake @@ -145,7 +145,7 @@ $(out_root)/build2/b-boot: $(build2_obj) $(libbutl_obj) $(CXX) -std=c++1y $(CXXFLAGS) $(LDFLAGS) -o $@ $^ -lpthread $(LIBS) $(out_root)/build2/%.b.o: $(src_root)/build2/%.cxx | $$(dir $$@). - $(CXX) -I$(libbutl) -I$(src_root) -DBUILD2_HOST_TRIPLET=\"$(chost)\" $(CPPFLAGS) -std=c++1y $(CXXFLAGS) -o $@ -c $< + $(CXX) -I$(libbutl) -I$(src_root) -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"$(chost)\" $(CPPFLAGS) -std=c++1y $(CXXFLAGS) -o $@ -c $< $(libbutl_out)/%.b.o: $(libbutl)/libbutl/%.cxx | $$(dir $$@). $(CXX) -I$(libbutl) $(CPPFLAGS) -std=c++1y $(CXXFLAGS) -o $@ -c $< diff --git a/bootstrap.sh b/bootstrap.sh index e21e598..49b0494 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -135,4 +135,4 @@ src="$src $libbutl/libbutl/*.cxx" # mode since 4.9 doesn't recognize c++1z. # set -x -"$cxx" "-I$libbutl" -I. '-DBUILD2_HOST_TRIPLET="'"$host"'"' -std=c++1y "$@" -o build2/b-boot $src -lpthread +"$cxx" "-I$libbutl" -I. -DBUILD2_BOOTSTRAP '-DBUILD2_HOST_TRIPLET="'"$host"'"' -std=c++1y "$@" -o build2/b-boot $src -lpthread diff --git a/build2/utility.hxx b/build2/utility.hxx index b057add..57d5f71 100644 --- a/build2/utility.hxx +++ b/build2/utility.hxx @@ -23,7 +23,18 @@ #include <build2/types.hxx> #include <build2/b-options.hxx> -#include <build2/version.hxx> + +// "Fake" version values used during bootstrap. +// +#ifdef BUILD2_BOOTSTRAP +# define BUILD2_VERSION 9999999990000ULL +# define BUILD2_VERSION_STR "999.999.999" +# define BUILD2_VERSION_ID "999.999.999" +# define LIBBUTL_VERSION_STR "999.999.999" +# define LIBBUTL_VERSION_ID "999.999.999" +#else +# include <build2/version.hxx> +#endif namespace build2 { diff --git a/build2/version.hxx.in b/build2/version.hxx.in index c05a207..927a971 100644 --- a/build2/version.hxx.in +++ b/build2/version.hxx.in @@ -23,7 +23,10 @@ // 2.2.0-a.1 0020019990010 // 3.0.0-b.2 0029999995020 // 2.2.0-a.1.z 0020019990011 -// + +// NOTE: remember to also update "fake" bootstrap values in utility.hxx if +// changing anything here. + #define BUILD2_VERSION $build2.version.project_number$ULL #define BUILD2_VERSION_STR "$build2.version.project$" #define BUILD2_VERSION_ID "$build2.version.project_id$" |