VirtualBox

Changeset 3138 in kBuild for vendor/gnumake/current/filedef.h


Ignore:
Timestamp:
Mar 12, 2018 7:32:29 PM (7 years ago)
Author:
bird
Message:

Imported make 4.2.1 (2e55f5e4abdc0e38c1d64be703b446695e70b3b6) from https://git.savannah.gnu.org/git/make.git.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vendor/gnumake/current/filedef.h

    r2596 r3138  
    11/* Definition of target file data structures for GNU Make.
    2 Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
    3 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
    4 2010 Free Software Foundation, Inc.
     2Copyright (C) 1988-2016 Free Software Foundation, Inc.
    53This file is part of GNU Make.
    64
     
    2018/* Structure that represents the info on one file
    2119   that the makefile says how to make.
    22    All of these are chained together through `next'.  */
     20   All of these are chained together through 'next'.  */
    2321
    2422#include "hash.h"
     
    2927    const char *hname;          /* Hashed filename */
    3028    const char *vpath;          /* VPATH/vpath pathname */
    31     struct dep *deps;           /* all dependencies, including duplicates */
    32     struct commands *cmds;      /* Commands to execute for this target.  */
    33     int command_flags;          /* Flags OR'd in for cmds; see commands.h.  */
    34     const char *stem;           /* Implicit stem, if an implicit
     29    struct dep *deps;           /* all dependencies, including duplicates */
     30    struct commands *cmds;      /* Commands to execute for this target.  */
     31    const char *stem;           /* Implicit stem, if an implicit
    3532                                   rule has been used */
    36     struct dep *also_make;      /* Targets that are made by making this.  */
    37     FILE_TIMESTAMP last_mtime;  /* File's modtime, if already known.  */
    38     FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
    39                                            has been performed.  */
    40     struct file *prev;          /* Previous entry for same file name;
    41                                    used when there are multiple double-colon
    42                                    entries for the same file.  */
     33    struct dep *also_make;      /* Targets that are made by making this.  */
     34    struct file *prev;          /* Previous entry for same file name;
     35                                   used when there are multiple double-colon
     36                                   entries for the same file.  */
    4337    struct file *last;          /* Last entry for the same file name.  */
    4438
    4539    /* File that this file was renamed to.  After any time that a
    46        file could be renamed, call `check_renamed' (below).  */
     40       file could be renamed, call 'check_renamed' (below).  */
    4741    struct file *renamed;
    4842
     
    6256    struct file *double_colon;
    6357
    64     short int update_status;    /* Status of the last attempt to update,
    65                                    or -1 if none has been made.  */
    66 
    67     enum cmd_state              /* State of the commands.  */
    68       {         /* Note: It is important that cs_not_started be zero.  */
    69         cs_not_started,         /* Not yet started.  */
    70         cs_deps_running,        /* Dep commands running.  */
    71         cs_running,             /* Commands running.  */
    72         cs_finished             /* Commands finished.  */
     58    FILE_TIMESTAMP last_mtime;  /* File's modtime, if already known.  */
     59    FILE_TIMESTAMP mtime_before_update; /* File's modtime before any updating
     60                                           has been performed.  */
     61    unsigned int considered;    /* equal to 'considered' if file has been
     62                                   considered on current scan of goal chain */
     63    int command_flags;          /* Flags OR'd in for cmds; see commands.h.  */
     64    enum update_status          /* Status of the last attempt to update.  */
     65      {
     66        us_success = 0,         /* Successfully updated.  Must be 0!  */
     67        us_none,                /* No attempt to update has been made.  */
     68        us_question,            /* Needs to be updated (-q is is set).  */
     69        us_failed               /* Update failed.  */
     70      } update_status ENUM_BITFIELD (2);
     71    enum cmd_state              /* State of the commands.  */
     72      {
     73        cs_not_started = 0,     /* Not yet started.  Must be 0!  */
     74        cs_deps_running,        /* Dep commands running.  */
     75        cs_running,             /* Commands running.  */
     76        cs_finished             /* Commands finished.  */
    7377      } command_state ENUM_BITFIELD (2);
    7478
    75     unsigned int precious:1;    /* Non-0 means don't delete file on quit */
    76     unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp
    77                                            has only one-second resolution.  */
     79    unsigned int builtin:1;     /* True if the file is a builtin rule. */
     80    unsigned int precious:1;    /* Non-0 means don't delete file on quit */
     81    unsigned int loaded:1;      /* True if the file is a loaded object. */
     82    unsigned int low_resolution_time:1; /* Nonzero if this file's time stamp
     83                                           has only one-second resolution.  */
    7884    unsigned int tried_implicit:1; /* Nonzero if have searched
    79                                       for implicit rule for making
    80                                       this file; don't search again.  */
    81     unsigned int updating:1;    /* Nonzero while updating deps of this file */
    82     unsigned int updated:1;     /* Nonzero if this file has been remade.  */
    83     unsigned int is_target:1;   /* Nonzero if file is described as target.  */
    84     unsigned int cmd_target:1;  /* Nonzero if file was given on cmd line.  */
    85     unsigned int phony:1;       /* Nonzero if this is a phony file
    86                                    i.e., a prerequisite of .PHONY.  */
     85                                      for implicit rule for making
     86                                      this file; don't search again.  */
     87    unsigned int updating:1;    /* Nonzero while updating deps of this file */
     88    unsigned int updated:1;     /* Nonzero if this file has been remade.  */
     89    unsigned int is_target:1;   /* Nonzero if file is described as target.  */
     90    unsigned int cmd_target:1;  /* Nonzero if file was given on cmd line.  */
     91    unsigned int phony:1;       /* Nonzero if this is a phony file
     92                                   i.e., a prerequisite of .PHONY.  */
    8793    unsigned int intermediate:1;/* Nonzero if this is an intermediate file.  */
    8894    unsigned int secondary:1;   /* Nonzero means remove_intermediates should
    8995                                   not delete it.  */
    90     unsigned int dontcare:1;    /* Nonzero if no complaint is to be made if
    91                                    this target cannot be remade.  */
     96    unsigned int dontcare:1;    /* Nonzero if no complaint is to be made if
     97                                   this target cannot be remade.  */
    9298    unsigned int ignore_vpath:1;/* Nonzero if we threw out VPATH name.  */
    9399    unsigned int pat_searched:1;/* Nonzero if we already searched for
    94100                                   pattern-specific variables.  */
    95     unsigned int considered:1;  /* equal to 'considered' if file has been
    96                                    considered on current scan of goal chain */
    97101    unsigned int no_diag:1;     /* True if the file failed to update and no
    98102                                   diagnostics has been issued (dontcare). */
     
    100104
    101105
    102 extern struct file *suffix_file, *default_file;
     106extern struct file *default_file;
    103107
    104108
     
    114118void notice_finished_file (struct file *file);
    115119void init_hash_files (void);
     120void verify_file_data_base (void);
    116121char *build_target_list (char *old_list);
    117122void print_prereqs (const struct dep *deps);
    118123void print_file_data_base (void);
     124int try_implicit_rule (struct file *file, unsigned int depth);
     125int stemlen_compare (const void *v1, const void *v2);
    119126
    120127#if FILE_TIMESTAMP_HI_RES
    121128# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
    122     file_timestamp_cons (fname, (st).st_mtime, (st).st_mtim.ST_MTIM_NSEC)
     129    file_timestamp_cons (fname, (st).st_mtime, (st).ST_MTIM_NSEC)
    123130#else
    124131# define FILE_TIMESTAMP_STAT_MODTIME(fname, st) \
     
    135142
    136143#define FILE_TIMESTAMP_S(ts) (((ts) - ORDINARY_MTIME_MIN) \
    137                               >> FILE_TIMESTAMP_LO_BITS)
     144                              >> FILE_TIMESTAMP_LO_BITS)
    138145#define FILE_TIMESTAMP_NS(ts) ((int) (((ts) - ORDINARY_MTIME_MIN) \
    139                                       & ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
     146                                      & ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
    140147
    141148/* Upper bound on length of string "YYYY-MM-DD HH:MM:SS.NNNNNNNNN"
    142    representing a file timestamp.  The upper bound is not necessarily 19,
     149   representing a file timestamp.  The upper bound is not necessarily 29,
    143150   since the year might be less than -999 or greater than 9999.
    144151
     
    157164   + 1 + 1 + 4 + 25)
    158165
    159 FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, int);
     166FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, long int);
    160167FILE_TIMESTAMP file_timestamp_now (int *);
    161168void file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts);
     
    188195#define ORDINARY_MTIME_MIN (OLD_MTIME + 1)
    189196#define ORDINARY_MTIME_MAX ((FILE_TIMESTAMP_S (NEW_MTIME) \
    190                              << FILE_TIMESTAMP_LO_BITS) \
    191                             + ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
    192 
    193 /* Modtime value to use for `infinitely new'.  We used to get the current time
    194    from the system and use that whenever we wanted `new'.  But that causes
     197                             << FILE_TIMESTAMP_LO_BITS) \
     198                            + ORDINARY_MTIME_MIN + FILE_TIMESTAMPS_PER_S - 1)
     199
     200/* Modtime value to use for 'infinitely new'.  We used to get the current time
     201   from the system and use that whenever we wanted 'new'.  But that causes
    195202   trouble when the machine running make and the machine holding a file have
    196    different ideas about what time it is; and can also lose for `force'
     203   different ideas about what time it is; and can also lose for 'force'
    197204   targets, which need to be considered newer than anything that depends on
    198205   them, even if said dependents' modtimes are in the future.  */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette