1 /* Parse and evaluate buffer and return the results.
2 */
3 /*
4 Copyright (C) 2004-2005, 2007-2009, 2011, 2020 R. Bernstein
5 <rocky@gnu.org>
6 This file is part of GNU Make (remake variant).
7 
8 GNU Make is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
12 
13 GNU Make is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 GNU General Public License for more details.
17 
18 You should have received a copy of the GNU General Public License
19 along with GNU Make; see the file COPYING.  If not, write to
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 Boston, MA 02111-1307, USA.  */
22 static debug_return_t
dbg_cmd_eval(char * psz_evalstring)23 dbg_cmd_eval(char *psz_evalstring)
24 {
25 #if 0
26   if ('\0' == *psz_evalstring) {
27     file_t *p_target;
28     if (p_stack && p_stack->p_target) {
29       p_target = p_stack->p_target;
30     } else {
31       printf(_("Default target not found here. You must supply one\n"));
32     }
33 
34     if (p_target->name)
35       printf(_("Running commands for target %s\n"), p_target->name);
36     else
37       printf(_("Running commands\n"), p_target->name);
38     target_environment (p_target);
39     new_job(p_target, p_stack);
40   } else
41 #else
42   {
43     func_eval(NULL, &psz_evalstring, NULL);
44     reading_file = 0;
45 
46   }
47 #endif
48   return debug_readloop;
49 }
50 
51 static void
dbg_cmd_eval_init(unsigned int c)52 dbg_cmd_eval_init(unsigned int c)
53 {
54   short_command[c].func = &dbg_cmd_eval;
55   short_command[c].use  = _("eval STRING");
56   short_command[c].doc  = _("parse and evaluate a string.");
57 }
58 
59 /*
60  * Local variables:
61  * eval: (c-set-style "gnu")
62  * indent-tabs-mode: nil
63  * End:
64  */
65