]> git.sur5r.net Git - openocd/blobdiff - Makefile.am
First step in hiding target_type_s from public interface:
[openocd] / Makefile.am
index c14c81f674176ea65fc35aeed9446c1aaa2e49cf..245b5e7f4defd9fb5845b238c7a93146a1a51dfa 100644 (file)
@@ -29,6 +29,29 @@ doxygen::
        $(MAKE) Doxyfile
        doxygen Doxyfile 2>&1 | perl $(srcdir)/tools/logger.pl > doxygen.log
 
+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' | \
+               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