[BACK]Return to cond.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / usr.bin / make

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/usr.bin/make/cond.c between version 1.11 and 1.12

version 1.11, 1998/09/18 20:35:11 version 1.12, 2001/01/14 20:44:26
Line 78  __RCSID("$NetBSD$");
Line 78  __RCSID("$NetBSD$");
  *      T -> exists(file)   *      T -> exists(file)
  *      T -> empty(varspec)   *      T -> empty(varspec)
  *      T -> target(name)   *      T -> target(name)
    *      T -> commands(name)
  *      T -> symbol   *      T -> symbol
  *      T -> $(varspec) op value   *      T -> $(varspec) op value
  *      T -> $(varspec) == "string"   *      T -> $(varspec) == "string"
Line 112  static int CondStrMatch __P((ClientData,
Line 113  static int CondStrMatch __P((ClientData,
 static Boolean CondDoMake __P((int, char *));  static Boolean CondDoMake __P((int, char *));
 static Boolean CondDoExists __P((int, char *));  static Boolean CondDoExists __P((int, char *));
 static Boolean CondDoTarget __P((int, char *));  static Boolean CondDoTarget __P((int, char *));
   static Boolean CondDoCommands __P((int, char *));
 static Boolean CondCvtArg __P((char *, double *));  static Boolean CondCvtArg __P((char *, double *));
 static Token CondToken __P((Boolean));  static Token CondToken __P((Boolean));
 static Token CondT __P((Boolean));  static Token CondT __P((Boolean));
Line 425  CondDoTarget (argLen, arg)
Line 427  CondDoTarget (argLen, arg)
     return (result);      return (result);
 }  }
   
   /*-
    *-----------------------------------------------------------------------
    * CondDoCommands --
    *      See if the given node exists and is an actual target with commands
    *      associated with it.
    *
    * Results:
    *      TRUE if the node exists as a target and has commands associated with
    *      it and FALSE if it does not.
    *
    * Side Effects:
    *      None.
    *
    *-----------------------------------------------------------------------
    */
   static Boolean
   CondDoCommands (argLen, arg)
       int     argLen;
       char    *arg;
   {
       char    savec = arg[argLen];
       Boolean result;
       GNode   *gn;
   
       arg[argLen] = '\0';
       gn = Targ_FindNode(arg, TARG_NOCREATE);
       if ((gn != NILGNODE) && !OP_NOP(gn->type) && !Lst_IsEmpty(gn->commands)) {
           result = TRUE;
       } else {
           result = FALSE;
       }
       arg[argLen] = savec;
       return (result);
   }
   
 /*-  /*-
  *-----------------------------------------------------------------------   *-----------------------------------------------------------------------
Line 873  error:
Line 909  error:
                         condExpr -= 6;                          condExpr -= 6;
                         goto use_default;                          goto use_default;
                     }                      }
                   } else if (strncmp (condExpr, "commands", 8) == 0) {
                       /*
                        * Use CondDoCommands to evaluate the argument and
                        * CondGetArg to extract the argument from the
                        * 'function call'.
                        */
                       evalProc = CondDoCommands;
                       condExpr += 8;
                       arglen = CondGetArg(&condExpr, &arg, "commands", TRUE);
                       if (arglen == 0) {
                           condExpr -= 8;
                           goto use_default;
                       }
                 } else {                  } else {
                     /*                      /*
                      * The symbol is itself the argument to the default                       * The symbol is itself the argument to the default

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

CVSweb <webmaster@jp.NetBSD.org>