+ @if [ -f doxygen/latex/refman.tex ]; then \
+ echo "Creating $(THE_MANUAL)..."; \
+ $(MAKE) $(THE_MANUAL); \
+ else \
+ echo "Skipping Doxygen PDF..."; \
+ fi
+
+$(THE_MANUAL): %.pdf: %.tex
+ -cd $$(dirname $*) && pdflatex $$(basename $*)
+ -cd $$(dirname $*) && pdflatex $$(basename $*)
+
+TCL_PATH = tcl
+# command to find paths of script files, relative to TCL_PATH
+TCL_FILES = find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' -o -name '*.txt' | \
+ sed -e 's,^$(srcdir)/$(TCL_PATH),,'
+
+dist-hook:
+ if test -d $(srcdir)/.git -a \( ! -e $(distdir)/ChangeLog -o -w $(distdir)/ChangeLog \) ; then \
+ git --git-dir $(srcdir)/.git log | $(srcdir)/tools/git2cl/git2cl > $(distdir)/ChangeLog ; \
+ fi
+ for i in $$($(TCL_FILES)); do \
+ j="$(distdir)/$(TCL_PATH)/$$i" && \
+ mkdir -p "$$(dirname $$j)" && \
+ $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
+ done
+
+install-data-hook:
+ for i in $$($(TCL_FILES)); do \
+ j="$(DESTDIR)$(pkgdatadir)/scripts/$$i" && \
+ mkdir -p "$$(dirname $$j)" && \
+ $(INSTALL_DATA) $(srcdir)/$(TCL_PATH)/$$i $$j; \
+ done
+
+uninstall-hook:
+ rm -rf $(DESTDIR)$(pkgdatadir)/scripts