00001 * 00002 /*! 00003 * @file /home/dlydick/harmony/bootJVM/common.sh 00004 * 00005 * @brief Common code for @link ./build.sh build.sh@endlink and 00006 * @link ./clean.sh clean.sh@endlink and 00007 * @link ./dist-src.sh dist-src.sh@endlink and 00008 * @link ./dist-bin.sh dist-bin.sh@endlink and 00009 * @link ./dist-doc.sh dist-doc.sh@endlink. 00010 * 00011 * This script is common to @link ./build.sh build.sh@endlink and 00012 * @link ./clean.sh clean.sh@endlink and is not designed to do 00013 * anything on its own. 00014 * 00015 * All source code compiled according to selections from 00016 * @link ./config.sh config.sh@endlink. This may or may not include 00017 * any or all of: 00018 * 00019 * <ul> 00020 * <li>@b jvm: The main JVM development area. All source code 00021 * is found here. Building this area will compile 00022 * source code and link it into a binary form in 00023 * @b jvm/bin/bootjvm </li> 00024 * 00025 * <li>@b libjvm: JVM code as a static library. Compile the source 00026 * code from @b jvm/src (less 00027 * @link jvm/src/main.c main.c@endlink) and 00028 * archive it into @b libjvm/lib/libjvm.a </li> 00029 * 00030 * <li>@b main: Sample @link main/src/main.c main()@endlink 00031 * program. This program is currently not a unique 00032 * program, but is a symbolic link to 00033 * @link jvm/src/main.c jvm/src/main.c@endlink. 00034 * This may change as necessary. Compile @b main() 00035 * that contains an invokation of the main JVM entry 00036 * point @link jvm/src/jvm.c jvm()@endlink and 00037 * link to @b libjvm/lib/libjvm.a .</li> 00038 * 00039 * <li>@b jni: Sample JNI subset, showing how to reference 00040 * the local native methods, but using the full 00041 * JNI mechanism. Compile code that meets JNI 00042 * naming and prototype conventions that would 00043 * normally be stored in a shared object @b .so 00044 * or @b .dll file. (Here it will be statically linked 00045 * into a regular binary.) Then statically link this 00046 * code to @b libjvm/lib/libjvm.a .</li> 00047 * 00048 * <li>@b test: Java test programs for exercising various parts 00049 * of the JVM</li> 00050 * 00051 * <li>@b dox: Documentation of source code in @b jvm directory 00052 * </ul> 00053 * 00054 * Each of these directories contains a @b build.sh script. In addition 00055 * to these, an Eclipse project file is available in each for use with 00056 * the Eclipse C/C++ plugin, so this entire directory tree may be 00057 * imported wholesale into an Eclipse workspace and used without 00058 * changes. (Eclipse 3.0.2 generated these files.) Notice that 00059 * the Eclipse setup does not build the documentation set. This must 00060 * be done manually with the top-level 'build.sh dox'. 00061 * 00062 * @attention For Eclipse uses, be aware that the configuration 00063 * options stored by @link config.sh config.sh@endlink into 00064 * <b><code>config/config_*.gcc*</code></b> are @e not directly 00065 * available to Eclipse and @e must be manually entered there 00066 * after they are established by @link ./config.sh config.sh@endlink. 00067 * They should be entered in the project build parameters for 00068 * C/C++ in the miscellaneous parameters section. For example, 00069 * @b -m32 and @b -m64 . For a command line GCC invocation, 00070 * the following is a convenient way to incorporate the options: 00071 * 00072 * @verbatim 00073 * 00074 * $ gcc `cat ../config/config_opts_always.gcc` \ 00075 * `cat ../config/config_opts_usually.gcc` -c filename.c ... 00076 * 00077 * @endverbatim 00078 * 00079 * Notice that this script may be run instead of or as well as an 00080 * Eclipse build. There is only a slight difference as to 00081 * where the compiled object files are stored, but the binaries 00082 * and library archives are stored in the same place for both 00083 * methods. 00084 * 00085 * 00086 * @see @link ./build.sh ./build.sh@endlink 00087 * 00088 * @see @link ./clean.sh ./clean.sh@endlink 00089 * 00090 * @see @link jvm/build.sh jvm/build.sh@endlink 00091 * 00092 * @see @link libjvm/build.sh libjvm/build.sh@endlink 00093 * 00094 * @see @link main/build.sh main/build.sh@endlink 00095 * 00096 * @see @link test/build.sh test/build.sh@endlink 00097 * 00098 * @see @link jni/src/harmony/generic/0.0/build.sh 00099 * jni/src/harmony/generic/0.0/build.sh@endlink 00100 * 00101 * @see @link jvm/clean.sh jvm/clean.sh@endlink 00102 * 00103 * @see @link libjvm/clean.sh libjvm/clean.sh@endlink 00104 * 00105 * @see @link main/clean.sh main/clean.sh@endlink 00106 * 00107 * @see @link test/clean.sh test/clean.sh@endlink 00108 * 00109 * @see @link jni/src/harmony/generic/0.0/clean.sh 00110 * jni/src/harmony/generic/0.0/clean.sh@endlink 00111 * 00112 * @see @link jvm/common.sh jvm/common.sh@endlink 00113 * 00114 * @see @link libjvm/common.sh libjvm/common.sh@endlink 00115 * 00116 * @see @link main/common.sh main/common.sh@endlink 00117 * 00118 * @see @link test/common.sh test/common.sh@endlink 00119 * 00120 * @see @link jni/src/harmony/generic/0.0/common.sh 00121 * jni/src/harmony/generic/0.0/common.sh@endlink 00122 * 00123 * 00124 * @todo A Windows .BAT version of this script needs to be written 00125 * 00126 * 00127 * @section Control 00128 * 00129 * \$URL: https://svn.apache.org/path/name/build.sh $ \$Id: build.sh 0 09/28/2005 dlydick $ 00130 * 00131 * Copyright 2005 The Apache Software Foundation 00132 * or its licensors, as applicable. 00133 * 00134 * Licensed under the Apache License, Version 2.0 ("the License"); 00135 * you may not use this file except in compliance with the License. 00136 * You may obtain a copy of the License at 00137 * 00138 * http://www.apache.org/licenses/LICENSE-2.0 00139 * 00140 * Unless required by applicable law or agreed to in writing, 00141 * software distributed under the License is distributed on an 00142 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 00143 * either express or implied. 00144 * 00145 * See the License for the specific language governing permissions 00146 * and limitations under the License. 00147 * 00148 * @version \$LastChangedRevision: 0 $ 00149 * 00150 * @date \$LastChangedDate: 09/28/2005 $ 00151 * 00152 * @author \$LastChangedBy: dlydick $ 00153 * Original code contributed by Daniel Lydick on 09/28/2005. 00154 * 00155 * @section Reference 00156 * 00157 */ /* 00158 * (Use #! and #/ with dox_filter.sh to fool Doxygen into 00159 * parsing this non-source text file for the documentation set. 00160 * Use the above open comment to force termination of parsing 00161 * since it is not a Doxygen-style 'C' comment.) 00162 * 00163 * 00164 *################################################################## 00165 * 00166 * Script setup 00167 * 00168 * `dirname $0` for shells without that utility 00169 * `basename $0` for shells without that utility 00170 *################################################################## 00171 * 00172 * Check compilation options 00173 * 00174 *################################################################## 00175 * 00176 * Build binary from source code 00177 * 00178 * All scripts except distribution scripts use this logic: 00179 *################################################################## 00180 * 00181 * Preparation for 'dist-src.sh' and 'dist-bin.sh' and 'dist-doc.sh' 00182 * 00183 * Strip out _all_ output, rebuild documentation in _all_ formats, 00184 * archive it, and then delete it. Package the result in final 00185 * 'tar' file. 00186 * 00187 * Names of documentation tar file and source distribution tar file 00188 * Can't add release level unless 'config.sh' can locate release level: 00189 *PREFMTDOCSTAR="bootJVM-docs-$CONFIG_RELEASE_LEVEL.tar" 00190 * Transient storage for keeping existing old configuration 00191 *################################################################## 00192 * 00193 * EOF 00194