X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-psi;a=blobdiff_plain;f=Makefile.frag;h=92a8d5410035efcec6fdabeedf78e69ba312d683;hp=589785dc23ec0b1bdf8260b23dc34ddefba18046;hb=077b151b807ea0704eb79761278bb4ca615a5344;hpb=a7ac1c0a3c855321f21682c127a4b707de33a303 diff --git a/Makefile.frag b/Makefile.frag index 589785d..92a8d54 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -1,10 +1,14 @@ -# provide headers in builddir, so they do not end up in /usr/include/ext/psi/src +# provide headers in builddir, so they do not end up in a "src" subdirectory PHP_PSI_HEADERS := $(addprefix $(PHP_PSI_BUILDDIR)/,$(PHP_PSI_HEADERS)) PHP_PSI_SOURCES := $(addprefix $(PHP_PSI_SRCDIR)/,$(PHP_PSI_SOURCES)) PHP_PSI_GENERATED:=$(addprefix $(PHP_PSI_SRCDIR)/,$(PHP_PSI_GENERATED)) +$(PHP_PSI_BUILDDIR)/calc: + mkdir -p $@ +$(PHP_PSI_BUILDDIR)/calc/%.h: $(PHP_PSI_SRCDIR)/src/calc/%.h | $(PHP_PSI_BUILDDIR)/calc + @cat >$@ <$< $(PHP_PSI_BUILDDIR)/types: mkdir -p $@ $(PHP_PSI_BUILDDIR)/types/%.h: $(PHP_PSI_SRCDIR)/src/types/%.h | $(PHP_PSI_BUILDDIR)/types @@ -81,8 +85,23 @@ psi-clean: psi-clean-depend psi-watch: -while inotifywait -q -e modify -r $(PHP_PSI_SRCDIR); do $(MAKE); done +.PHONY: psi-paranoid-backups +psi-paranoid-backups: + @-if test -z "$(REPO)"; then \ + echo; \ + echo "Usage: make psi-paranoid-backups REPO="; \ + echo; \ + else \ + echo "Watching $(PHP_PSI_SRCDIR) for changes to flush and push to $(REPO) ..."; \ + while inotifywait -q -e modify -r $(PHP_PSI_SRCDIR); do \ + git ci -am flush; \ + git push $(REPO); \ + done; \ + fi + install-headers: psi-build-headers clean: psi-clean-headers ifneq ($(PSI_DEPS),) clean: psi-clean-depend endif +