pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1:   /* -*- Pike -*-    * -  * $Id: master.pike.in,v 1.138 2001/01/16 05:39:30 hubbe Exp $ +  * $Id: master.pike.in,v 1.139 2001/01/19 11:05:15 mirar Exp $    *    * Master-file for Pike.    *    * Based on master.pike 1.67.    */      // Some configurable parameters useful for debugging      #pike __REAL_VERSION__   #define PIKE_AUTORELOAD
pike.git/lib/master.pike.in:1201:    * and an array containing the environment variables on the same form as    * a C program receives them.    */   void _main(array(string) orig_argv, array(string) env)   {    array(string) argv=copy_value(orig_argv);    int i,debug,trace;    object tmp;    string a,b;    array q; +  int list_features=0;       _pike_file_name = orig_argv[0];       foreach(env,a)    {    if(sscanf(a,"%s=%s",a,b))    {    if(a=="") // Special hack for NT    {    sscanf(b,"%s=%s",a,b);
pike.git/lib/master.pike.in:1246:    if (!tmp) {    werror("master.pike: Couldn't resolv Getopt module.\n"    "Is your PIKE_MODULE_PATH environment variable set correctly?\n");    exit(1);    }       q=tmp->find_all_options(argv,({    ({"compat_version",tmp->HAS_ARG,({"-V","--compat"})}),    ({"version",tmp->NO_ARG,({"-v","--version"})}),    ({"help",tmp->NO_ARG,({"-h","--help"})}), +  ({"features",tmp->NO_ARG,({"--features"})}),    ({"execute",tmp->HAS_ARG,({"-e","--execute"})}),    ({"debug_without",tmp->HAS_ARG,({"--debug-without"})}),    ({"preprocess",tmp->HAS_ARG,({"-E","--preprocess"})}),    ({"modpath",tmp->HAS_ARG,({"-M","--module-path"})}),    ({"ipath",tmp->HAS_ARG,({"-I","--include-path"})}),    ({"ppath",tmp->HAS_ARG,({"-P","--program-path"})}),    ({"showpaths",tmp->NO_ARG,"--show-paths"}),    ({"warnings",tmp->NO_ARG,({"-w","--warnings"})}),    ({"nowarnings",tmp->NO_ARG,({"-W", "--woff", "--no-warnings"})}),   #ifdef PIKE_AUTORELOAD
pike.git/lib/master.pike.in:1378:       case "help":    werror("Usage: pike [-driver options] script [script arguments]\n"    "Driver options include:\n"    " -I --include-path=<p>: Add <p> to the include path\n"    " -M --module-path=<p> : Add <p> to the module path\n"    " -P --program-path=<p>: Add <p> to the program path\n"    " -e --execute=<cmd> : Run the given command instead of a script.\n"    " -h --help : see this message\n"    " -v --version : See what version of pike you have.\n" +  " --features : List Pike features.\n"    " --show-paths : See the paths and master that pike uses.\n"    " -s# : Set stack size\n"    " -m <file> : Use <file> as master object.\n"    " -d -d# : Increase debug (# is how much)\n"    " -t -t# : Increase trace level\n"    );    exit(0);    -  +  case "features": +  list_features=1; +  break; +     case "showpaths":    werror("Include path : " + pike_include_path*"\n"    " " + "\n"    "Module path : " + pike_module_path*"\n"    " " + "\n"    "Program path : " + pike_program_path*"\n"    " " + "\n"    "Master file : " + (_master_file_name || __FILE__) + "\n");    exit(0);   
pike.git/lib/master.pike.in:1411:    case "preprocess":    _static_modules.files()->_stdout->write(cpp(master_read_file(opts[1]),    opts[1]));    exit(0);    }    }       argv = tmp->get_args(argv,1);    }    +  if (list_features) +  { +  mixed v; +  +  v = resolv("Tools"); +  if (v) v = v["Install"]; +  if (v) v = v["features"]; +  if (!v) +  { +  werror("Could not resolv Tools.Install.features\n"); +  exit(1); +  } +  +  _static_modules.files()->_stdout->write(version()+"\n"+ +  v()*"\n"+"\n"); +  exit(0); +  } +     random_seed(time() + (getpid() * 0x11111111));       if(sizeof(argv)==1)    {    /* Attempt to resolv Tools.Hilfe.StdinHilfe */    tmp = resolv("Tools");    if (!tmp) {    werror("Couldn't find Tools.\n");    exit(1);    }