gcc44: Update version from 4.4.6-RELEASE to 4.4.7-20111025
[dragonfly.git] / gnu / usr.bin / cc44 / cc_prep / Makefile
1 .include "../Makefile.inc"
2 .include "../Makefile.langs"
3
4 CONTRIBDIR=     ${GCCDIR}/gcc
5
6 version.c: ${CONTRIBDIR}/version.c Makefile ../Makefile.inc
7         > ${.TARGET}
8         echo '#define BASEVER "${GCCCOMPLETEVER}"' >> ${.TARGET}
9         echo '#define DATESTAMP " ${GCCDATESTAMP}"' >> ${.TARGET}
10         echo '#define DEVPHASE ""' >> ${.TARGET}
11         echo '#define REVISION ""' >> ${.TARGET}
12         echo '#define PKGVERSION "(DragonFly) "' >> ${.TARGET}
13         echo '#define BUGURL "<http://bugs.dragonflybsd.org>"' >> ${.TARGET}
14         cat ${.ALLSRC:M*.c} >> ${.TARGET}
15
16 configargs.h: Makefile
17         echo '/* Generated automatically. */'           > ${.TARGET}
18         echo 'static const char configuration_arguments[] = '   >> ${.TARGET}
19         echo '  "DragonFly/${TARGET_ARCH} system compiler";'    >> ${.TARGET}
20         echo 'static const char thread_model[] = "posix";'      >> ${.TARGET}
21         echo                                            >> ${.TARGET}
22         echo 'static const struct {'                    >> ${.TARGET}
23         echo '  const char *name, *value;'              >> ${.TARGET}
24         echo '} configure_default_options[] ='          >> ${.TARGET}
25         echo '{ { NULL, NULL} };'                       >> ${.TARGET}
26
27 bconfig.h:
28         echo '#ifndef GCC_BCONFIG_H'                    > ${.TARGET}
29         echo '#define GCC_BCONFIG_H'                    >> ${.TARGET}
30         echo '#include "auto-host.h"'                   >> ${.TARGET}
31         echo '#ifdef IN_GCC'                            >> ${.TARGET}
32         echo '# include "ansidecl.h"'                   >> ${.TARGET}
33         echo '#endif'                                   >> ${.TARGET}
34         echo '#endif /* GCC_BCONFIG_H */'               >> ${.TARGET}
35
36 tm.h:
37         echo '#ifndef GCC_TM_H'                         > ${.TARGET}
38         echo '#define GCC_TM_H'                         >> ${.TARGET}
39         echo '#ifdef IN_GCC'                            >> ${.TARGET}
40 .for H in ${TARGET_INC}
41         echo '#include "$H"'                            >> ${.TARGET}
42 .endfor
43         echo '#if !defined GENERATOR_FILE && !defined USED_FOR_TARGET' >> ${.TARGET}
44         echo '# include "insn-constants.h"'             >> ${.TARGET}
45         echo '# include "insn-flags.h"'                 >> ${.TARGET}
46         echo '#endif'                                   >> ${.TARGET}
47         echo '#endif'                                   >> ${.TARGET}
48         echo '#endif /* GCC_TM_H */'                    >> ${.TARGET}
49
50 tm_p.h:
51         echo '#ifndef GCC_TM_P_H'                       > ${.TARGET}
52         echo '#define GCC_TM_P_H'                       >> ${.TARGET}
53         echo '#ifdef IN_GCC'                            >> ${.TARGET}
54         echo '#include "config/${GCC_CPU}/${GCC_CPU}-protos.h"' >> ${.TARGET}
55         echo '#include "tm-preds.h"'                    >> ${.TARGET}
56         echo '#endif'                                   >> ${.TARGET}
57         echo '#endif /* GCC_TM_P_H */'                  >> ${.TARGET}
58
59 optionlist: ${optionsfiles} Makefile
60         /usr/bin/awk -f ${GCCDIR}/gcc/opt-gather.awk ${optionsfiles} > optionlist
61
62 options.c: optionlist
63         /usr/bin/awk -f ${GCCDIR}/gcc/opt-functions.awk -f ${GCCDIR}/gcc/optc-gen.awk \
64                 -v header_name="config.h system.h coretypes.h tm.h" < optionlist > options.c
65
66 options.h: optionlist
67         /usr/bin/awk -f ${GCCDIR}/gcc/opt-functions.awk -f ${GCCDIR}/gcc/opth-gen.awk \
68                 < optionlist > options.h
69
70 specs.h:
71         rm -f ${.TARGET}
72         touch ${.TARGET}
73 .for F in ${LANG_SPECS_FILES}
74         echo "#include \"${F}\"" >> ${.TARGET}
75 .endfor
76
77 all-tree.def:
78         rm -f ${.TARGET}
79         echo '#include "tree.def"' >> ${.TARGET}
80         echo 'END_OF_BASE_TREE_CODES' >> ${.TARGET}
81         echo '#include "c-common.def"' >> ${.TARGET}
82 .for F in ${lang_tree_files}
83         echo '#include "$F"' >> ${.TARGET}
84 .endfor
85
86 CLEANFILES+=    version.c configargs.h bconfig.h tm.h tm_p.h
87 CLEANFILES+=    options.c options.h optionlist
88 CLEANFILES+=    specs.h all-tree.def
89
90 # keep this order!
91 afterdepend: version.c configargs.h bconfig.h tm.h tm_p.h options.h options.c
92 afterdepend: specs.h all-tree.def
93
94 .include <bsd.prog.mk>