Admin/lib/Tools/build_setup
changeset 74030 39e05601faeb
parent 73963 59b6f0462086
child 74031 09821ca262d3
equal deleted inserted replaced
74029:0701ff55780d 74030:39e05601faeb
    46 ## main
    46 ## main
    47 
    47 
    48 [ -d "$COMPONENT_DIR" ] && fail "Directory already exists: \"$COMPONENT_DIR\""
    48 [ -d "$COMPONENT_DIR" ] && fail "Directory already exists: \"$COMPONENT_DIR\""
    49 
    49 
    50 
    50 
       
    51 # etc/settings
       
    52 
       
    53 mkdir -p "$COMPONENT_DIR/etc"
       
    54 cat > "$COMPONENT_DIR/etc/settings" <<EOF
       
    55 # -*- shell-script -*- :mode=shellscript:
       
    56 
       
    57 ISABELLE_SETUP_JAR="\$COMPONENT/lib/isabelle_setup.jar"
       
    58 classpath "\$ISABELLE_SETUP_JAR"
       
    59 EOF
       
    60 
       
    61 BUILD_PROPS="$COMPONENT_DIR/etc/build.props"
       
    62 echo >> "$BUILD_PROPS" "no_module = lib/isabelle_setup.jar"
       
    63 
       
    64 
    51 # build jar
    65 # build jar
    52 
    66 
       
    67 SOURCE_DIR="$COMPONENT_DIR/src"
    53 TARGET_DIR="$COMPONENT_DIR/lib"
    68 TARGET_DIR="$COMPONENT_DIR/lib"
    54 mkdir -p "$TARGET_DIR/isabelle/setup"
    69 mkdir -p "$SOURCE_DIR" "$TARGET_DIR/isabelle/setup"
    55 
    70 
    56 declare -a ARGS=("-Xlint:unchecked")
    71 declare -a ARGS=("-Xlint:unchecked")
       
    72 echo -n >> "$BUILD_PROPS" "sources ="
       
    73 
    57 for SRC in "${SOURCES[@]}"
    74 for SRC in "${SOURCES[@]}"
    58 do
    75 do
    59   ARGS["${#ARGS[@]}"]="$(platform_path "$ISABELLE_HOME/src/Tools/Setup/isabelle/setup/$SRC")"
    76   ARGS["${#ARGS[@]}"]="$(platform_path "$ISABELLE_HOME/src/Tools/Setup/isabelle/setup/$SRC")"
       
    77   cp "$ISABELLE_HOME/src/Tools/Setup/isabelle/setup/$SRC" "$SOURCE_DIR"
       
    78   echo >> "$BUILD_PROPS" " \\"
       
    79   echo -n >> "$BUILD_PROPS" "  src/$SRC"
    60 done
    80 done
       
    81 
       
    82 echo >> "$BUILD_PROPS"
    61 
    83 
    62 isabelle_jdk javac $ISABELLE_JAVAC_OPTIONS -d "$TARGET_DIR" \
    84 isabelle_jdk javac $ISABELLE_JAVAC_OPTIONS -d "$TARGET_DIR" \
    63   -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "${ARGS[@]}" || \
    85   -classpath "$(platform_path "$ISABELLE_CLASSPATH")" "${ARGS[@]}" || \
    64   fail "Failed to compile sources"
    86   fail "Failed to compile sources"
    65 
    87 
    67   -e "isabelle.setup.Setup" -C "$TARGET_DIR" isabelle || fail "Failed to produce jar"
    89   -e "isabelle.setup.Setup" -C "$TARGET_DIR" isabelle || fail "Failed to produce jar"
    68 
    90 
    69 rm -rf "$TARGET_DIR/isabelle"
    91 rm -rf "$TARGET_DIR/isabelle"
    70 
    92 
    71 
    93 
    72 # etc/settings
       
    73 
       
    74 mkdir -p "$COMPONENT_DIR/etc"
       
    75 cat > "$COMPONENT_DIR/etc/settings" <<EOF
       
    76 # -*- shell-script -*- :mode=shellscript:
       
    77 
       
    78 ISABELLE_SETUP_JAR="\$COMPONENT/lib/isabelle_setup.jar"
       
    79 classpath "\$ISABELLE_SETUP_JAR"
       
    80 EOF
       
    81 
       
    82 
       
    83 # README
    94 # README
    84 
    95 
    85 cat > "$COMPONENT_DIR/README" <<EOF
    96 cat > "$COMPONENT_DIR/README" <<EOF
    86 Isabelle setup in pure Java, see also \$ISABELLE_HOME/src/Tools/Setup/.
    97 Isabelle setup in pure Java, see also \$ISABELLE_HOME/src/Tools/Setup/.
    87 EOF
    98 EOF