You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tcl.apache.org by pe...@apache.org on 2018/12/19 09:04:01 UTC

[tcl-rivet] branch master updated: CMake, regenerate pkgIndex.tcl

This is an automated email from the ASF dual-hosted git repository.

petasis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tcl-rivet.git


The following commit(s) were added to refs/heads/master by this push:
     new fd26cfe  CMake, regenerate pkgIndex.tcl
fd26cfe is described below

commit fd26cfe86221bed9bc73d51d42fd83982962547f
Author: petasis <pe...@yahoo.gr>
AuthorDate: Wed Dec 19 11:03:42 2018 +0200

    CMake, regenerate pkgIndex.tcl
---
 ChangeLog            |  5 +++++
 cmake/CMakeLists.txt | 17 +++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index ee52825..a01af7c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-12-19 Georgios Petasis <pe...@apache.org>
+    * cmake/CMakeLists.txt: Added support for regenerating pkgIndex.tcl in the
+    installation directory of rivetlib, after files have been installed.
+    This executes "tclsh".
+
 2018-12-17 Georgios Petasis <pe...@apache.org>
     * Readme.md: Added a separate badge for winbuild branch.
 
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 054a4d6..8c38ff8 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -482,3 +482,20 @@ install(DIRECTORY
      	${RIVET_LIB_DIR}/packages/session
      	${RIVET_LIB_DIR}/packages/tclrivet
         DESTINATION ${RIVETLIB_DESTDIR}/packages)
+
+#  Regenerate pkgIndex.tcl in all libraries...
+# ===========================================================================
+SET ( RIVET_LIBS_ARCH ${RIVETLIB_DESTDIR}/mpm )
+file(WRITE ${RIVETLIB_DESTDIR}/regenerate_pkgIndex.tcl
+"puts \"Regenerating pkgIndex.tcl in [pwd]:\"
+file delete {*}[glob [file join packages * pkgIndex.tcl]] pkgIndex.tcl
+pkg_mkIndex -verbose [pwd] init.tcl \\
+      {*}[glob [file join packages * *.tcl] \\
+      [file join ${RIVET_LIBS_ARCH} *[info sharedlibextension]]]"
+)
+install(CODE "
+  execute_process(COMMAND ${TCL_TCLSH} regenerate_pkgIndex.tcl
+                  WORKING_DIRECTORY ${RIVETLIB_DESTDIR})
+  file(REMOVE ${RIVETLIB_DESTDIR}/regenerate_pkgIndex.tcl)
+  "
+)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tcl.apache.org
For additional commands, e-mail: commits-help@tcl.apache.org