remake  4.3+dbg-1.5
Data Structures | Macros | Functions | Variables
filedef.h File Reference
#include "hash.h"
#include "gnuremake.h"
#include "types.h"

Go to the source code of this file.

Data Structures

struct  file
 

Macros

#define FILE_TIMESTAMP_STAT_MODTIME(fname, st)   file_timestamp_cons (fname, (st).st_mtime, (st).ST_MTIM_NSEC)
 
#define FILE_TIMESTAMPS_PER_S   (FILE_TIMESTAMP_HI_RES ? 1000000000 : 1)
 
#define FILE_TIMESTAMP_LO_BITS   (FILE_TIMESTAMP_HI_RES ? 30 : 0)
 
#define FILE_TIMESTAMP_S(ts)
 
#define FILE_TIMESTAMP_NS(ts)
 
#define FLOOR_LOG2_SECONDS_PER_YEAR   24
 
#define FILE_TIMESTAMP_PRINT_LEN_BOUND
 
#define file_mtime(f)   file_mtime_1 ((f), 1)
 
#define file_mtime_no_search(f)   file_mtime_1 ((f), 0)
 
#define file_mtime_1(f, v)   ((f)->last_mtime == UNKNOWN_MTIME ? f_mtime ((f), v) : (f)->last_mtime)
 
#define UNKNOWN_MTIME   0
 
#define NONEXISTENT_MTIME   1
 
#define OLD_MTIME   2
 
#define ORDINARY_MTIME_MIN   (OLD_MTIME + 1)
 
#define ORDINARY_MTIME_MAX
 
#define NEW_MTIME   INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)
 
#define check_renamed(file)   while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */
 

Functions

struct filelookup_file (const char *name)
 
struct fileenter_file (const char *name)
 
struct depsplit_prereqs (char *prereqstr)
 
struct depenter_prereqs (struct dep *prereqs, const char *stem)
 
struct depexpand_extra_prereqs (const struct variable *extra)
 
void remove_intermediates (int sig)
 
void snap_deps (void)
 
void rename_file (struct file *file, const char *name)
 
void rehash_file (struct file *file, const char *name)
 
void set_command_state (struct file *file, enum cmd_state state)
 
void notice_finished_file (struct file *file)
 
void init_hash_files (void)
 
void verify_file_data_base (void)
 
char * build_target_list (char *old_list)
 
void print_prereqs (const struct dep *deps)
 
void print_file_data_base (void)
 
int try_implicit_rule (struct file *file, unsigned int depth)
 
int stemlen_compare (const void *v1, const void *v2)
 
FILE_TIMESTAMP file_timestamp_cons (char const *, time_t, long int)
 
FILE_TIMESTAMP file_timestamp_now (int *)
 
void file_timestamp_sprintf (char *p, FILE_TIMESTAMP ts)
 
FILE_TIMESTAMP f_mtime (struct file *file, int search)
 

Variables

 us_success = 0
 
 us_none
 
 us_question
 
 us_failed
 
 cs_not_started = 0
 
 cs_deps_running
 
 cs_running
 
 cs_finished
 
struct filedefault_file
 
int snapped_deps
 

Macro Definition Documentation

◆ check_renamed

#define check_renamed (   file)    while ((file)->renamed != 0) (file) = (file)->renamed /* No ; here. */

◆ file_mtime

#define file_mtime (   f)    file_mtime_1 ((f), 1)

◆ file_mtime_1

#define file_mtime_1 (   f,
 
)    ((f)->last_mtime == UNKNOWN_MTIME ? f_mtime ((f), v) : (f)->last_mtime)

◆ file_mtime_no_search

#define file_mtime_no_search (   f)    file_mtime_1 ((f), 0)

◆ FILE_TIMESTAMP_LO_BITS

#define FILE_TIMESTAMP_LO_BITS   (FILE_TIMESTAMP_HI_RES ? 30 : 0)

◆ FILE_TIMESTAMP_NS

#define FILE_TIMESTAMP_NS (   ts)
Value:
((int) (((ts) - ORDINARY_MTIME_MIN) \
& ((1 << FILE_TIMESTAMP_LO_BITS) - 1)))
#define FILE_TIMESTAMP_LO_BITS
Definition: filedef.h:162
#define ORDINARY_MTIME_MIN
Definition: filedef.h:228

◆ FILE_TIMESTAMP_PRINT_LEN_BOUND

#define FILE_TIMESTAMP_PRINT_LEN_BOUND
Value:
* 302 / 1000) \
+ 1 + 1 + 4 + 25)
#define CHAR_BIT
Definition: make.h:151
#define FLOOR_LOG2_SECONDS_PER_YEAR
Definition: filedef.h:181
#define FILE_TIMESTAMP
Definition: make.h:252

