diff options
author | Damien Martin-Guillerez <dmarting@google.com> | 2015-03-04 14:35:39 +0000 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2015-03-05 18:23:57 +0000 |
commit | 07d744b2a6309de0ea921eabc716c303c0d4075b (patch) | |
tree | b201cf35d890cb51c5654148277fec344582a395 | |
parent | 9ec9d543177dcf4cbda22ae6cedac597f30d0d06 (diff) |
Fixed the compile.sh path for JavaBuilder's source
The introduction of the JavaCompiler paths into the JavaBuilder tool made the bootstrap compilation by compile.sh fails.
--
MOS_MIGRATED_REVID=87705554
-rwxr-xr-x | compile.sh | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/compile.sh b/compile.sh index 2b46d50784..2fcb525dd9 100755 --- a/compile.sh +++ b/compile.sh @@ -47,7 +47,7 @@ LIBRARY_JARS=$(find third_party -name *.jar | tr "\n" " ") DIRS=$(echo src/{main/java,tools/xcode-common/java/com/google/devtools/build/xcode/{common,util}} output/src) SINGLEJAR_DIRS="src/java_tools/singlejar/java src/main/java/com/google/devtools/build/lib/shell" SINGLEJAR_LIBRARIES="third_party/guava/guava-18.0.jar third_party/jsr305/jsr-305.jar" -BUILDJAR_DIRS=$(echo src/java_tools/buildjar/java output/src/com/google/devtools/build/lib/view/proto) +BUILDJAR_DIRS="src/java_tools/buildjar/java/com/google/devtools/build/buildjar output/src/com/google/devtools/build/lib/view/proto" BUILDJAR_LIBRARIES="third_party/guava/guava-18.0.jar third_party/protobuf/protobuf-2.5.0.jar third_party/jsr305/jsr-305.jar" MSYS_DLLS="" @@ -69,9 +69,12 @@ rm -f base_workspace/tools && ln -s $(pwd)/tools base_workspace/tools rm -f base_workspace/third_party && ln -s $(pwd)/third_party base_workspace/third_party mkdir -p fromhost -cat << EOF > fromhost/BUILD +# Do not overwrite fromhost/BUILD with a dummy if it already exists. +if [ ! -f fromhost/BUILD ]; then + cat << EOF > fromhost/BUILD package(default_visibility = ["//visibility:public"]) EOF +fi case "${PLATFORM}" in linux) @@ -93,11 +96,10 @@ EOF ;; darwin) - rm -f fromhost/*.[ah] - touch fromhost/empty.c - homebrew_header=$(ls -1 $(brew --prefix 2>/dev/null)/Cellar/libarchive/*/include/archive.h 2>/dev/null | head -n1) if [[ -e $homebrew_header ]]; then + rm -f fromhost/*.[ah] + touch fromhost/empty.c # For use with Homebrew. archive_dir=$(dirname $(dirname $homebrew_header)) ARCHIVE_CFLAGS="-I${archive_dir}/include" @@ -116,6 +118,8 @@ EOF elif [[ -e /opt/local/include/archive.h ]]; then # For use with Macports. + rm -f fromhost/*.[ah] + touch fromhost/empty.c cp /opt/local/include/archive.h /opt/local/include/archive_entry.h fromhost/ cp /opt/local/lib/{libarchive,liblzo2,liblzma,libcharset,libbz2,libxml2,libz,libiconv}.a \ fromhost/ |