- cat >$PHP_PSI_BUILDDIR/php_psi.dep <<EOF
-\$(PHP_PSI_SRCDIR)/php_psi.h:
-php_psi.h:
-\$(PHP_PSI_SRCDIR)/php_psi_stdinc.h:
-php_psi_stdinc.h:
-EOF
- for i in $PSI_STDTYPES $PSI_TYPES $PSI_STRUCTS $PSI_UNIONS $PSI_CONSTS $PSI_REDIRS $PSI_MACROS $PSI_DECLS $PSI_VA_DECLS $PSI_FN_DECLS; do
- cat >>$PHP_PSI_BUILDDIR/php_psi.dep <<EOF
-$i:
-$(basename $i):
-EOF
- cat >$i <<EOF
-/* generated by configure */
-#include "php_psi_stdinc.h"
-EOF
- done
- cat >>$PSI_STDTYPES <<EOF
-static struct psi_std_type {
- token_t type_tag;
- const char *type_name;
- const char *alias;
-} psi_std_types@<:@@:>@ = {
- {PSI_T_INT8, "int8_t", NULL},
- {PSI_T_INT16, "int16_t", NULL},
- {PSI_T_INT32, "int32_t", NULL},
- {PSI_T_INT64, "int64_t", NULL},
- {PSI_T_UINT8, "uint8_t", NULL},
- {PSI_T_UINT16, "uint16_t", NULL},
- {PSI_T_UINT32, "uint32_t", NULL},
- {PSI_T_UINT64, "uint64_t", NULL},
-EOF
- cat >>$PSI_TYPES <<EOF
-static struct psi_predef_type {
- token_t type_tag;
- const char *type_name;
- const char *alias;
-} psi_predef_types@<:@@:>@ = {
-EOF
- cat >>$PSI_STRUCTS <<EOF
-static struct psi_predef_struct {
- token_t type_tag;
- const char *type_name;
- const char *var_name;
- size_t offset;
- size_t size;
- size_t pointer_level;
- size_t array_size;
-} psi_predef_structs@<:@@:>@ = {
-EOF
- cat >>$PSI_UNIONS <<EOF
-static struct psi_predef_union {
- token_t type_tag;
- const char *type_name;
- const char *var_name;
- size_t offset;
- size_t size;
- size_t pointer_level;
- size_t array_size;
-} psi_predef_unions@<:@@:>@ = {
-EOF
- cat >>$PSI_CONSTS <<EOF
-static struct psi_predef_const {
- token_t type_tag;
- const char *type_name;
- const char *var_name;
- const char *val_text;
- token_t val_type_tag;
-} psi_predef_consts@<:@@:>@ = {
-EOF
- cat >>$PSI_REDIRS <<EOF
-typedef void (*psi_func_ptr)();
-static struct psi_func_redir {
- const char *name;
- psi_func_ptr func;
-} psi_func_redirs@<:@@:>@ = {
-EOF
- cat >>$PSI_MACROS <<EOF
-EOF
- cat >>$PSI_DECLS <<EOF
-static struct psi_predef_decl {
- token_t type_tag;
- const char *type_name;
- const char *var_name;
- size_t pointer_level;
- size_t array_size;
-} psi_predef_decls@<:@@:>@ = {
-EOF
- cat >>$PSI_VA_DECLS <<EOF
-static struct psi_predef_decl psi_predef_vararg_decls@<:@@:>@ = {
-EOF
- cat >>$PSI_FN_DECLS <<EOF
-static struct psi_predef_decl psi_predef_functor_decls@<:@@:>@ = {
-EOF