Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'jam-files/engine/rules.h')
-rw-r--r--jam-files/engine/rules.h77
1 files changed, 39 insertions, 38 deletions
diff --git a/jam-files/engine/rules.h b/jam-files/engine/rules.h
index 823fbd1f5..fe2792f43 100644
--- a/jam-files/engine/rules.h
+++ b/jam-files/engine/rules.h
@@ -10,20 +10,11 @@
* (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
*/
-#ifndef RULES_DWA_20011020_H
-#define RULES_DWA_20011020_H
-
-#include "modules.h"
-#include "jam.h"
-#include "function.h"
-
-
/*
* rules.h - targets, rules, and related information
*
- * This file describes the structures holding the targets, rules, and
- * related information accumulated by interpreting the statements
- * of the jam files.
+ * This file describes the structures holding the targets, rules, and related
+ * information accumulated by interpreting the statements of the jam files.
*
* The following are defined:
*
@@ -33,16 +24,16 @@
* SETTINGS - variables to set when executing a TARGET's ACTIONS.
* TARGETS - a chain of TARGETs.
* TARGET - an entity (e.g. a file) that can be built.
- *
- * 04/11/94 (seiwald) - Combined deps & headers into deps[2] in TARGET.
- * 04/12/94 (seiwald) - actionlist() now just appends a single action.
- * 06/01/94 (seiwald) - new 'actions existing' does existing sources
- * 12/20/94 (seiwald) - NOTIME renamed NOTFILE.
- * 01/19/95 (seiwald) - split DONTKNOW into CANTFIND/CANTMAKE.
- * 02/02/95 (seiwald) - new LEAVES modifier on targets.
- * 02/14/95 (seiwald) - new NOUPDATE modifier on targets.
*/
+#ifndef RULES_DWA_20011020_H
+#define RULES_DWA_20011020_H
+
+#include "function.h"
+#include "modules.h"
+#include "timestamp.h"
+
+
typedef struct _rule RULE;
typedef struct _target TARGET;
typedef struct _targets TARGETS;
@@ -146,19 +137,18 @@ struct _target
/* This flag was added to support a new built-in rule named "FAIL_EXPECTED" used
* to indicate that the result of running a given action should be inverted,
- * i.e. ok <=> fail. This is useful for launching certain test runs from a
- * Jamfile.
+ * i.e. ok <=> fail. Useful for launching certain test runs from a Jamfile.
*/
#define T_FLAG_FAIL_EXPECTED 0x0100 /* FAIL_EXPECTED applied */
#define T_FLAG_INTERNAL 0x0200 /* internal INCLUDES node */
-/* Indicates that the target must be a file. This prevents matching non-files,
- * like directories, when a target is searched.
+/* Indicates that the target must be a file. Prevents matching non-files, like
+ * directories, when a target is searched.
*/
#define T_FLAG_ISFILE 0x0400
-#define T_FLAG_PRECIOUS 0x0800
+#define T_FLAG_PRECIOUS 0x0800
char binding; /* how target relates to a real file or
* folder
@@ -178,8 +168,8 @@ struct _target
TARGET * original_target; /* original_target->includes = this */
char rescanned;
- time_t time; /* update time */
- time_t leaf; /* update time of leaf sources */
+ timestamp time; /* update time */
+ timestamp leaf; /* update time of leaf sources */
char fate; /* make0()'s diagnosis */
@@ -188,13 +178,13 @@ struct _target
#define T_FATE_STABLE 2 /* target did not need updating */
#define T_FATE_NEWER 3 /* target newer than parent */
-
+
#define T_FATE_SPOIL 4 /* >= SPOIL rebuilds parents */
#define T_FATE_ISTMP 4 /* unneeded temp target oddly present */
#define T_FATE_BUILD 5 /* >= BUILD rebuilds target */
#define T_FATE_TOUCHED 5 /* manually touched with -t */
-#define T_FATE_REBUILD 6
+#define T_FATE_REBUILD 6
#define T_FATE_MISSING 7 /* is missing, needs updating */
#define T_FATE_NEEDTMP 8 /* missing temp that must be rebuild */
#define T_FATE_OUTDATED 9 /* is out of date, needs updating */
@@ -225,9 +215,17 @@ struct _target
int asynccnt; /* child deps outstanding */
TARGETS * parents; /* used by make1() for completion */
+ TARGET * scc_root; /* used by make to resolve cyclic includes
+ */
+ TARGET * rescanning; /* used by make0 to mark visited targets
+ * when rescanning
+ */
+ int depth; /* The depth of the target in the make0
+ * stack.
+ */
char * cmds; /* type-punned command list */
- const char * failed;
+ char const * failed;
};
@@ -236,8 +234,8 @@ void action_free ( ACTION * );
ACTIONS * actionlist ( ACTIONS *, ACTION * );
void freeactions ( ACTIONS * );
SETTINGS * addsettings ( SETTINGS *, int flag, OBJECT * symbol, LIST * value );
-void pushsettings ( struct module_t * module, SETTINGS * );
-void popsettings ( struct module_t * module, SETTINGS * );
+void pushsettings ( module_t *, SETTINGS * );
+void popsettings ( module_t *, SETTINGS * );
SETTINGS * copysettings ( SETTINGS * );
void freesettings ( SETTINGS * );
void actions_refer( rule_actions * );
@@ -253,15 +251,18 @@ void rule_free ( RULE * );
/* Target related functions. */
void bind_explicitly_located_targets();
-TARGET * bindtarget ( OBJECT * target_name );
-TARGET * copytarget ( TARGET const * t );
+TARGET * bindtarget ( OBJECT * const );
void freetargets ( TARGETS * );
-TARGETS * targetchain ( TARGETS * chain, TARGETS * );
-TARGETS * targetentry ( TARGETS * chain, TARGET * );
-void target_include ( TARGET * including, TARGET * included );
-TARGETS * targetlist ( TARGETS * chain, LIST * target_names );
-void touch_target ( OBJECT * t );
+TARGETS * targetchain ( TARGETS *, TARGETS * );
+TARGETS * targetentry ( TARGETS *, TARGET * );
+void target_include ( TARGET * const including,
+ TARGET * const included );
+void target_include_many ( TARGET * const including,
+ LIST * const included_names );
+TARGETS * targetlist ( TARGETS *, LIST * target_names );
+void touch_target ( OBJECT * const );
void clear_includes ( TARGET * );
+TARGET * target_scc ( TARGET * );
/* Final module cleanup. */
void rules_done();