Debian Codegraph @

src/commands.h

raw symbols SCIP
1 /* Definition of data structures describing shell commands for GNU Make.
2 Copyright (C) 1988-2020 Free Software Foundation, Inc.
3 This file is part of GNU Make.
4
5 GNU Make is free software; you can redistribute it and/or modify it under the
6 terms of the GNU General Public License as published by the Free Software
7 Foundation; either version 3 of the License, or (at your option) any later
8 version.
9
10 GNU Make is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12 A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License along with
15 this program. If not, see <http://www.gnu.org/licenses/>. */
16
17 /* Structure that gives the commands to make a file
18 and information about where these commands came from. */
19
20 #ifndef REMAKE_COMMANDS_H
21 #define REMAKE_COMMANDS_H
22
23 #include "makeint.h"
24 #include "filedef.h"
25 #include "trace.h"
26
27 struct commands
28 {
29 gmk_floc fileinfo; /* Where commands were defined. */
30 char *commands; /* Commands text. */
31 char **command_lines; /* Commands chopped up into lines. */
32 unsigned char *lines_flags; /* One set of flag bits for each line. */
33 unsigned short ncommand_lines;/* Number of command lines. */
34 char recipe_prefix; /* Recipe prefix for this command set. */
35 unsigned int any_recurse:1; /* Nonzero if any 'lines_flags' elt has */
36 /* the COMMANDS_RECURSE bit set. */
37 };
38
39 /* Bits in 'lines_flags'. */
40 #define COMMANDS_RECURSE 1 /* Recurses: + or $(MAKE). */
41 #define COMMANDS_SILENT 2 /* Silent: @. */
42 #define COMMANDS_NOERROR 4 /* No errors: -. */
43
44 RETSIGTYPE fatal_error_signal (int sig);
45 /*!
46 Execute the commands to remake P_FILE. If they are currently
47 executing, return or have already finished executing, just return.
48 Otherwise, fork off a child process to run the first command line
49 in the sequence.
50
51 @param p_file pointer to file to remake.
52
53 @param p_call_stack pointer to current target call stack. This is
54 passed down for information reporting.
55
56 */
57 extern void execute_file_commands (file_t *p_file,
58 target_stack_node_t *p_call_stack);
59
60 /*!
61 + Print out the commands.
62 +
63 + @param p_cmds location of commands to print out.
64 + @param p_target used to set automatic variables if it is non-null.
65 + @param b_expand if true, expand the commands to remove MAKE variables.
66 +*/
67 extern void print_commands (file_t *p_target, commands_t *p_cmds, bool b_expand);
68
69 void delete_child_targets (struct child *child);
70 void chop_commands (struct commands *cmds);
71 void set_file_variables (struct file *file);
72
73 #endif /*REMAKE_COMMANDS_H*/