aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2025-02-17 10:55:59 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2025-02-17 10:55:59 +0200
commit2821b00295d871a9e285728c1fb2ad0d55130296 (patch)
tree5e4444c734af53c98a7f6d67f3317c1eaf8fed45
parentb4eb01f725d60734cbe069aa8bfcd32779845cdc (diff)
Rename build2/ to b/ in preparation for adding other executables
-rw-r--r--INSTALL.cli34
-rw-r--r--b/.gitignore (renamed from build2/.gitignore)3
-rw-r--r--b/b.cxx (renamed from build2/b.cxx)2
-rw-r--r--b/buildfile (renamed from build2/buildfile)2
-rw-r--r--bootstrap-clang.bat6
-rw-r--r--bootstrap-mingw.bat6
-rw-r--r--bootstrap-msvc.bat6
-rw-r--r--bootstrap.gmake18
-rwxr-xr-xbootstrap.sh6
-rw-r--r--build/export.build4
10 files changed, 42 insertions, 45 deletions
diff --git a/INSTALL.cli b/INSTALL.cli
index 9d20757..8b48714 100644
--- a/INSTALL.cli
+++ b/INSTALL.cli
@@ -53,7 +53,7 @@ First, we build a minimal build system using \c{bootstrap.sh} (run
$ cd build2-X.Y.Z
$ ./bootstrap.sh g++
-$ build2/b-boot --version
+$ b/b-boot --version
\
Alternatively, we can use the \c{bootstrap.gmake} makefile:
@@ -62,7 +62,7 @@ Alternatively, we can use the \c{bootstrap.gmake} makefile:
$ cd build2-X.Y.Z
$ make -f bootstrap.gmake -j 8 CXX=g++
-$ build2/b-boot --version
+$ b/b-boot --version
\
If you would prefer to bootstrap out of source tree, this is supported by the
@@ -72,7 +72,7 @@ makefile (but not the script):
$ mkdir build2-boot
$ make -C build2-boot -f ../build2-X.Y.Z/bootstrap.gmake -j 8 CXX=g++
-$ build2-boot/build2/b-boot --version
+$ build2-boot/b/b-boot --version
\
|
@@ -83,19 +83,19 @@ Then, we rebuild the build system with the result of Phase 1 linking
libraries statically.
\
-$ build2/b-boot config.cxx=g++ config.bin.lib=static build2/exe{b}
-$ mv build2/b build2/b-boot
+$ b/b-boot config.cxx=g++ config.bin.lib=static b/exe{b}
+$ mv b/b b/b-boot
-$ build2/b-boot --version
+$ b/b-boot --version
\
Or, alternatively, for an out of source build:
\
-$ build2-boot/build2/b-boot config.cxx=g++ config.bin.lib=static \
- build2-X.Y.Z/build2/@build2-static/build2/exe{b}
+$ build2-boot/b/b-boot config.cxx=g++ config.bin.lib=static \
+ build2-X.Y.Z/b/@build2-static/b/exe{b}
-$ build2-static/build2/b --version
+$ build2-static/b/b --version
\
|
@@ -106,7 +106,7 @@ Finally, we configure, build, and optionally install the \"final\" version
using shared libraries:
\
-$ build2/b-boot configure \
+$ b/b-boot configure \
config.config.hermetic=true \
config.cxx=g++ \
config.cc.coptions=-O3 \
@@ -114,7 +114,7 @@ $ build2/b-boot configure \
config.install.root=/usr/local \
config.install.sudo=sudo
-$ build2/b-boot
+$ b/b-boot
\
\N|The \c{config.config.hermetic=true} configuration variable in the first
@@ -129,7 +129,7 @@ building tests by specifying the \c{update-for-install} operation in the last
command:
\
-$ build2/b-boot update-for-install
+$ b/b-boot update-for-install
\
On the other hand, if I you are not planning to install the result, then you
@@ -138,7 +138,7 @@ can omit the \c{config.install.*} values as well as \c{.rpath}.
To install:
\
-$ build2/b-boot install
+$ b/b-boot install
$ which b
$ b --version
\
@@ -153,7 +153,7 @@ $ which b
Or, alternatively, for an out of source build:
\
-$ build2-static/build2/b configure: build2-X.Y.Z/@build2-shared/ \
+$ build2-static/b/b configure: build2-X.Y.Z/@build2-shared/ \
config.config.hermetic=true \
config.cxx=g++ \
config.cc.coptions=-O3 \
@@ -161,9 +161,9 @@ $ build2-static/build2/b configure: build2-X.Y.Z/@build2-shared/ \
config.install.root=/usr/local \
config.install.sudo=sudo
-$ build2-static/build2/b update-for-install: build2-shared/
+$ build2-static/b/b update-for-install: build2-shared/
-$ build2-static/build2/b install: build2-shared/
+$ build2-static/b/b install: build2-shared/
$ b uninstall: build2-shared/
\
@@ -175,7 +175,7 @@ system directory (for example, \c{/usr}) but to copy the files somewhere else
configuration variable, for example:
\
-$ build2-static/build2/b configure: build2-X.Y.Z/@build2-shared/ \
+$ build2-static/b/b configure: build2-X.Y.Z/@build2-shared/ \
config.config.hermetic=true \
config.cxx=g++ \
config.cc.coptions=-O3 \
diff --git a/build2/.gitignore b/b/.gitignore
index 83bbed4..f22e91d 100644
--- a/build2/.gitignore
+++ b/b/.gitignore
@@ -1,9 +1,6 @@
b
b-boot
-#*-options
-#*-options.?xx
-
# Unit test executables and Testscript output directories
# (can be symlinks).
#
diff --git a/build2/b.cxx b/b/b.cxx
index f357722..56b2623 100644
--- a/build2/b.cxx
+++ b/b/b.cxx
@@ -1,4 +1,4 @@
-// file : build2/b.cxx -*- C++ -*-
+// file : b/b.cxx -*- C++ -*-
// license : MIT; see accompanying LICENSE file
#include <sstream>
diff --git a/build2/buildfile b/b/buildfile
index 0111ed2..25b62f3 100644
--- a/build2/buildfile
+++ b/b/buildfile
@@ -1,4 +1,4 @@
-# file : build2/buildfile
+# file : b/buildfile
# license : MIT; see accompanying LICENSE file
# NOTE: imports should go into root.build.
diff --git a/bootstrap-clang.bat b/bootstrap-clang.bat
index 5a06a70..a7cd040 100644
--- a/bootstrap-clang.bat
+++ b/bootstrap-clang.bat
@@ -12,7 +12,7 @@ echo Usage: %0 [/?] ^<cxx^> [^<cxx-option^>...]
echo.
echo The batch file expects to find the libbutl\ or libbutl-*\ directory
echo either in the current directory ^(build2 root^) or one level up. The
-echo result is saved as build2\b-boot.exe.
+echo result is saved as b\b-boot.exe.
echo.
echo Example usage:
echo.
@@ -59,7 +59,7 @@ if "_%libbutl%_" == "__" (
rem All the source directories.
rem
-set "src=build2"
+set "src=b"
set "src=%src% libbuild2"
set "src=%src% libbuild2\script"
@@ -112,7 +112,7 @@ for %%d in (%src%) do (
)
echo on
-%cxx% -I%libbutl% -I. -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"x86_64-microsoft-win32-msvc\" %ops% -o build2\b-boot.exe %r% -lshell32 -limagehlp
+%cxx% -I%libbutl% -I. -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"x86_64-microsoft-win32-msvc\" %ops% -o b\b-boot.exe %r% -lshell32 -limagehlp
@echo off
if errorlevel 1 goto error
diff --git a/bootstrap-mingw.bat b/bootstrap-mingw.bat
index 5638659..cb36377 100644
--- a/bootstrap-mingw.bat
+++ b/bootstrap-mingw.bat
@@ -12,7 +12,7 @@ echo Usage: %0 [/?] ^<cxx^> [^<cxx-option^>...]
echo.
echo The batch file expects to find the libbutl\ or libbutl-*\ directory
echo either in the current directory ^(build2 root^) or one level up. The
-echo result is saved as build2\b-boot.exe.
+echo result is saved as b\b-boot.exe.
echo.
echo Example usage:
echo.
@@ -59,7 +59,7 @@ if "_%libbutl%_" == "__" (
rem All the source directories.
rem
-set "src=build2"
+set "src=b"
set "src=%src% libbuild2"
set "src=%src% libbuild2\script"
@@ -107,7 +107,7 @@ for %%d in (%src%) do (
)
echo on
-%cxx% -I%libbutl% -I. -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"x86_64-w64-mingw32\" %ops% -o build2\b-boot.exe %r% -pthread -limagehlp
+%cxx% -I%libbutl% -I. -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"x86_64-w64-mingw32\" %ops% -o b\b-boot.exe %r% -pthread -limagehlp
@echo off
if errorlevel 1 goto error
diff --git a/bootstrap-msvc.bat b/bootstrap-msvc.bat
index 6a6fcbc..7fb23ea 100644
--- a/bootstrap-msvc.bat
+++ b/bootstrap-msvc.bat
@@ -17,7 +17,7 @@ echo ^(INCLUDE, LIB^) are set.
echo.
echo The batch file expects to find the libbutl\ or libbutl-*\ directory
echo either in the current directory ^(build2 root^) or one level up. The
-echo result is saved as build2\b-boot.exe.
+echo result is saved as b\b-boot.exe.
echo.
echo Example usage:
echo.
@@ -90,7 +90,7 @@ if "_%libbutl%_" == "__" (
rem All the source directories.
rem
-set "src=build2"
+set "src=b"
set "src=%src% libbuild2"
set "src=%src% libbuild2\script"
@@ -152,7 +152,7 @@ for %%d in (%src%) do (
rem Link.
rem
-call :link /Fe: build2\b-boot.exe %obj% shell32.lib imagehlp.lib
+call :link /Fe: b\b-boot.exe %obj% shell32.lib imagehlp.lib
if errorlevel 1 goto error
rem Clean up.
diff --git a/bootstrap.gmake b/bootstrap.gmake
index a2c9779..50d5341 100644
--- a/bootstrap.gmake
+++ b/bootstrap.gmake
@@ -10,7 +10,7 @@
# Similar to the script, the makefile expects to find the libbutl/ or
# libbutl-*/ directory either in the current directory (build2 root) or one
# level up. Both in-tree and out-of-tree builds as well as the 'clean' target
-# are supported. The result is saved as build2/b-boot.
+# are supported. The result is saved as b/b-boot.
#
# Typical in-tree build:
#
@@ -166,30 +166,30 @@ cxx \
version \
in
-build2_src := $(wildcard $(src_root)/build2/*.cxx)
+b_src := $(wildcard $(src_root)/b/*.cxx)
libbuild2_src := $(wildcard $(src_root)/libbuild2/*.cxx)
libbuild2_src += $(foreach d,$(libbuild2_sub),$(wildcard $(src_root)/libbuild2/$d/*.cxx))
libbutl_src := $(wildcard $(libbutl)/libbutl/*.cxx)
# Filter out *.test.cxx sources.
#
-build2_src := $(filter-out %.test.cxx,$(build2_src))
+b_src := $(filter-out %.test.cxx,$(b_src))
libbuild2_src := $(filter-out %.test.cxx,$(libbuild2_src))
libbutl_src := $(filter-out %.test.cxx,$(libbutl_src))
# Note that we use the .b.o object file extension to avoid clashing with the
# build2 builds.
#
-build2_obj := $(patsubst $(src_root)/%.cxx,$(out_root)/%.b.o,$(build2_src))
+b_obj := $(patsubst $(src_root)/%.cxx,$(out_root)/%.b.o,$(b_src))
libbuild2_obj := $(patsubst $(src_root)/%.cxx,$(out_root)/%.b.o,$(libbuild2_src))
libbutl_obj := $(patsubst $(libbutl)/libbutl/%.cxx,$(libbutl_out)/%.b.o,$(libbutl_src))
# Build.
#
-$(out_root)/build2/b-boot$(exe): $(build2_obj) $(libbuild2_obj) $(libbutl_obj)
+$(out_root)/b/b-boot$(exe): $(b_obj) $(libbuild2_obj) $(libbutl_obj)
$(CXX) -std=c++1y $(CXXFLAGS) $(LDFLAGS) -o $@ $^ $(LIBS)
-$(out_root)/build2/%.b.o: $(src_root)/build2/%.cxx | $$(dir $$@).
+$(out_root)/b/%.b.o: $(src_root)/b/%.cxx | $$(dir $$@).
$(CXX) -I$(libbutl) -I$(src_root) -DBUILD2_BOOTSTRAP -DBUILD2_HOST_TRIPLET=\"$(chost)\" $(CPPFLAGS) -finput-charset=UTF-8 -std=c++1y $(CXXFLAGS) -o $@ -c $<
$(out_root)/libbuild2/%.b.o: $(src_root)/libbuild2/%.cxx | $$(dir $$@).
@@ -203,19 +203,19 @@ $(libbutl_out)/%.b.o: $(libbutl)/libbutl/%.cxx | $$(dir $$@).
mkdir -p $*
.PHONY: all
-all: $(out_root)/build2/b-boot$(exe)
+all: $(out_root)/b/b-boot$(exe)
# Clean.
#
.PHONY: clean cleano
cleano:
- rm -f $(build2_obj)
+ rm -f $(b_obj)
rm -f $(libbuild2_obj)
rm -f $(libbutl_obj)
clean: cleano
- rm -f $(out_root)/build2/b-boot$(exe)
+ rm -f $(out_root)/b/b-boot$(exe)
ifeq ($(in_tree),false)
rm -fd $(out_root)/build2 $(foreach d,$(libbuild2_sub),$(out_root)/libbuild2/$d) $(out_root)/libbuild2 $(libbutl_out)
endif
diff --git a/bootstrap.sh b/bootstrap.sh
index 26796f9..8d17844 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -22,7 +22,7 @@ while test $# -ne 0; do
diag
diag "The script expects to find the libbutl/ or libbutl-*/ directory either"
diag "in the current directory (build2 root) or one level up. The result is"
- diag "saved as build2/b-boot."
+ diag "saved as b/b-boot."
diag
diag "Example usage:"
diag
@@ -115,7 +115,7 @@ if test -z "$libbutl"; then
exit 1
fi
-src="build2/*.cxx"
+src="b/*.cxx"
src="$src libbuild2/*.cxx"
src="$src libbuild2/script/*.cxx"
@@ -147,4 +147,4 @@ done
# mode since 4.9 doesn't recognize c++1z.
#
set -x
-"$cxx" "-I$libbutl" -I. -DBUILD2_BOOTSTRAP '-DBUILD2_HOST_TRIPLET="'"$host"'"' -finput-charset=UTF-8 -std=c++1y "$@" -o build2/b-boot $r -pthread
+"$cxx" "-I$libbutl" -I. -DBUILD2_BOOTSTRAP '-DBUILD2_HOST_TRIPLET="'"$host"'"' -finput-charset=UTF-8 -std=c++1y "$@" -o b/b-boot $r -pthread
diff --git a/build/export.build b/build/export.build
index 76c61b7..23cfe4b 100644
--- a/build/export.build
+++ b/build/export.build
@@ -5,10 +5,10 @@ if ($import.target == exe{b})
{
$out_root/
{
- include build2/
+ include b/
}
- export $out_root/build2/exe{b}
+ export $out_root/b/exe{b}
}
else
{