remake  4.3+dbg-1.5
shell.h
Go to the documentation of this file.
1 /* Run a shell command. */
2 /*
3 Copyright (C) 2004-2005, 2007-2009, 2011 2020 R. Bernstein
4 <rocky@gnu.org>
5 This file is part of GNU Make (remake variant).
6 
7 GNU Make is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11 
12 GNU Make is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with GNU Make; see the file COPYING. If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA. */
21 #include <errno.h>
22 static debug_return_t
23 dbg_cmd_shell(char *psz_varname)
24 {
25  int rc=system(psz_varname);
26  shell_rc_status(rc);
27  return debug_readloop;
28 }
29 
30 static void
31 dbg_cmd_shell_init(unsigned int c)
32 {
33  short_command[c].func = &dbg_cmd_shell;
34  short_command[c].use = _("shell STRING");
35  short_command[c].doc =
36  _("Execute the rest of the line as a shell.");
37 }
38 
39 
40 /*
41  * Local variables:
42  * eval: (c-set-style "gnu")
43  * indent-tabs-mode: nil
44  * End:
45  */
void shell_rc_status(int rc)
debug_return_t
Definition: trace.h:32
#define _(msgid)
Definition: make.h:293
Definition: trace.h:40