Răsfoiți Sursa

Rename configure to bootstrap.sh.

Also, make it generate project-config.jam, so mere "./bjam" does
the right thing.


[SVN r52177]
Vladimir Prus 17 ani în urmă
părinte
comite
e2e1c42f17
1 a modificat fișierele cu 63 adăugiri și 41 ștergeri
  1. 63 41
      bootstrap.sh

+ 63 - 41
configure → bootstrap.sh

@@ -133,7 +133,7 @@ done
 
 if test "x$want_help" = xyes; then
   cat <<EOF
-\`configure' configures Boost to adapt to a few kinds of systems.
+\`./bootstrap.sh' prepares Boost for building on a few kinds of systems.
 
 Usage: $0 [OPTION]... 
 
@@ -220,6 +220,7 @@ if test "x$BJAM" = x; then
   arch=`cd $my_dir/tools/jam/src && ./bootstrap/jam0 -d0 -f build.jam --toolset=$TOOLSET --toolset-root= --show-locate-target && cd ..`
   BJAM="$my_dir/tools/jam/src/$arch/bjam"
   echo "tools/jam/src/$arch/bjam"
+  cp $BJAM .
 fi
 
 # TBD: Turn BJAM into an absolute path
@@ -244,15 +245,15 @@ fi
 
 # Setup paths
 if test "x$EPREFIX" = x; then
-  EPREFIX="\$(prefix)"
+  EPREFIX="$PREFIX"
 fi
 
 if test "x$LIBDIR" = x; then
-  LIBDIR="\$(exec_prefix)/lib"
+  LIBDIR="$EXPREFIX/lib"
 fi
 
 if test "x$INCLUDEDIR" = x; then
-  INCLUDEDIR="\$(prefix)/include"
+  INCLUDEDIR="$PREFIX/include"
 fi
 
 # Find Python
@@ -302,67 +303,88 @@ else
   echo "disabled."
 fi
 
-# Backup the user's existing user-config.jam
-JAM_CONFIG_OUT="user-config.jam"
-if test -r "user-config.jam"; then
+# Backup the user's existing project-config.jam
+JAM_CONFIG_OUT="project-config.jam"
+if test -r "project-config.jam"; then
   counter=1
  
-  while test -r "user-config.jam.$counter"; do
+  while test -r "project-config.jam.$counter"; do
     counter=`expr $counter + 1`
   done
 
-  echo "Backing up existing Boost.Build configuration in user-config.jam.$counter"
-  mv "user-config.jam" "user-config.jam.$counter"
+  echo "Backing up existing Boost.Build configuration in project-config.jam.$counter"
+  mv "project-config.jam" "project-config.jam.$counter"
 fi
 
 # Generate user-config.jam
-echo "Generating Boost.Build configuration in user-config.jam..."
-cat > user-config.jam <<EOF
+echo "Generating Boost.Build configuration in project-config.jam..."
+cat > project-config.jam <<EOF
 # Boost.Build Configuration
-# Automatically generated by Boost configure 
+# Automatically generated by bootstrap.sh
 
-# Compiler configuration
-using $TOOLSET ; 
+import option ;
+import feature ;
+
+# Compiler configuration. This definition will be used unless
+# you already have defined some toolsets in your user-config.jam
+# file.
+if ! $TOOLSET in [ feature.values <toolset> ]
+{
+    using $TOOLSET ; 
+}
+
+project : default-build <toolset>$TOOLSET ;
 EOF
 
 #  - Python configuration
 if test "x$flag_no_python" = x; then
-  cat >> user-config.jam <<EOF
+  cat >> project-config.jam <<EOF
 
 # Python configuration
 using python : $PYTHON_VERSION : $PYTHON_ROOT ;
 EOF
 fi
 
-# Generate the Makefile
-echo "Generating Makefile..."
-cat > Makefile <<EOF
-BJAM=$BJAM
-BJAM_CONFIG=$BJAM_CONFIG
-prefix=$PREFIX
-exec_prefix=$EPREFIX
-libdir=$LIBDIR
-includedir=$INCLUDEDIR
-LIBS=$LIBS
+if test "x$ICU_ROOT" != x; then
+  cat >> project-config.jam << EOF
 
-all: .dummy
-	@echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS)"
-	@\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam \$(LIBS) || \\
-	echo "Not all Boost libraries built properly."
+path-constant ICU_PATH : $ICU_ROOT ;
+
+EOF
+fi
 
-clean: .dummy
-	rm -rf bin.v2
+cat >> project-config.jam << EOF
 
-distclean: clean
-	rm -rf Makefile config.log
+# List of --with-<library> and --without-<library>
+# options. If left empty, all libraries will be built.
+# Options specified on the command line completely
+# override this variable.
+libraries = $LIBS ;
 
-check: .dummy
-	@cd status && ../\$(BJAM) \$(BJAM_CONFIG) --user-config=../user-config.jam || echo "Some Boost regression tests failed. This is normal for many compilers."
+# These settings are equivivalent to corresponding command-line
+# options.
+option.set prefix : $PREFIX ;
+option.set exec-prefix : $EPREFIX ;
+option.set libdir : $LIBDIR ;
+option.set includedir : $INCLUDEDIR ;
+EOF
 
-install: .dummy
-	@echo "\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam --prefix=\$(prefix) --exec-prefix=\$(exec_prefix) --libdir=\$(libdir) --includedir=\$(includedir) \$(LIBS) install"
-	@\$(BJAM) \$(BJAM_CONFIG) --user-config=user-config.jam --prefix=\$(prefix) --exec-prefix=\$(exec_prefix) --libdir=\$(libdir) --includedir=\$(includedir) \$(LIBS) install || echo "Not all Boost libraries built properly."
+cat << EOF
 
-.dummy:
+Bootstrapping is done. To build, run:
 
-EOF
+    ./bjam
+    
+To adjust configuration, edit 'project-config.jam'.
+Further information:
+
+   - Command line help:
+     ./bjam --help
+     
+   - Getting started guide: 
+     http://www.boost.org/doc/libs/1_38_0/more/getting_started/unix-variants.html
+     
+   - Boost.Build documentation:
+     http://www.boost.org/boost-build2/doc/html/index.html
+
+EOF

粤ICP备19079148号