X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=Makefile.frag;h=65e5ed7751993fdbe4d12d2ad660e5350d57dfc0;hb=de4f7cc512bbffb5e71290ac48e659dae5e9601d;hp=e904edfccb1ef8b631a5a2c7883d4f0e2deb6887;hpb=3b0b651ea1b555d8d023e45b43e5eb93b23d00a1;p=m6w6%2Fext-psi diff --git a/Makefile.frag b/Makefile.frag index e904edf..65e5ed7 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -61,15 +61,25 @@ $(PHP_PSI_SRCDIR)/src/parser.c: $(PHP_PSI_SRCDIR)/src/parser.re $(PHP_PSI_SRCDIR)/src/types/decl.c: $(PHP_PSI_SRCDIR)/php_psi_macros.h $(PHP_PSI_SRCDIR)/php_psi_redirs.h $(PHP_PSI_SRCDIR)/src/context.c: $(PHP_PSI_SRCDIR)/php_psi_consts.h $(PHP_PSI_SRCDIR)/php_psi_decls.h $(PHP_PSI_SRCDIR)/php_psi_fn_decls.h $(PHP_PSI_SRCDIR)/php_psi_structs.h $(PHP_PSI_SRCDIR)/php_psi_types.h $(PHP_PSI_SRCDIR)/php_psi_unions.h $(PHP_PSI_SRCDIR)/php_psi_va_decls.h -PHP_PSI_DEPEND = $(PHP_PSI_BUILDDIR)/Makefile.deps +# -- deps -depend: psi-depend -.PHONY: psi-depend -psi-depend: $(PHP_PSI_DEPEND) +PHP_PSI_DEPEND = $(PHP_PSI_SOURCES:.c=.d) -$(PHP_PSI_DEPEND): $(PHP_PSI_SOURCES) - $(CC) -MM -MG $(CPPFLAGS) $(DEFS) $(INCLUDES) $^ \ - | $(SED) -e 's/^\(.*\).o: /\1.lo: /' \ - > $@ +.PHONY: psi-clean-depend +psi-clean-depend: + -rm -f $(PHP_PSI_DEPEND) +psi-clean: psi-clean-depend + +%.d: %.c + $(CC) -MM -MG -MF $@ -MT $(patsubst $(PHP_PSI_SRCDIR)/%,$(PHP_PSI_BUILDDIR)/%,$(@:.d=.lo)) \ + $(CPPFLAGS) $(DEFS) $(INCLUDES) $< \ + || touch $@ + +DEPS = +ifneq ($(DEPS),) -include $(PHP_PSI_DEPEND) +endif + + +# -- deps