-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmake-stdlib
More file actions
executable file
·33 lines (26 loc) · 872 Bytes
/
make-stdlib
File metadata and controls
executable file
·33 lines (26 loc) · 872 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/usr/bin/env bash
# Build the Silver standard libraries.
# Note that this does not rebuild the silver:core and the runtime.
set -euo pipefail
export SILVER_HOME=$PWD
JVM_ARGS=(-Xss20M -Xmx1G -jar ../jars/silver.compiler.composed.Default.jar --no-stdlib --relative-jar "$@")
export GRAMMAR_PATH="../grammars"
export ANT_OPTS=-Xss10M
mkdir -p build
cd build
# Use silver.core.jar from build/ if it exists:
if [ -f silver.core.jar ]; then
export GRAMMAR_PATH="$GRAMMAR_PATH:silver.core.jar"
else
export GRAMMAR_PATH="$GRAMMAR_PATH:../jars/silver.core.jar"
fi
for lib in util langutil rewrite regex; do
echo "=== BUILD LIBRARY $lib ==="
time java "${JVM_ARGS[@]}" silver:$lib
ant
export GRAMMAR_PATH="$GRAMMAR_PATH:silver.$lib.jar"
done
if [ -z "${NOINSTALL:-}" ]; then
echo "=== INSTALL NEW LIBRARIES ==="
mv ./*.jar ../jars
fi