diff options
author | sebres <sebres@users.sourceforge.net> | 2019-01-21 01:49:57 (GMT) |
---|---|---|
committer | sebres <sebres@users.sourceforge.net> | 2019-01-21 01:49:57 (GMT) |
commit | 6c7d5918b35d24ea7d54fcb9d836855843f581f7 (patch) | |
tree | d43d06f26309f15d3c8d98045bfff557cb106a2b | |
parent | 3dd30ce854309c3433f211cacf5c430b9e8d0005 (diff) | |
download | tcl-6c7d5918b35d24ea7d54fcb9d836855843f581f7.zip tcl-6c7d5918b35d24ea7d54fcb9d836855843f581f7.tar.gz tcl-6c7d5918b35d24ea7d54fcb9d836855843f581f7.tar.bz2 |
speed up build process (preparing zip - creating of libtcl.vfs/tcl_library directory), use "ln" instead of "cp" if possible
-rw-r--r-- | unix/Makefile.in | 15 | ||||
-rw-r--r-- | win/Makefile.in | 28 |
2 files changed, 32 insertions, 11 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index b9c347e..34a38d2 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -680,13 +680,20 @@ tclzipfile: ${TCL_ZIP_FILE} ${TCL_ZIP_FILE}: ${ZIP_INSTALL_OBJS} @rm -rf ${TCL_VFS_ROOT} @mkdir -p ${TCL_VFS_PATH} - cp -a $(TOP_DIR)/library/* ${TCL_VFS_PATH} - cp -a ${TCL_VFS_PATH}/manifest.txt ${TCL_VFS_PATH}/pkgIndex.tcl - find ${TCL_VFS_ROOT} -type d -empty -delete + @echo "creating ${TCL_VFS_PATH} (prepare compression)" + @( \ + ln -st ${TCL_VFS_PATH} $(TOP_DIR)/library/* && \ + ln ${TCL_VFS_PATH}/manifest.txt ${TCL_VFS_PATH}/pkgIndex.tcl \ + ) || ( \ + cp -a $(TOP_DIR)/library/* ${TCL_VFS_PATH}; \ + cp -a ${TCL_VFS_PATH}/manifest.txt ${TCL_VFS_PATH}/pkgIndex.tcl; \ + ) + @find ${TCL_VFS_ROOT} -type d -empty -delete (zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \ (echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \ cd ${TCL_VFS_ROOT} && \ - $$zip ${ZIP_PROG_OPTIONS} ../${TCL_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} && \ + $$zip ${ZIP_PROG_OPTIONS} ../${TCL_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} >/dev/null && \ + echo "${TCL_ZIP_FILE} successful created with $$zip" && \ cd ..) # The following target is configured by autoconf to generate either a shared diff --git a/win/Makefile.in b/win/Makefile.in index aa54377..50e679c 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -208,6 +208,7 @@ MKDIR = mkdir -p SHELL = @SHELL@ RM = rm -f COPY = cp +LN = ln ### # Tip 430 - ZipFS Modifications @@ -518,16 +519,29 @@ doc: tclzipfile: ${TCL_ZIP_FILE} ${TCL_ZIP_FILE}: ${ZIP_INSTALL_OBJS} ${DDE_DLL_FILE} ${REG_DLL_FILE} - rm -rf ${TCL_VFS_ROOT} - mkdir -p ${TCL_VFS_PATH} - $(COPY) -a $(TOP_DIR)/library/* ${TCL_VFS_PATH} - $(COPY) -a ${TCL_VFS_PATH}/manifest.txt ${TCL_VFS_PATH}/pkgIndex.tcl - $(COPY) ${DDE_DLL_FILE} ${TCL_VFS_PATH}/dde - $(COPY) ${REG_DLL_FILE} ${TCL_VFS_PATH}/reg + @rm -rf ${TCL_VFS_ROOT} + @mkdir -p ${TCL_VFS_PATH} + @echo "creating ${TCL_VFS_PATH} (prepare compression)" + @( \ + $(LN) -t ${TCL_VFS_PATH}/ $$(find $(TOP_DIR)/library/* -maxdepth 0 -type f) && \ + (for D in $$(find $(TOP_DIR)/library/* -maxdepth 0 -type d); do \ + mkdir -p "${TCL_VFS_PATH}/$$(basename $$D)"; \ + $(LN) -st ${TCL_VFS_PATH}/$$(basename $$D) $$D/*; \ + done) && \ + $(LN) ${TCL_VFS_PATH}/manifest.txt ${TCL_VFS_PATH}/pkgIndex.tcl && \ + $(LN) ${DDE_DLL_FILE} ${TCL_VFS_PATH}/dde && \ + $(LN) ${REG_DLL_FILE} ${TCL_VFS_PATH}/reg \ + ) || ( \ + $(COPY) -a $(TOP_DIR)/library/* ${TCL_VFS_PATH}; \ + $(COPY) -a ${TCL_VFS_PATH}/manifest.txt ${TCL_VFS_PATH}/pkgIndex.tcl; \ + $(COPY) ${DDE_DLL_FILE} ${TCL_VFS_PATH}/dde; \ + $(COPY) ${REG_DLL_FILE} ${TCL_VFS_PATH}/reg; \ + ) (zip=`(realpath '${NATIVE_ZIP}' || readlink -m '${NATIVE_ZIP}') 2>/dev/null || \ (echo '${NATIVE_ZIP}' | sed "s?^\./?$$(pwd)/?")`; \ cd ${TCL_VFS_ROOT} && \ - $$zip ${ZIP_PROG_OPTIONS} ../${TCL_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} && \ + $$zip ${ZIP_PROG_OPTIONS} ../${TCL_ZIP_FILE} ${ZIP_PROG_VFSSEARCH} >/dev/null && \ + echo "${TCL_ZIP_FILE} successful created with $$zip" && \ cd ..) $(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) |