etc: Allow a build dir to be specified in gen-astencode, for out of tree builds

This commit is contained in:
Patrick Walton 2012-03-08 10:32:36 -08:00
parent bdec806848
commit c09e339133

View File

@ -19,8 +19,13 @@ GEN_TYPES="syntax::ast::item syntax::ast::def middle::typeck::method_origin \
middle::freevars::freevar_entry syntax::ast::def_id
syntax::ast::inlined_item"
BUILD_DIR=$1
if test $BUILD_DIR == ""; then
BUILD_DIR="."
fi
# Find serializer tool:
for S in */stage1/bin/serializer; do
for S in $BUILD_DIR/*/stage1/bin/serializer; do
echo "Generating src/rustc/metadata/astencode_gen.rs"