/token.h
/types.h
/types/
-*.d
+*.dep
# -- deps
-PHP_PSI_DEPEND = $(PHP_PSI_SOURCES:.c=.d)
+PHP_PSI_DEPEND = $(patsubst $(PHP_PSI_SRCDIR)/%,$(PHP_PSI_BUILDDIR)/%,$(PHP_PSI_SOURCES:.c=.dep))
.PHONY: psi-clean-depend
psi-clean-depend:
- -rm -f $(PHP_PSI_DEPEND)
+ -rm -f $(PHP_PSI_DEPEND) $(PHP_PSI_BUILDDIR)/php_psi.dep
psi-clean: psi-clean-depend
-%.d: %.c
- $(CC) -MM -MG -MF $@ -MT $(patsubst $(PHP_PSI_SRCDIR)/%,$(PHP_PSI_BUILDDIR)/%,$(@:.d=.lo)) \
+$(PHP_PSI_BUILDDIR)/%.dep: $(PHP_PSI_SRCDIR)/%.c
+ $(CC) -MM -MG -MF $@ -MT $(patsubst $(PHP_PSI_SRCDIR)/%,$(PHP_PSI_BUILDDIR)/%,$(@:.dep=.lo)) \
$(CPPFLAGS) $(DEFS) $(INCLUDES) $< \
|| touch $@
DEPS =
ifneq ($(DEPS),)
-include $(PHP_PSI_DEPEND)
+-include $(PHP_PSI_BUILDDIR)/php_psi.dep
endif
AC_DEFINE_UNQUOTED([PSI_DECLS], ["$PSI_DECLS"], [Predefined functions])
AC_DEFINE_UNQUOTED([PSI_VA_DECLS], ["$PSI_VA_DECLS"], [Predefined vararg functions])
+ PHP_ADD_INCLUDE($PHP_PSI_SRCDIR)
PHP_ADD_INCLUDE($PHP_PSI_SRCDIR/src)
PHP_ADD_INCLUDE($PHP_PSI_SRCDIR/src/types)
PHP_ADD_BUILD_DIR($PHP_PSI_BUILDDIR/src)
dnl These headers are included by src/context.c.
dnl This macro must be called prior any checks for a type, struct, decl etc.
AC_DEFUN(PSI_CONFIG_INIT, [
+ 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"
void psi_call_frame_free(struct psi_call_frame *frame);
-
#endif