X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=Makefile.am;h=431244b30748f81aeaeadfaadc2f268fee473eb5;hp=c14c81f674176ea65fc35aeed9446c1aaa2e49cf;hb=140d6c8e7948710a764965075bfaa700efd09802;hpb=7c0e823d0a57df99adc5b1b7975406bfd9e0d9fb diff --git a/Makefile.am b/Makefile.am index c14c81f674..431244b307 100644 --- a/Makefile.am +++ b/Makefile.am @@ -29,6 +29,29 @@ doxygen:: $(MAKE) Doxyfile doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log +TCL_PATH = src/tcl +# command to find paths of script files, relative to TCL_PATH +TCL_FILES := find $(srcdir)/$(TCL_PATH) -name '*.cfg' -o -name '*.tcl' | \ + sed -e 's,^$(srcdir)/$(TCL_PATH),,' + +dist-hook: + 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 + + distclean-local: rm -rf Doxyfile doxygen