pike.git / lib / master.pike.in

version» Context lines:

pike.git/lib/master.pike.in:1: - /* $Id: master.pike.in,v 1.47 1999/04/30 06:53:54 hubbe Exp $ + /* $Id: master.pike.in,v 1.48 1999/06/01 11:35:35 mirar Exp $    *    * Master-file for Pike.    *    * Based on master.pike 1.67.    */      // Some configurable parameters useful for debugging      // Used by describe_backtrace() et al.   #if !defined(BT_MAX_STRING_LEN) || (BT_MAX_STRING_LEN <= 0)
pike.git/lib/master.pike.in:727:    add_include_path("¤share_prefix¤/include");    add_module_path("¤share_prefix¤/modules");   #endif      #if "¤lib_prefix¤"[0]!='¤'    // add path for architecture-dependant files    add_include_path("¤lib_prefix¤/include");    add_module_path("¤lib_prefix¤/modules");   #endif    +  /* maybe test here so noenvironment isn't an argument to the script */ +  if (-1==search(argv,"--noenvironment")) +  {    q=(getenv("PIKE_INCLUDE_PATH")||"")/":"-({""});    for(i=sizeof(q)-1;i>=0;i--) add_include_path(q[i]);       q=(getenv("PIKE_PROGRAM_PATH")||"")/":"-({""});    for(i=sizeof(q)-1;i>=0;i--) add_program_path(q[i]);       q=(getenv("PIKE_MODULE_PATH")||"")/":"-({""});    for(i=sizeof(q)-1;i>=0;i--) add_module_path(q[i]); -  +  }    -  +     if(sizeof(argv)>1 && sizeof(argv[1]) && argv[1][0]=='-')    {    tmp=resolv("Getopt");       if (!tmp) {    werror("master.pike: Couldn't resolv Getopt module.\n"    "Is your PIKE_MODULE_PATH environment variable set correctly?\n");    exit(1);    }   
pike.git/lib/master.pike.in:762:    ({"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"})}),    ({"master",tmp->HAS_ARG,"-m"}),    ({"compiler_trace",tmp->NO_ARG,"--compiler-trace"}),    ({"debug",tmp->MAY_HAVE_ARG,"--debug",0,1}),    ({"trace",tmp->MAY_HAVE_ARG,"--trace",0,1}),    ({"ignore",tmp->MAY_HAVE_ARG,"-Dqdatpl",0,1}), +  ({"noenvironment",tmp->MAY_HAVE_ARG,"--noenvironment",0,1}),    ({"ignore",tmp->HAS_ARG,"-s"}),    }), 1);       /* Parse -M and -I backwards */    for(i=sizeof(q)-1;i>=0;i--)    {    switch(q[i][0])    {    case "debug":    debug+=(int)q[i][1];
pike.git/lib/master.pike.in:831:    " -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"    " --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" +  " --noenvironment : Ignore environmental variables (PIKE_MODULE_PATH etc)\n"    );    exit(0);       case "showpaths":    werror("Include path : " + pike_include_path*"\n"    " " + "\n"    "Module path : " + pike_module_path*"\n"    " " + "\n"    "Program path : " + pike_program_path*"\n"    " " + "\n"
pike.git/lib/master.pike.in:893:       if (err) {    werror(sprintf("Pike: Failed to compile script:\n"    "%s\n", stringp(err[0])?err[0]:describe_backtrace(err)));    exit(1);    }       // FIXME: Isn't the following code dead?    if(!tmp)    { -  werror("Pike: Couldn't find script to execute.\n"); +  werror("Pike: Couldn't find script to execute\n(%O)\n",argv[0]);    exit(1);    }       object script=tmp();      #if constant(_debug)    if(debug) _debug(debug);   #endif    if(!script->main)    {