3 dbg_cmd_run(
char *psz_arg)
5 char *
const *ppsz_argv = (
char *
const *)
global_argv;
7 printf(
"Changing directory to %s and restarting...\n",
11 fprintf(stderr,
"changing working directory; %s\n",
14 if (psz_arg && strlen(psz_arg)) {
15 unsigned int len = strlen(
global_argv[0]) + strlen(psz_arg) + 2;
16 char *psz_full_args =
CALLOC(
char, len);
17 snprintf(psz_full_args, len,
"%s %s",
global_argv[0], psz_arg);
21 execvp (psz_make_cmd, ppsz_argv);
27 dbg_cmd_run_init(
unsigned int c)
29 short_command[c].func = &dbg_cmd_run;
30 short_command[c].use =
_(
"run [ARGS]");
31 short_command[c].doc =
32 _(
"Run Makefile from the beginning.\n" 33 "You may specify arguments to give it.\n" 34 "With no arguments, uses arguments last specified (with \"run\")");
#define CALLOC(t, n)
Definition: types.h:83
const char *const * global_argv
char ** buildargv(const char *input)
debug_return_t
Definition: trace.h:32
char * directory_before_chdir
#define _(msgid)
Definition: make.h:293