scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

make.h (1215B)


      1 #include <stddef.h>
      2 #include <time.h>
      3 
      4 typedef struct target Target;
      5 
      6 enum {
      7 	NOEXPORT,
      8 	EXPORT,
      9 };
     10 
     11 struct target {
     12 	char *name;
     13 	char *target;
     14 	char *req;
     15 	time_t stamp;
     16 	int defined;
     17 
     18 	int ndeps;
     19 	struct target **deps;
     20 
     21 	int nactions;
     22 	char **actions;
     23 
     24 	struct target *next;
     25 };
     26 
     27 extern void *emalloc(size_t);
     28 extern void *erealloc(void *, size_t);
     29 extern char *estrdup(char *);
     30 
     31 extern void dumprules(void);
     32 extern void dumpmacros(void);
     33 
     34 extern char *expandstring(char *, Target *);
     35 extern void addtarget(char *, int);
     36 extern void inject(char *);
     37 extern int build(char *);
     38 extern int hash(char *);
     39 extern int parse(char *);
     40 extern void debug(char *, ...);
     41 extern void error(char *, ...);
     42 extern void warning(char *, ...);
     43 extern void adddep(char *, char *);
     44 extern void addrule(char *, char **, int);
     45 
     46 extern char *getmacro(char *);
     47 extern void setmacro(char *, char *, int);
     48 
     49 /* system depdendant */
     50 extern time_t stamp(char *);
     51 extern int launch(char *, int);
     52 extern int putenv(char *);
     53 
     54 /* main.c */
     55 extern int kflag, dflag, nflag, iflag, sflag;
     56 extern int eflag, pflag, tflag, qflag;
     57 extern int exitstatus;
     58 
     59 #ifdef SIGABRT
     60 extern volatile sig_atomic_t stop;
     61 #endif
     62 
     63 /* defaults.c */
     64 extern char defaults[];