lib/Tools/mkdir
changeset 8194 0c5d9d23b715
parent 8162 020e384e67dd
child 8198 73a5877ca517
     1.1 --- a/lib/Tools/mkdir	Fri Feb 04 21:45:57 2000 +0100
     1.2 +++ b/lib/Tools/mkdir	Fri Feb 04 21:53:36 2000 +0100
     1.3 @@ -12,14 +12,15 @@
     1.4  function usage()
     1.5  {
     1.6    echo
     1.7 -  echo "Usage: $PRG LOGIC NAME"
     1.8 +  echo "Usage: $PRG [LOGIC] NAME"
     1.9    echo
    1.10    echo "  Options are:"
    1.11    echo "    -b           setup build mode (session outputs heap image)"
    1.12    echo "    -d           setup document"
    1.13    echo "    -p           include parent logic target"
    1.14    echo
    1.15 -  echo "  Prepare logic session directory, including IsaMakefile, document etc."
    1.16 +  echo "  Prepare session directory, including IsaMakefile, document etc."
    1.17 +  echo "  with parent LOGIC (default \$ISABELLE_LOGIC=$ISABELLE_LOGIC)"
    1.18    echo
    1.19    exit 1
    1.20  }
    1.21 @@ -62,10 +63,16 @@
    1.22  
    1.23  # args
    1.24  
    1.25 -[ $# -ne 2 ] && usage
    1.26  
    1.27 -LOGIC="$1"; shift
    1.28 -NAME="$1"; shift
    1.29 +if [ $# -eq 1 ]; then
    1.30 +  LOGIC="$ISABELLE_LOGIC"
    1.31 +  NAME="$1"; shift
    1.32 +elif [ $# -eq 2 ]; then
    1.33 +  LOGIC="$1"; shift
    1.34 +  NAME="$1"; shift
    1.35 +else
    1.36 +  usage
    1.37 +fi
    1.38  
    1.39  [ -z "$SESSION" ] && SESSION=$(basename $NAME)
    1.40  
    1.41 @@ -79,12 +86,12 @@
    1.42    IMAGES="$NAME"
    1.43    TEST=""
    1.44    TARGET="\$(OUT)/$NAME"
    1.45 -  USEDIR="usedir -b"
    1.46 +  USEDIR="\$(USEDIR) -b -P http://isabelle.in.tum.de/library"
    1.47  else
    1.48    IMAGES=""
    1.49    TEST="$NAME"
    1.50    TARGET="\$(LOG)/$NAME.gz"
    1.51 -  USEDIR="usedir"
    1.52 +  USEDIR="\$(USEDIR)"
    1.53  fi
    1.54  
    1.55  if [ -f IsaMakefile ]; then
    1.56 @@ -105,7 +112,7 @@
    1.57      echo "SRC = \$(ISABELLE_HOME)/src"
    1.58      echo "OUT = \$(ISABELLE_OUTPUT)"
    1.59      echo "LOG = \$(OUT)/log"
    1.60 -    echo "INFO = \$(ISABELLE_BROWSER_INFO)"
    1.61 +    echo "USEDIR = \$(ISATOOL) usedir -i true -d dvi"
    1.62      echo
    1.63      echo
    1.64      echo "## $NAME"
    1.65 @@ -117,12 +124,12 @@
    1.66        echo -e "\t@cd \$(SRC)/$LOGIC; \$(ISATOOL) make $LOGIC"
    1.67        echo
    1.68        echo "$TARGET: \$(OUT)/$LOGIC     ## add $NAME sources here"
    1.69 -      echo -e "\t@\$(ISATOOL) $USEDIR \$(OUT)/$LOGIC $NAME"
    1.70 +      echo -e "\t@$USEDIR \$(OUT)/$LOGIC $NAME"
    1.71      else
    1.72        echo "$NAME: $TARGET"
    1.73        echo
    1.74        echo "$TARGET:                    ## add $NAME sources here"
    1.75 -      echo -e "\t@\$(ISATOOL) $USEDIR $LOGIC $NAME"
    1.76 +      echo -e "\t@$USEDIR $LOGIC $NAME"
    1.77      fi
    1.78      echo
    1.79      echo