home *** CD-ROM | disk | FTP | other *** search
/ Crawly Crypt Collection 1 / crawlyvol1.bin / program / compiler / sozobon / scsrc20 / make / h.h < prev    next >
C/C++ Source or Header  |  1988-10-13  |  3KB  |  162 lines

  1.     /***************************************************************\
  2.     *                                *
  3.     *  PDMAKE, Atari ST version                    *
  4.     *                                *
  5.     *  Adapted from mod.sources Vol 7 Issue 71, 1986-12-03.        *
  6.     *                                *
  7.     *  This port makes extensive use of the original net.sources    *
  8.     *  port by Jwahar Bammi.                    *
  9.     *                                *
  10.     *      Ton van Overbeek                        *
  11.     *      Email: TPC862@ESTEC.BITNET                *
  12.     *             TPC862%ESTEC.BITNET@WISCVM.WISC.EDU    (ARPA)    *
  13.     *             ...!mcvax!tpc862%estec.bitnet   (UUCP Europe)    *
  14.     *             ...!ucbvax!tpc862%estec.bitnet  (UUCP U.S.A.)    *
  15.     *             71450,3537  (CompuServe)                *
  16.     *                                *
  17.     \***************************************************************/
  18.  
  19. /*
  20.  *    Include header for make
  21.  */
  22.  
  23. #include <osbind.h>
  24.  
  25. #ifdef TRUE
  26. #undef TRUE
  27. #endif
  28.  
  29. #ifdef FALSE
  30. #undef FALSE
  31. #endif
  32.  
  33. #ifdef uchar
  34. #undef uchar
  35. #endif
  36.  
  37. #ifdef NULL
  38. #undef NULL
  39. #endif
  40. #define NULL    0L
  41.  
  42. #ifdef max
  43. #undef max
  44. #endif
  45.  
  46. #ifndef uchar
  47. #define uchar    unsigned char
  48. #endif
  49.  
  50. #define bool        uchar
  51. #define time_t        long
  52. #define TRUE        (1)
  53. #define FALSE        (0)
  54. #define max(a,b)    ((a)>(b)?(a):(b))
  55.  
  56. #define DEFN1    "makefile"        /*  Default names  */
  57. #ifdef unix
  58. #define DEFN2    "Makefile"
  59. #endif
  60. /* os9 and Atari ST are case insensitive */
  61.  
  62. #define LZ    (4096)            /*  Line size  */
  63.  
  64.  
  65.  
  66. /*
  67.  *    A name.  This represents a file, either to be made, or existant
  68.  */
  69.  
  70. struct name
  71. {
  72.     struct name *    n_next;        /* Next in the list of names */
  73.     char *        n_name;        /* Called */
  74.     struct line *    n_line;        /* Dependencies */
  75.     time_t        n_time;        /* Modify time of this name */
  76.     uchar        n_flag;        /* Info about the name */
  77. };
  78.  
  79. #define N_MARK        0x01        /* For cycle check */
  80. #define N_DONE        0x02        /* Name looked at */
  81. #define N_TARG        0x04        /* Name is a target */
  82. #define N_PREC        0x08        /* Target is precious */
  83. #define N_DOUBLE    0x10        /* Double colon target */
  84.  
  85. /*
  86.  *    Definition of a target line.
  87.  */
  88. struct line
  89. {
  90.     struct line *    l_next;        /* Next line (for ::) */
  91.     struct depend *    l_dep;        /* Dependents for this line */
  92.     struct cmd *    l_cmd;        /* Commands for this line */
  93. };
  94.  
  95.  
  96. /*
  97.  *    List of dependents for a line
  98.  */
  99. struct depend
  100. {
  101.     struct depend *    d_next;        /* Next dependent */
  102.     struct name *    d_name;        /* Name of dependent */
  103. };
  104.  
  105.  
  106. /*
  107.  *    Commands for a line
  108.  */
  109. struct cmd
  110. {
  111.     struct cmd *    c_next;        /* Next command line */
  112.     char *        c_cmd;        /* Command line */
  113. };
  114.  
  115.  
  116. /*
  117.  *    Macro storage
  118.  */
  119. struct macro
  120. {
  121.     struct macro *    m_next;        /* Next variable */
  122.     char *        m_name;        /* Called ... */
  123.     char *        m_val;        /* Its value */
  124.     uchar        m_flag;        /* Infinite loop check */
  125. };
  126.  
  127. extern char *        myname;
  128. extern struct name    namehead;
  129. extern struct macro *    macrohead;
  130. extern struct name *    firstname;
  131. extern bool    silent;
  132. extern bool    ignore;
  133. extern bool    rules;
  134. extern bool    dotouch;
  135. extern bool    quest;
  136. extern bool    domake;
  137. extern char    str1[];
  138. extern char    str2[];
  139. extern int    lineno;
  140.  
  141. char *        fgets();
  142. char *        strchr();
  143. char *        strrchr();
  144. char *        malloc();
  145. extern int    errno;
  146.  
  147. char *        getmacro();
  148. struct macro *    setmacro();
  149. void        input();
  150. void        error();
  151. void        fatal();
  152. int        make();
  153. struct name *        newname();
  154. struct depend *        newdep();
  155. struct cmd *        newcmd();
  156. void        newline();
  157. char *        suffix();
  158. void        touch();
  159. void        makerules();
  160. char *        gettok();
  161. void        precious();
  162.