◆ FILE_TIMESTAMP_S

#define FILE_TIMESTAMP_S (   ts)
Value:
(((ts) - ORDINARY_MTIME_MIN) \
#define FILE_TIMESTAMP_LO_BITS
Definition: filedef.h:162
#define ORDINARY_MTIME_MIN
Definition: filedef.h:228

◆ FILE_TIMESTAMP_STAT_MODTIME

#define FILE_TIMESTAMP_STAT_MODTIME (   fname,
  st 
)    file_timestamp_cons (fname, (st).st_mtime, (st).ST_MTIM_NSEC)

◆ FILE_TIMESTAMPS_PER_S

#define FILE_TIMESTAMPS_PER_S   (FILE_TIMESTAMP_HI_RES ? 1000000000 : 1)

◆ FLOOR_LOG2_SECONDS_PER_YEAR

#define FLOOR_LOG2_SECONDS_PER_YEAR   24

◆ NEW_MTIME

#define NEW_MTIME   INTEGER_TYPE_MAXIMUM (FILE_TIMESTAMP)

◆ NONEXISTENT_MTIME

#define NONEXISTENT_MTIME   1

◆ OLD_MTIME

#define OLD_MTIME   2

◆ ORDINARY_MTIME_MAX

#define ORDINARY_MTIME_MAX
Value:
#define FILE_TIMESTAMPS_PER_S
Definition: filedef.h:161
#define FILE_TIMESTAMP_S(ts)
Definition: filedef.h:164
#define FILE_TIMESTAMP_LO_BITS
Definition: filedef.h:162
#define ORDINARY_MTIME_MIN
Definition: filedef.h:228
#define NEW_MTIME
Definition: filedef.h:239

◆ ORDINARY_MTIME_MIN

#define ORDINARY_MTIME_MIN   (OLD_MTIME + 1)

◆ UNKNOWN_MTIME

#define UNKNOWN_MTIME   0

Function Documentation

◆ build_target_list()

char* build_target_list ( char *  old_list)

◆ enter_file()

struct file* enter_file ( const char *  name)

◆ enter_prereqs()

struct dep* enter_prereqs ( struct dep prereqs,
const char *  stem 
)

◆ expand_extra_prereqs()

struct dep* expand_extra_prereqs ( const struct variable extra)

◆ f_mtime()

FILE_TIMESTAMP f_mtime ( struct file file,
int  search 
)

◆ file_timestamp_cons()

FILE_TIMESTAMP file_timestamp_cons ( char const *  ,
time_t  ,
long  int 
)

Convert an external file timestamp to internal form.

◆ file_timestamp_now()

FILE_TIMESTAMP file_timestamp_now ( int *  )

Return the current time as a file timestamp, setting *RESOLUTION to its resolution.

◆ file_timestamp_sprintf()

void file_timestamp_sprintf ( char *  p,
FILE_TIMESTAMP  ts 
)

Place into the buffer P a printable representation of the file timestamp TS.

Parameters
poutput buffer for printable timestamp
tstimestamp to convert.

◆ init_hash_files()

void init_hash_files ( void  )

◆ lookup_file()

struct file* lookup_file ( const char *  name)

◆ notice_finished_file()

void notice_finished_file ( struct file file)

◆ print_file_data_base()

void print_file_data_base ( void  )

◆ print_prereqs()

void print_prereqs ( const struct dep deps)

◆ rehash_file()

void rehash_file ( struct file file,
const char *  name 
)

◆ remove_intermediates()

void remove_intermediates ( int  sig)

◆ rename_file()

void rename_file ( struct file file,
const char *  name 
)

◆ set_command_state()

void set_command_state ( struct file file,
enum cmd_state  state 
)

◆ snap_deps()

void snap_deps ( void  )

◆ split_prereqs()

struct dep* split_prereqs ( char *  prereqstr)

◆ stemlen_compare()

int stemlen_compare ( const void *  v1,
const void *  v2 
)

◆ try_implicit_rule()

int try_implicit_rule ( struct file file,
unsigned int  depth 
)

◆ verify_file_data_base()

void verify_file_data_base ( void  )

Variable Documentation

◆ cs_deps_running

cs_deps_running

◆ cs_finished

cs_finished

◆ cs_not_started

cs_not_started = 0

◆ cs_running

cs_running

◆ default_file

struct file* default_file

◆ snapped_deps

int snapped_deps

◆ us_failed

us_failed

◆ us_none

us_none

◆ us_question

us_question

◆ us_success

us_success = 0