From 140d6c8e7948710a764965075bfaa700efd09802 Mon Sep 17 00:00:00 2001 From: zwelch Date: Wed, 27 May 2009 06:44:43 +0000 Subject: Move TCL script files -- Step 1 of 2: - Move src/target/{interface,target,board,test}/ into src/tcl/ - Remove existing rules in src/Makefile.am and src/target/Makefile.am. - Add Makefile.am handling of *.cfg and *.tcl files in top Makefile.am: - Add dist-hook to include such files under src/tcl in the distribution. - Add install-data-hook to install contents of '$(top_srcdir)/src/tcl/'. - Add uninstall-hook to remove the installed script files. - Change paths to (un)install script files in '$(pkgdatadir)/scripts'. git-svn-id: svn://svn.berlios.de/openocd/trunk@1918 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- Makefile.am | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'Makefile.am') diff --git a/Makefile.am b/Makefile.am index c14c81f6..431244b3 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 -- cgit v1.2.3