home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / c / abmake14.arc / make.h < prev    next >
C/C++ Source or Header  |  1989-01-15  |  3KB  |  86 lines

  1. /*
  2.  * make.h
  3.  *
  4.  * 88-10-01 v1.0    created    by greg    yachuk,    placed in the public domain
  5.  * 88-10-06 v1.1    changed    prerequisite list handling
  6.  *
  7.  */
  8.  
  9. #define    MAXNEGTIME    0x80000000
  10.  
  11. #ifndef    TRUE
  12. #define    TRUE    (1)
  13. #define    FALSE    (!TRUE)
  14. #endif
  15.  
  16. #define    equal(s,t)            (!strcmp((s),(t)))
  17. #define    get_target(t)        hash_target((t), NULL)
  18. #define    get_file(f)            hash_file((f), NULL)
  19. #define    append_preq(t,p)    (fileptr*)append_node((char**)(t),(char**)(p),sizeof(fileptr*))
  20. #define    append_shell(t,s)    (shellptr*)append_node((char**)(t),(char**)(s),sizeof(shellptr*))
  21.  
  22. typedef    unsigned short t_mask;
  23.  
  24. typedef    struct targnode
  25. {
  26.     t_mask    tmask;                /* mask    to avoid string    compares */
  27.     struct targnode    *tnext;        /* next    target in global target    list */
  28.     struct filenode    *tfile;        /* file    node for this target */
  29.     struct filenode    **tpreq;    /* pre-req list    for this target    */
  30.     struct shellnode **tshell;    /* command list    for this target    */
  31. }    targnode, *targptr;
  32.  
  33. typedef    struct filenode
  34. {
  35.     t_mask    fmask;                /* mask    to avoid string    compares */
  36.     char   *fname;                /* name    of this    file (targ, preq...) */
  37.     long    ftime;                /* last    MODIFY time for    this file */
  38.     struct filenode    *fnext;        /* next    file node in global file list */
  39. }    filenode, *fileptr;
  40.  
  41. typedef    struct shellnode
  42. {
  43.     char   *scmd;                /* text    of command */
  44.     struct shellnode *snext;    /* next    shell node for a target    */
  45.     struct shellnode *slink;    /* next    shell node in global list */
  46.     unsigned char s_silent:1;    /* don't echo before executing */
  47.     unsigned char s_ignore:1;    /* ignore exit status */
  48.     unsigned char s_shell:1;    /* force spawning of command.com */
  49. }    shellnode, *shellptr;
  50.  
  51. typedef    struct symnode
  52. {
  53.     t_mask    smask;                /* mask    to avoid string    compares */
  54.     char   *sname;                /* name    of a symbol */
  55.     char   *svalue;                /* value of a symbol */
  56.     short    senv;                /* flag    environment variable */
  57.     struct symnode *snext;        /* next    symbol node in global list */
  58. }    symnode, *symptr;
  59.  
  60. extern targptr target_list;        /* global list of targets */
  61. extern fileptr file_list;        /* global list of file nodes */
  62. extern symptr  symbol_list;        /* global list of symbol nodes */
  63. extern shellptr    shell_list;        /* global list of shell    nodes */
  64.  
  65. extern targptr first_targ;        /* first target    (if nothing named) */
  66. extern targptr suffix_targ;        /* target node of ".SUFFIXES" */
  67.  
  68. extern short debug;                /* -d */
  69. extern short touchenv;            /* -e */
  70. extern short ignore;            /* -i */
  71. extern short single_ign;        /* -k */
  72. extern short noexec;            /* -n */
  73. extern short readdef;            /* -r */
  74. extern short silent;            /* -s */
  75. extern short touch;                /* -t */
  76. extern short display;            /* -D */
  77.  
  78. #ifndef    MSDOS
  79. char   *getenv();
  80. #define    P_WAIT        1
  81. #define    P_NOWAIT    2
  82. #define    P_OVERLAY    3
  83. #endif
  84.  
  85. #define    REGISTER    register
  86.