[53] | 1 | /* Definition of data structures describing shell commands for GNU Make.
|
---|
[3140] | 2 | Copyright (C) 1988-2016 Free Software Foundation, Inc.
|
---|
[53] | 3 | This file is part of GNU Make.
|
---|
| 4 |
|
---|
[503] | 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
|
---|
[1993] | 7 | Foundation; either version 3 of the License, or (at your option) any later
|
---|
| 8 | version.
|
---|
[53] | 9 |
|
---|
[503] | 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.
|
---|
[53] | 13 |
|
---|
[503] | 14 | You should have received a copy of the GNU General Public License along with
|
---|
[1993] | 15 | this program. If not, see <http://www.gnu.org/licenses/>. */
|
---|
[53] | 16 |
|
---|
| 17 | /* Structure that gives the commands to make a file
|
---|
| 18 | and information about where these commands came from. */
|
---|
| 19 |
|
---|
| 20 | struct commands
|
---|
| 21 | {
|
---|
[3140] | 22 | floc fileinfo; /* Where commands were defined. */
|
---|
| 23 | char *commands; /* Commands text. */
|
---|
| 24 | char **command_lines; /* Commands chopped up into lines. */
|
---|
[1440] | 25 | #ifdef CONFIG_WITH_COMMANDS_FUNC
|
---|
[3140] | 26 | unsigned short *lines_flags;/* One set of flag bits for each line. */
|
---|
[1440] | 27 | #else
|
---|
[3140] | 28 | unsigned char *lines_flags; /* One set of flag bits for each line. */
|
---|
[1440] | 29 | #endif
|
---|
[3140] | 30 | unsigned short ncommand_lines;/* Number of command lines. */
|
---|
| 31 | char recipe_prefix; /* Recipe prefix for this command set. */
|
---|
| 32 | unsigned int any_recurse:1; /* Nonzero if any 'lines_flags' elt has */
|
---|
| 33 | /* the COMMANDS_RECURSE bit set. */
|
---|
[2056] | 34 | #ifdef CONFIG_WITH_MEMORY_OPTIMIZATIONS
|
---|
| 35 | int refs; /* References. */
|
---|
| 36 | #endif
|
---|
[53] | 37 | };
|
---|
| 38 |
|
---|
[3140] | 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: -. */
|
---|
[520] | 43 | #ifdef CONFIG_WITH_EXTENDED_NOTPARALLEL
|
---|
| 44 | # define COMMANDS_NOTPARALLEL 32 /* kmk: The commands must be executed alone. */
|
---|
| 45 | # define COMMANDS_NO_COMMANDS 64 /* kmk: No commands. */
|
---|
[2024] | 46 | #endif
|
---|
[520] | 47 | #ifdef CONFIG_WITH_KMK_BUILTIN
|
---|
| 48 | # define COMMANDS_KMK_BUILTIN 128 /* kmk: kmk builtin command. */
|
---|
| 49 | #endif
|
---|
[1440] | 50 | #ifdef CONFIG_WITH_COMMANDS_FUNC
|
---|
| 51 | # define COMMAND_GETTER_SKIP_IT 256 /* $(commands target) skips this: % */
|
---|
| 52 | #endif
|
---|
[53] | 53 |
|
---|
[3140] | 54 | RETSIGTYPE fatal_error_signal (int sig);
|
---|
[903] | 55 | void execute_file_commands (struct file *file);
|
---|
| 56 | void print_commands (const struct commands *cmds);
|
---|
| 57 | void delete_child_targets (struct child *child);
|
---|
| 58 | void chop_commands (struct commands *cmds);
|
---|
[2754] | 59 | #ifdef CONFIG_WITH_MEMORY_OPTIMIZATIONS
|
---|
[2753] | 60 | void free_chopped_commands (struct commands *cmd);
|
---|
| 61 | #endif
|
---|
[2024] | 62 | #if defined(CONFIG_WITH_COMMANDS_FUNC) || defined (CONFIG_WITH_DOT_MUST_MAKE)
|
---|
| 63 | void set_file_variables (struct file *file, int called_early);
|
---|
| 64 | #else
|
---|
[903] | 65 | void set_file_variables (struct file *file);
|
---|
[2024] | 66 | #endif
|
---|
[2594] | 67 | #ifdef CONFIG_WITH_LAZY_DEPS_VARS
|
---|
| 68 | struct dep *create_uniqute_deps_chain (struct dep *deps);
|
---|
| 69 | #endif
|
---|
| 70 |
|
---|