lib/Tools/mkdir
changeset 8211 714f164f0385
parent 8199 9e45cf2e6cf7
child 8244 c587f5ac4a98
equal deleted inserted replaced
8210:ca3997312f47 8211:714f164f0385
    14   echo
    14   echo
    15   echo "Usage: $PRG [LOGIC] NAME"
    15   echo "Usage: $PRG [LOGIC] NAME"
    16   echo
    16   echo
    17   echo "  Options are:"
    17   echo "  Options are:"
    18   echo "    -I FILE      alternative IsaMakefile output"
    18   echo "    -I FILE      alternative IsaMakefile output"
       
    19   echo "    -P           include parent logic target"
    19   echo "    -b           setup build mode (session outputs heap image)"
    20   echo "    -b           setup build mode (session outputs heap image)"
    20   echo "    -d           setup document"
    21   echo "    -d           setup document"
    21   echo "    -p           include parent logic target"
       
    22   echo
    22   echo
    23   echo "  Prepare session directory, including IsaMakefile, document etc."
    23   echo "  Prepare session directory, including IsaMakefile, document etc."
    24   echo "  with parent LOGIC (default ISABELLE_LOGIC=$ISABELLE_LOGIC)"
    24   echo "  with parent LOGIC (default ISABELLE_LOGIC=$ISABELLE_LOGIC)"
    25   echo
    25   echo
    26   exit 1
    26   exit 1
    36 ## process command line
    36 ## process command line
    37 
    37 
    38 # options
    38 # options
    39 
    39 
    40 ISAMAKEFILE="IsaMakefile"
    40 ISAMAKEFILE="IsaMakefile"
       
    41 PARENT=""
    41 BUILD=""
    42 BUILD=""
    42 DOCUMENT=""
    43 DOCUMENT=""
    43 PARENT=""
       
    44 
    44 
    45 while getopts "I:bdp" OPT
    45 while getopts "I:Pbd" OPT
    46 do
    46 do
    47   case "$OPT" in
    47   case "$OPT" in
    48     I)
    48     I)
    49       ISAMAKEFILE="$OPTARG"
    49       ISAMAKEFILE="$OPTARG"
       
    50       ;;
       
    51     P)
       
    52       PARENT=true
    50       ;;
    53       ;;
    51     b)
    54     b)
    52       BUILD=true
    55       BUILD=true
    53       ;;
    56       ;;
    54     d)
    57     d)
    55       DOCUMENT=true
    58       DOCUMENT=true
    56       ;;
       
    57     p)
       
    58       PARENT=true
       
    59       ;;
    59       ;;
    60     \?)
    60     \?)
    61       usage
    61       usage
    62       ;;
    62       ;;
    63   esac
    63   esac
    93   TARGET="\$(OUT)/$NAME"
    93   TARGET="\$(OUT)/$NAME"
    94   USEDIR="\$(USEDIR) -b -P http://isabelle.in.tum.de/library"
    94   USEDIR="\$(USEDIR) -b -P http://isabelle.in.tum.de/library"
    95 else
    95 else
    96   IMAGES=""
    96   IMAGES=""
    97   TEST="$NAME"
    97   TEST="$NAME"
    98   TARGET="\$(LOG)/$NAME.gz"
    98   TARGET="\$(LOG)/$LOGIC-$NAME.gz"
    99   USEDIR="\$(USEDIR)"
    99   USEDIR="\$(USEDIR)"
   100 fi
   100 fi
   101 
   101 
   102 if [ "$ISAMAKEFILE" != - -a -f "$ISAMAKEFILE" ]; then
   102 if [ "$ISAMAKEFILE" != - -a -f "$ISAMAKEFILE" ]; then
   103   echo "keeping $PWD/$ISAMAKEFILE" >&2
   103   echo "keeping $PWD/$ISAMAKEFILE" >&2