Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/make make(1): indent make.h with tabs instead of spaces
details: https://anonhg.NetBSD.org/src/rev/2789a8d82e3e
branches: trunk
changeset: 946356:2789a8d82e3e
user: rillig <rillig%NetBSD.org@localhost>
date: Tue Nov 24 20:17:17 2020 +0000
description:
make(1): indent make.h with tabs instead of spaces
diffstat:
usr.bin/make/make.h | 607 ++++++++++++++++++++++++++-------------------------
1 files changed, 313 insertions(+), 294 deletions(-)
diffs (truncated from 762 to 300 lines):
diff -r 3743c4ff5d11 -r 2789a8d82e3e usr.bin/make/make.h
--- a/usr.bin/make/make.h Tue Nov 24 19:52:06 2020 +0000
+++ b/usr.bin/make/make.h Tue Nov 24 20:17:17 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: make.h,v 1.218 2020/11/24 19:33:13 rillig Exp $ */
+/* $NetBSD: make.h,v 1.219 2020/11/24 20:17:17 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -192,27 +192,29 @@
* UNMADE -> BEINGMADE -> UPTODATE.
*/
typedef enum GNodeMade {
- /* Not examined yet. */
- UNMADE,
- /* The node has been examined but is not yet ready since its
- * dependencies have to be made first. */
- DEFERRED,
+ /* Not examined yet. */
+ UNMADE,
+ /* The node has been examined but is not yet ready since its
+ * dependencies have to be made first. */
+ DEFERRED,
- /* The node is on the toBeMade list. */
- REQUESTED,
+ /* The node is on the toBeMade list. */
+ REQUESTED,
- /* The node is already being made.
- * Trying to build a node in this state indicates a cycle in the graph. */
- BEINGMADE,
+ /* The node is already being made. Trying to build a node in this
+ * state indicates a cycle in the graph. */
+ BEINGMADE,
- /* Was out-of-date and has been made. */
- MADE,
- /* Was already up-to-date, does not need to be made. */
- UPTODATE,
- /* An error occurred while it was being made (used only in compat mode). */
- ERROR,
- /* The target was aborted due to an error making a dependency (compat). */
- ABORTED
+ /* Was out-of-date and has been made. */
+ MADE,
+ /* Was already up-to-date, does not need to be made. */
+ UPTODATE,
+ /* An error occurred while it was being made.
+ * Used only in compat mode. */
+ ERROR,
+ /* The target was aborted due to an error making a dependency.
+ * Used only in compat mode. */
+ ABORTED
} GNodeMade;
/* The OP_ constants are used when parsing a dependency line as a way of
@@ -221,112 +223,125 @@
*
* Some of the OP_ constants can be combined, others cannot. */
typedef enum GNodeType {
- OP_NONE = 0,
+ OP_NONE = 0,
- /* The dependency operator ':' is the most common one. The commands of
- * this node are executed if any child is out-of-date. */
- OP_DEPENDS = 1 << 0,
- /* The dependency operator '!' always executes its commands, even if
- * its children are up-to-date. */
- OP_FORCE = 1 << 1,
- /* The dependency operator '::' behaves like ':', except that it allows
- * multiple dependency groups to be defined. Each of these groups is
- * executed on its own, independently from the others. Each individual
- * dependency group is called a cohort. */
- OP_DOUBLEDEP = 1 << 2,
+ /* The dependency operator ':' is the most common one. The commands
+ * of this node are executed if any child is out-of-date. */
+ OP_DEPENDS = 1 << 0,
+ /* The dependency operator '!' always executes its commands, even if
+ * its children are up-to-date. */
+ OP_FORCE = 1 << 1,
+ /* The dependency operator '::' behaves like ':', except that it
+ * allows multiple dependency groups to be defined. Each of these
+ * groups is executed on its own, independently from the others.
+ * Each individual dependency group is called a cohort. */
+ OP_DOUBLEDEP = 1 << 2,
- /* Matches the dependency operators ':', '!' and '::'. */
- OP_OPMASK = OP_DEPENDS|OP_FORCE|OP_DOUBLEDEP,
+ /* Matches the dependency operators ':', '!' and '::'. */
+ OP_OPMASK = OP_DEPENDS | OP_FORCE | OP_DOUBLEDEP,
- /* Don't care if the target doesn't exist and can't be created */
- OP_OPTIONAL = 1 << 3,
- /* Use associated commands for parents */
- OP_USE = 1 << 4,
- /* Target is never out of date, but always execute commands anyway.
- * Its time doesn't matter, so it has none...sort of */
- OP_EXEC = 1 << 5,
- /* Ignore non-zero exit status from shell commands when creating the node */
- OP_IGNORE = 1 << 6,
- /* Don't remove the target when interrupted */
- OP_PRECIOUS = 1 << 7,
- /* Don't echo commands when executed */
- OP_SILENT = 1 << 8,
- /* Target is a recursive make so its commands should always be executed
- * when it is out of date, regardless of the state of the -n or -t flags */
- OP_MAKE = 1 << 9,
- /* Target is out-of-date only if any of its children was out-of-date */
- OP_JOIN = 1 << 10,
- /* Assume the children of the node have been already made */
- OP_MADE = 1 << 11,
- /* Special .BEGIN, .END, .INTERRUPT */
- OP_SPECIAL = 1 << 12,
- /* Like .USE, only prepend commands */
- OP_USEBEFORE = 1 << 13,
- /* The node is invisible to its parents. I.e. it doesn't show up in the
- * parents' local variables (.IMPSRC, .ALLSRC). */
- OP_INVISIBLE = 1 << 14,
- /* The node is exempt from normal 'main target' processing in parse.c */
- OP_NOTMAIN = 1 << 15,
- /* Not a file target; run always */
- OP_PHONY = 1 << 16,
- /* Don't search for file in the path */
- OP_NOPATH = 1 << 17,
- /* In a dependency line "target: source1 .WAIT source2", source1 is made
- * first, including its children. Once that is finished, source2 is made,
- * including its children. The .WAIT keyword may appear more than once in
- * a single dependency declaration. */
- OP_WAIT = 1 << 18,
- /* .NOMETA do not create a .meta file */
- OP_NOMETA = 1 << 19,
- /* .META we _do_ want a .meta file */
- OP_META = 1 << 20,
- /* Do not compare commands in .meta file */
- OP_NOMETA_CMP = 1 << 21,
- /* Possibly a submake node */
- OP_SUBMAKE = 1 << 22,
+ /* Don't care if the target doesn't exist and can't be created. */
+ OP_OPTIONAL = 1 << 3,
+ /* Use associated commands for parents. */
+ OP_USE = 1 << 4,
+ /* Target is never out of date, but always execute commands anyway.
+ * Its time doesn't matter, so it has none...sort of. */
+ OP_EXEC = 1 << 5,
+ /* Ignore non-zero exit status from shell commands when creating the
+ * node. */
+ OP_IGNORE = 1 << 6,
+ /* Don't remove the target when interrupted. */
+ OP_PRECIOUS = 1 << 7,
+ /* Don't echo commands when executed. */
+ OP_SILENT = 1 << 8,
+ /* Target is a recursive make so its commands should always be
+ * executed when it is out of date, regardless of the state of the
+ * -n or -t flags. */
+ OP_MAKE = 1 << 9,
+ /* Target is out-of-date only if any of its children was out-of-date. */
+ OP_JOIN = 1 << 10,
+ /* Assume the children of the node have been already made. */
+ OP_MADE = 1 << 11,
+ /* Special .BEGIN, .END or .INTERRUPT. */
+ OP_SPECIAL = 1 << 12,
+ /* Like .USE, only prepend commands. */
+ OP_USEBEFORE = 1 << 13,
+ /* The node is invisible to its parents. I.e. it doesn't show up in
+ * the parents' local variables (.IMPSRC, .ALLSRC). */
+ OP_INVISIBLE = 1 << 14,
+ /* The node does not become the main target, even if it is the first
+ * target in the first makefile. */
+ OP_NOTMAIN = 1 << 15,
+ /* Not a file target; run always. */
+ OP_PHONY = 1 << 16,
+ /* Don't search for the file in the path. */
+ OP_NOPATH = 1 << 17,
+ /* In a dependency line "target: source1 .WAIT source2", source1 is
+ * made first, including its children. Once that is finished,
+ * source2 is made, including its children. The .WAIT keyword may
+ * appear more than once in a single dependency declaration. */
+ OP_WAIT = 1 << 18,
+ /* .NOMETA do not create a .meta file */
+ OP_NOMETA = 1 << 19,
+ /* .META we _do_ want a .meta file */
+ OP_META = 1 << 20,
+ /* Do not compare commands in .meta file */
+ OP_NOMETA_CMP = 1 << 21,
+ /* Possibly a submake node */
+ OP_SUBMAKE = 1 << 22,
- /* Attributes applied by PMake */
+ /* Attributes applied by PMake */
- /* The node is a transformation rule, such as ".c.o". */
- OP_TRANSFORM = 1 << 30,
- /* Target is a member of an archive */
- /* XXX: How does this differ from OP_ARCHV? */
- OP_MEMBER = 1 << 29,
- /* The node is a library,
- * its name has the form "-l<libname>" */
- OP_LIB = 1 << 28,
- /* The node is an archive member,
- * its name has the form "archive(member)" */
- /* XXX: How does this differ from OP_MEMBER? */
- OP_ARCHV = 1 << 27,
- /* Target has all the commands it should. Used when parsing to catch
- * multiple command groups for a target. Only applies to the dependency
- * operators ':' and '!', but not to '::'. */
- OP_HAS_COMMANDS = 1 << 26,
- /* The special command "..." has been seen. All further commands from
- * this node will be saved on the .END node instead, to be executed at
- * the very end. */
- OP_SAVE_CMDS = 1 << 25,
- /* Already processed by Suff_FindDeps, to find dependencies from suffix
- * transformation rules. */
- OP_DEPS_FOUND = 1 << 24,
- /* Node found while expanding .ALLSRC */
- OP_MARK = 1 << 23,
+ /* The node is a transformation rule, such as ".c.o". */
+ OP_TRANSFORM = 1 << 30,
+ /* Target is a member of an archive */
+ /* XXX: How does this differ from OP_ARCHV? */
+ OP_MEMBER = 1 << 29,
+ /* The node is a library,
+ * its name has the form "-l<libname>" */
+ OP_LIB = 1 << 28,
+ /* The node is an archive member,
+ * its name has the form "archive(member)" */
+ /* XXX: How does this differ from OP_MEMBER? */
+ OP_ARCHV = 1 << 27,
+ /* Target has all the commands it should. Used when parsing to catch
+ * multiple command groups for a target. Only applies to the
+ * dependency operators ':' and '!', but not to '::'. */
+ OP_HAS_COMMANDS = 1 << 26,
+ /* The special command "..." has been seen. All further commands from
+ * this node will be saved on the .END node instead, to be executed at
+ * the very end. */
+ OP_SAVE_CMDS = 1 << 25,
+ /* Already processed by Suff_FindDeps, to find dependencies from
+ * suffix transformation rules. */
+ OP_DEPS_FOUND = 1 << 24,
+ /* Node found while expanding .ALLSRC */
+ OP_MARK = 1 << 23,
- OP_NOTARGET = OP_NOTMAIN | OP_USE | OP_EXEC | OP_TRANSFORM
+ OP_NOTARGET = OP_NOTMAIN | OP_USE | OP_EXEC | OP_TRANSFORM
} GNodeType;
typedef enum GNodeFlags {
- REMAKE = 0x0001, /* this target needs to be (re)made */
- CHILDMADE = 0x0002, /* children of this target were made */
- FORCE = 0x0004, /* children don't exist, and we pretend made */
- DONE_WAIT = 0x0008, /* Set by Make_ProcessWait() */
- DONE_ORDER = 0x0010, /* Build requested by .ORDER processing */
- FROM_DEPEND = 0x0020, /* Node created from .depend */
- DONE_ALLSRC = 0x0040, /* We do it once only */
- CYCLE = 0x1000, /* Used by MakePrintStatus */
- DONECYCLE = 0x2000, /* Used by MakePrintStatus */
- INTERNAL = 0x4000 /* Internal use only */
+ /* this target needs to be (re)made */
+ REMAKE = 0x0001,
+ /* children of this target were made */
+ CHILDMADE = 0x0002,
+ /* children don't exist, and we pretend made */
+ FORCE = 0x0004,
+ /* Set by Make_ProcessWait() */
+ DONE_WAIT = 0x0008,
+ /* Build requested by .ORDER processing */
+ DONE_ORDER = 0x0010,
+ /* Node created from .depend */
+ FROM_DEPEND = 0x0020,
+ /* We do it once only */
+ DONE_ALLSRC = 0x0040,
+ /* Used by MakePrintStatus */
+ CYCLE = 0x1000,
+ /* Used by MakePrintStatus */
+ DONECYCLE = 0x2000,
+ /* Internal use only */
+ INTERNAL = 0x4000
} GNodeFlags;
typedef struct List StringList;
@@ -340,109 +355,113 @@
/* A graph node represents a target that can possibly be made, including its
* relation to other targets and a lot of other details. */
typedef struct GNode {
- /* The target's name, such as "clean" or "make.c" */
- char *name;
- /* The unexpanded name of a .USE node */
- char *uname;
- /* The full pathname of the file belonging to the target.
- * XXX: What about .PHONY targets? These don't have an associated path. */
- char *path;
+ /* The target's name, such as "clean" or "make.c" */
+ char *name;
+ /* The unexpanded name of a .USE node */
+ char *uname;
+ /* The full pathname of the file belonging to the target.
+ * XXX: What about .PHONY targets? These don't have an associated
+ * path. */
+ char *path;
Home |
Main Index |
Thread Index |
Old Index