diff options
-rw-r--r-- | .github/workflows/onefiledist.yml | 20 | ||||
-rw-r--r-- | generic/tclPkgConfig.c | 3 | ||||
-rw-r--r-- | generic/tclZipfs.c | 18 | ||||
-rw-r--r-- | library/auto.tcl | 206 | ||||
-rw-r--r-- | library/manifest.txt | 2 | ||||
-rw-r--r-- | library/platform/pkgIndex.tcl | 2 | ||||
-rw-r--r-- | library/platform/platform.tcl | 10 | ||||
-rw-r--r-- | macosx/GNUmakefile | 2 | ||||
-rw-r--r-- | tests/config.test | 2 | ||||
-rw-r--r-- | tests/fileName.test | 4 | ||||
-rw-r--r-- | tests/zipfs.test | 7 | ||||
-rw-r--r-- | unix/Makefile.in | 30 | ||||
-rwxr-xr-x | unix/configure | 75 | ||||
-rw-r--r-- | unix/configure.ac | 7 | ||||
-rw-r--r-- | unix/tcl.m4 | 70 | ||||
-rw-r--r-- | unix/tcl.pc.in | 1 | ||||
-rw-r--r-- | win/Makefile.in | 23 | ||||
-rwxr-xr-x | win/configure | 45 | ||||
-rw-r--r-- | win/configure.ac | 7 | ||||
-rw-r--r-- | win/makefile.vc | 12 | ||||
-rw-r--r-- | win/rules.vc | 12 | ||||
-rw-r--r-- | win/tcl.m4 | 12 |
22 files changed, 301 insertions, 269 deletions
diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 0fb6ba5..eaf9128 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -21,13 +21,13 @@ jobs: working-directory: unix - name: Build run: | - make tclsh tclzipfile + make tclsh make shell SCRIPT="$VER_PATH $GITHUB_ENV" echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV working-directory: unix - name: Package run: | - cat ../unix/tclsh $TCL_ZIP > tclsh${TCL_PATCHLEVEL}_unofficial + cp ../unix/tclsh tclsh${TCL_PATCHLEVEL}_unofficial chmod +x tclsh${TCL_PATCHLEVEL}_unofficial tar -cf tclsh${TCL_PATCHLEVEL}_unofficial.tar tclsh${TCL_PATCHLEVEL}_unofficial working-directory: 1dist @@ -62,7 +62,7 @@ jobs: working-directory: unix - name: Build run: | - make tclsh tclzipfile + make tclsh make shell SCRIPT="$VER_PATH $GITHUB_ENV" echo "TCL_BIN=`pwd`/tclsh" >> $GITHUB_ENV echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV @@ -70,7 +70,7 @@ jobs: - name: Package run: | mkdir contents - cat $TCL_BIN $TCL_ZIP > contents/tclsh${TCL_PATCHLEVEL}_unofficial + cp $TCL_BIN contents/tclsh${TCL_PATCHLEVEL}_unofficial chmod +x contents/tclsh${TCL_PATCHLEVEL}_unofficial cat > contents/README.txt <<EOF This is a single-file executable developer preview of Tcl $TCL_PATCHLEVEL @@ -116,20 +116,16 @@ jobs: working-directory: win - name: Build run: | - make binaries libraries tclzipfile + make binaries libraries echo "TCL_ZIP=`pwd`/`echo libtcl*.zip`" >> $GITHUB_ENV working-directory: win - - name: Package - run: | - cat ../win/tclsh*.exe $TCL_ZIP > combined.exe - working-directory: 1dist - name: Get Exact Version run: | - ./combined.exe $VER_PATH $GITHUB_ENV - working-directory: 1dist + ./tclsh*.exe $VER_PATH $GITHUB_ENV + working-directory: win - name: Set Executable Name run: | - mv combined.exe tclsh${TCL_PATCHLEVEL}_unofficial.exe + cp ../win/tclsh*.exe tclsh${TCL_PATCHLEVEL}_unofficial.exe working-directory: 1dist - name: Upload uses: actions/upload-artifact@v2 diff --git a/generic/tclPkgConfig.c b/generic/tclPkgConfig.c index 271d85d..eea7a07 100644 --- a/generic/tclPkgConfig.c +++ b/generic/tclPkgConfig.c @@ -111,8 +111,9 @@ static Tcl_Config const cfg[] = { {"scriptdir,runtime", CFG_RUNTIME_SCRDIR}, {"includedir,runtime", CFG_RUNTIME_INCDIR}, {"docdir,runtime", CFG_RUNTIME_DOCDIR}, +#if !defined(STATIC_BUILD) {"dllfile,runtime", CFG_RUNTIME_DLLFILE}, - {"zipfile,runtime", CFG_RUNTIME_ZIPFILE}, +#endif /* Installation paths to various stuff */ diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c index fc7be6f..7ee13a7 100644 --- a/generic/tclZipfs.c +++ b/generic/tclZipfs.c @@ -3179,24 +3179,6 @@ TclZipfs_TclLibrary(void) #endif /* _WIN32 || CFG_RUNTIME_DLLFILE */ /* - * If we're configured to know about a ZIP archive we should use, do that. - */ - -#ifdef CFG_RUNTIME_ZIPFILE - if (ZipfsAppHookFindTclInit( - CFG_RUNTIME_LIBDIR "/" CFG_RUNTIME_ZIPFILE) == TCL_OK) { - return Tcl_NewStringObj(zipfs_literal_tcl_library, -1); - } - if (ZipfsAppHookFindTclInit( - CFG_RUNTIME_SCRDIR "/" CFG_RUNTIME_ZIPFILE) == TCL_OK) { - return Tcl_NewStringObj(zipfs_literal_tcl_library, -1); - } - if (ZipfsAppHookFindTclInit(CFG_RUNTIME_ZIPFILE) == TCL_OK) { - return Tcl_NewStringObj(zipfs_literal_tcl_library, -1); - } -#endif /* CFG_RUNTIME_ZIPFILE */ - - /* * If anything set the cache (but subsequently failed) go with that * anyway. */ diff --git a/library/auto.tcl b/library/auto.tcl index 5f86c93..dc37328 100644 --- a/library/auto.tcl +++ b/library/auto.tcl @@ -70,60 +70,70 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # gives the end-user ultimate control to work-around any bugs, or # to customize. - if {[info exists env($enVarName)]} { - lappend dirs $env($enVarName) - } + if {[info exists env($enVarName)]} { + lappend dirs $env($enVarName) + } catch { - set found 0 + set found 0 set root [zipfs root] - set mountpoint [file join $root lib [string tolower $basename]] - lappend dirs [file join $root app ${basename}_library] - lappend dirs [file join $root lib $mountpoint ${basename}_library] - lappend dirs [file join $root lib $mountpoint] + set mountpoint [file join $root lib $basename] + lappend dirs [file join $root app ${basename}_library] + lappend dirs [file join $root lib $mountpoint ${basename}_library] + lappend dirs [file join $root lib $mountpoint] if {![zipfs exists [file join $root app ${basename}_library]] \ - && ![zipfs exists $mountpoint]} { - set found 0 - foreach pkgdat [info loaded] { - lassign $pkgdat dllfile dllpkg - if {[string tolower $dllpkg] ne [string tolower $basename]} continue - if {$dllfile eq {}} { - # Loaded statically - break - } - set found 1 - zipfs mount $mountpoint $dllfile - break - } - if {!$found} { - set paths {} - lappend paths [file join $root app] - lappend paths [::${basename}::pkgconfig get libdir,runtime] - lappend paths [::${basename}::pkgconfig get bindir,runtime] - if {[catch {::${basename}::pkgconfig get zipfile,runtime} zipfile]} { - set zipfile [string tolower \ - "lib${basename}_[join [list {*}[split $version .] {*}$patch] _].zip"] - } - lappend paths [file dirname [file join [pwd] [info nameofexecutable]]] - foreach path $paths { - set archive [file join $path $zipfile] - if {![file exists $archive]} continue - zipfs mount $mountpoint $archive - if {[zipfs exists [file join $mountpoint ${basename}_library $initScript]]} { - lappend dirs [file join $mountpoint ${basename}_library] - set found 1 - break - } elseif {[zipfs exists [file join $mountpoint $initScript]]} { - lappend dirs [file join $mountpoint $initScript] - set found 1 - break - } else { - catch {zipfs unmount $archive} - } - } - } - } - } + && ![zipfs exists $mountpoint]} { + set found 0 + foreach pkgdat [info loaded] { + lassign $pkgdat dllfile dllpkg + if {$dllpkg ne $basename} continue + if {$dllfile eq {}} { + # Loaded statically + break + } + set found 1 + zipfs mount $mountpoint $dllfile + break + } + if {!$found} { + set paths {} + if {![catch {::${basename}::pkgconfig get libdir,runtime} dir]} { + lappend paths $dir + } else { + catch {lappend paths [::tcl::pkgconfig get libdir,runtime]} + } + if {![catch {::${basename}::pkgconfig get bindir,runtime} dir]} { + lappend paths $dir + } else { + catch {lappend paths [::tcl::pkgconfig get bindir,runtime]} + } + if {[catch {::${basename}::pkgconfig get dllfile,runtime} dllfile]} { + set dllfile "lib${basename}${version}[info sharedlibextension]" + } + set dir [file dirname [file join [pwd] [info nameofexecutable]]] + lappend paths $dir + lappend paths [file join [file dirname $dir] lib] + foreach path $paths { + set archive [file join $path $dllfile] + if {![file exists $archive]} { + continue + } + zipfs mount $mountpoint $archive + if {[zipfs exists [file join $mountpoint ${basename}_library $initScript]]} { + lappend dirs [file join $mountpoint ${basename}_library] + set found 1 + break + } elseif {[zipfs exists [file join $mountpoint $initScript]]} { + lappend dirs [file join $mountpoint $initScript] + set found 1 + break + } else { + catch {zipfs unmount $archive} + } + } + } + } + } # 2. In the package script directory registered within the # configuration of the package itself. @@ -158,11 +168,11 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { # ../../../foo1.0.1/library # (From unix/arch directory in parallel build hierarchy) - set parentDir [file dirname [file dirname [info nameofexecutable]]] - set grandParentDir [file dirname $parentDir] - lappend dirs [file join $parentDir lib $basename$version] - lappend dirs [file join $grandParentDir lib $basename$version] - lappend dirs [file join $parentDir library] + set parentDir [file dirname [file dirname [info nameofexecutable]]] + set grandParentDir [file dirname $parentDir] + lappend dirs [file join $parentDir lib $basename$version] + lappend dirs [file join $grandParentDir lib $basename$version] + lappend dirs [file join $parentDir library] if {0} { lappend dirs [file join $grandParentDir library] lappend dirs [file join $grandParentDir $basename$patch library] @@ -185,19 +195,19 @@ proc tcl_findLibrary {basename version patch initScript enVarName varName} { } set seen($norm) {} - set the_library $i - set file [file join $i $initScript] + set the_library $i + set file [file join $i $initScript] # source everything when in a safe interpreter because we have a # source command, but no file exists command - if {[interp issafe] || [file exists $file]} { - if {![catch {uplevel #0 [list source $file]} msg opts]} { - return - } + if {[interp issafe] || [file exists $file]} { + if {![catch {uplevel #0 [list source $file]} msg opts]} { + return + } append errors "$file: $msg\n" append errors [dict get $opts -errorinfo]\n - } + } } unset -nocomplain the_library set msg "Can't find a usable $initScript in the following directories: \n" @@ -236,7 +246,7 @@ if {[interp issafe]} { proc auto_mkindex {dir args} { if {[interp issafe]} { - error "can't generate index within safe interpreter" + error "can't generate index within safe interpreter" } set oldDir [pwd] @@ -424,7 +434,7 @@ proc auto_mkindex_parser::mkindex {file} { $parser eval $contents foreach name $imports { - catch {$parser eval [list _%@namespace forget $name]} + catch {$parser eval [list _%@namespace forget $name]} } return $index } @@ -494,9 +504,9 @@ proc auto_mkindex_parser::commandInit {name arglist body} { set ns [namespace qualifiers $name] set tail [namespace tail $name] if {$ns eq ""} { - set fakeName [namespace current]::_%@fake_$tail + set fakeName [namespace current]::_%@fake_$tail } else { - set fakeName [namespace current]::[string map {:: _} _%@fake_$name] + set fakeName [namespace current]::[string map {:: _} _%@fake_$name] } proc $fakeName $arglist $body @@ -505,8 +515,8 @@ proc auto_mkindex_parser::commandInit {name arglist body} { # the fully qualified names, and have the procs point to the aliases. if {[string match *::* $name]} { - set exportCmd [list _%@namespace export [namespace tail $name]] - $parser eval [list _%@namespace eval $ns $exportCmd] + set exportCmd [list _%@namespace export [namespace tail $name]] + $parser eval [list _%@namespace eval $ns $exportCmd] # The following proc definition does not work if you want to tolerate # space or something else diabolical in the procedure name, (i.e., @@ -518,11 +528,11 @@ proc auto_mkindex_parser::commandInit {name arglist body} { # A gold star to someone that can make test autoMkindex-3.3 work # properly - set alias [namespace tail $fakeName] - $parser invokehidden proc $name {args} "_%@eval {$alias} \$args" - $parser alias $alias $fakeName + set alias [namespace tail $fakeName] + $parser invokehidden proc $name {args} "_%@eval {$alias} \$args" + $parser alias $alias $fakeName } else { - $parser alias $name $fakeName + $parser alias $name $fakeName } return } @@ -544,18 +554,18 @@ proc auto_mkindex_parser::fullname {name} { variable contextStack if {![string match ::* $name]} { - foreach ns $contextStack { - set name "${ns}::$name" - if {[string match ::* $name]} { - break - } - } + foreach ns $contextStack { + set name "${ns}::$name" + if {[string match ::* $name]} { + break + } + } } if {[namespace qualifiers $name] eq ""} { - set name [namespace tail $name] + set name [namespace tail $name] } elseif {![string match ::* $name]} { - set name "::$name" + set name "::$name" } # Earlier, mkindex replaced all $'s with \0. Now, we have to reverse that @@ -645,27 +655,27 @@ auto_mkindex_parser::hook { auto_mkindex_parser::command namespace {op args} { switch -- $op { - eval { - variable parser - variable contextStack + eval { + variable parser + variable contextStack - set name [lindex $args 0] - set args [lrange $args 1 end] + set name [lindex $args 0] + set args [lrange $args 1 end] - set contextStack [linsert $contextStack 0 $name] + set contextStack [linsert $contextStack 0 $name] $parser eval [list _%@namespace eval $name] $args - set contextStack [lrange $contextStack 1 end] - } - import { - variable parser - variable imports - foreach pattern $args { - if {$pattern ne "-force"} { - lappend imports $pattern - } - } - catch {$parser eval "_%@namespace import $args"} - } + set contextStack [lrange $contextStack 1 end] + } + import { + variable parser + variable imports + foreach pattern $args { + if {$pattern ne "-force"} { + lappend imports $pattern + } + } + catch {$parser eval "_%@namespace import $args"} + } ensemble { variable parser variable contextStack diff --git a/library/manifest.txt b/library/manifest.txt index 0a516b1..08529da 100644 --- a/library/manifest.txt +++ b/library/manifest.txt @@ -10,7 +10,7 @@ apply {{dir} { 1 opt 0.4.8 {opt optparse.tcl} 0 cookiejar 0.2.0 {cookiejar cookiejar.tcl} 0 tcl::idna 1.0.1 {cookiejar idna.tcl} - 0 platform 1.0.16 {platform platform.tcl} + 0 platform 1.0.17 {platform platform.tcl} 0 platform::shell 1.1.4 {platform shell.tcl} 1 tcltest 2.5.4 {tcltest tcltest.tcl} } { diff --git a/library/platform/pkgIndex.tcl b/library/platform/pkgIndex.tcl index 401300a..7983831 100644 --- a/library/platform/pkgIndex.tcl +++ b/library/platform/pkgIndex.tcl @@ -1,3 +1,3 @@ -package ifneeded platform 1.0.16 [list source [file join $dir platform.tcl]] +package ifneeded platform 1.0.17 [list source [file join $dir platform.tcl]] package ifneeded platform::shell 1.1.4 [list source [file join $dir shell.tcl]] diff --git a/library/platform/platform.tcl b/library/platform/platform.tcl index 2c83102..e01334e 100644 --- a/library/platform/platform.tcl +++ b/library/platform/platform.tcl @@ -29,8 +29,10 @@ # are on "Windows NT" or "Windows XP" or whatever. # # Machine specific +# % amd64 -> x86_64 # % arm* -> arm # % sun4* -> sparc +# % ia32* -> ix86 # % intel -> ix86 # % i*86* -> ix86 # % Power* -> powerpc @@ -81,6 +83,7 @@ proc ::platform::generic {} { set cpu ix86 } } + ppc - "Power*" { set cpu powerpc } @@ -177,8 +180,9 @@ proc ::platform::identify {} { macosx { set major [lindex [split $tcl_platform(osVersion) .] 0] if {$major > 19} { - incr major -20 - append plat 11.$major + set minor [lindex [split $tcl_platform(osVersion) .] 1] + incr major -9 + append plat $major.[expr {$minor - 1}] } else { incr major -4 append plat 10.$major @@ -405,7 +409,7 @@ proc ::platform::patterns {id} { # ### ### ### ######### ######### ######### ## Ready -package provide platform 1.0.16 +package provide platform 1.0.17 # ### ### ### ######### ######### ######### ## Demo application diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile index 6451c66..1ee3bf1 100644 --- a/macosx/GNUmakefile +++ b/macosx/GNUmakefile @@ -144,7 +144,7 @@ ${objdir}/Makefile: ${UNIX_DIR}/Makefile.in ${UNIX_DIR}/configure \ mkdir -p "${OBJ_DIR}" && cd "${OBJ_DIR}" && \ if [ ${UNIX_DIR}/configure -nt config.status ]; then ${UNIX_DIR}/configure -C \ --prefix="${PREFIX}" --bindir="${BINDIR}" --libdir="${LIBDIR}" \ - --mandir="${MANDIR}" --enable-framework --enable-dtrace \ + --mandir="${MANDIR}" --enable-framework --enable-dtrace --disable-zipfs \ ${CONFIGURE_ARGS} ${EXTRA_CONFIGURE_ARGS}; else ./config.status; fi build-${PROJECT}: ${objdir}/Makefile diff --git a/tests/config.test b/tests/config.test index 8968a53..50f03ce 100644 --- a/tests/config.test +++ b/tests/config.test @@ -19,7 +19,7 @@ if {"::tcltest" ni [namespace children]} { test pkgconfig-1.1 {query keys} -body { lsort [::tcl::pkgconfig list] -} -match glob -result {*bindir,install bindir,runtime*dllfile,runtime docdir,install docdir,runtime includedir,install includedir,runtime libdir,install libdir,runtime*scriptdir,install scriptdir,runtime*zipfile,runtime} +} -match glob -result {*bindir,install bindir,runtime*docdir,install docdir,runtime includedir,install includedir,runtime libdir,install libdir,runtime*scriptdir,install scriptdir,runtime*} test pkgconfig-1.2 {query keys multiple times} { string compare [::tcl::pkgconfig list] [::tcl::pkgconfig list] } 0 diff --git a/tests/fileName.test b/tests/fileName.test index 0a62b3e..04273d7 100644 --- a/tests/fileName.test +++ b/tests/fileName.test @@ -1063,10 +1063,10 @@ test filename-11.45 {Tcl_GlobCmd on root volume} -setup { set tmpd [pwd] } -body { catch { - set res1 [glob -dir [lindex [file volumes] 0] -tails *] + set res1 [glob -dir [lindex [file volumes] end] -tails *] } catch { - cd [lindex [file volumes] 0] + cd [lindex [file volumes] end] set res2 [glob *] } list $res1 $res2 diff --git a/tests/zipfs.test b/tests/zipfs.test index cdddc71..8689268 100644 --- a/tests/zipfs.test +++ b/tests/zipfs.test @@ -20,11 +20,6 @@ testConstraint zipfs [expr { }] testConstraint zipfslib 1 -# Removed in tip430 - zipfs is no longer a static package -#test zipfs-0.0 {zipfs basics} -constraints zipfs -body { -# load {} zipfs -#} -result {} - set ziproot [zipfs root] set CWD [pwd] set tmpdir [file join $CWD tmp] @@ -44,7 +39,7 @@ if {![string match ${ziproot}* $tcl_library]} { # Hack the environment to pretend we did pull tcl_library from a zip # archive ### - set tclzip [file join $CWD [::tcl::pkgconfig get zipfile,runtime]] + set tclzip [file join $CWD libtcl[info patchlevel].zip] testConstraint zipfslib [file isfile $tclzip] if {[testConstraint zipfslib]} { zipfs mount /lib/tcl $tclzip diff --git a/unix/Makefile.in b/unix/Makefile.in index 00adbf6..240ffa1 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -814,10 +814,15 @@ tclLibObjs: # This targets actually build the objects needed for the lib in the above case objs: ${OBJS} -${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} +${TCL_EXE}: ${TCLSH_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${TCL_ZIP_FILE} ${CC} ${CFLAGS} ${LDFLAGS} ${TCLSH_OBJS} \ @TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \ ${CC_SEARCH_FLAGS} -o ${TCL_EXE} + @if test "${ZIPFS_BUILD}" = "2" ; then \ + cat ${TCL_ZIP_FILE} >> ${TCL_EXE}; \ + ${NATIVE_ZIP} -A ${TCL_EXE} \ + || echo 'ignore zip-error by adjust sfx process (not executable?)'; \ + fi # Must be empty so it doesn't conflict with rule for ${TCL_EXE} above ${NATIVE_TCLSH}: @@ -991,21 +996,6 @@ install-binaries: binaries @$(INSTALL_DATA_DIR) "$(LIB_INSTALL_DIR)/pkgconfig" @$(INSTALL_DATA) tcl.pc "$(LIB_INSTALL_DIR)/pkgconfig/tcl.pc" -install-libraries-zipfs-shared: libraries - @for i in "$(SCRIPT_INSTALL_DIR)"; do \ - if [ ! -d "$$i" ] ; then \ - echo "Making directory $$i"; \ - $(INSTALL_DATA_DIR) "$$i"; \ - fi; \ - done - @echo "Installing library files to $(SCRIPT_INSTALL_DIR)/" - @for i in $(UNIX_DIR)/tclAppInit.c @LDAIX_SRC@ @DTRACE_SRC@; do \ - $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)"; \ - done - -install-libraries-zipfs-static: install-libraries-zipfs-shared - $(INSTALL_DATA) ${TCL_ZIP_FILE} "$(LIB_INSTALL_DIR)" - install-libraries: libraries @for i in "$(SCRIPT_INSTALL_DIR)" "$(MODULE_INSTALL_DIR)"; \ do \ @@ -1053,9 +1043,9 @@ install-libraries: libraries @echo "Installing package tcltest 2.5.4 as a Tcl Module" @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl \ "$(MODULE_INSTALL_DIR)/8.5/tcltest-2.5.4.tm" - @echo "Installing package platform 1.0.16 as a Tcl Module" + @echo "Installing package platform 1.0.17 as a Tcl Module" @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl \ - "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.16.tm" + "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.17.tm" @echo "Installing package platform::shell 1.1.4 as a Tcl Module" @$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl \ "$(MODULE_INSTALL_DIR)/8.4/platform/shell-1.1.4.tm" @@ -1474,7 +1464,6 @@ tclPkgConfig.o: $(GENERIC_DIR)/tclPkgConfig.c -DCFG_RUNTIME_INCDIR="\"$(includedir)\"" \ -DCFG_RUNTIME_DOCDIR="\"$(mandir)\"" \ -DCFG_RUNTIME_DLLFILE="\"$(TCL_LIB_FILE)\"" \ - -DCFG_RUNTIME_ZIPFILE="\"$(TCL_ZIP_FILE)\"" \ $(GENERIC_DIR)/tclPkgConfig.c tclPosixStr.o: $(GENERIC_DIR)/tclPosixStr.c @@ -1528,7 +1517,6 @@ tclZlib.o: $(GENERIC_DIR)/tclZlib.c tclZipfs.o: $(GENERIC_DIR)/tclZipfs.c $(CC) -c $(CC_SWITCHES) \ -DCFG_RUNTIME_DLLFILE="\"$(TCL_LIB_FILE)\"" \ - -DCFG_RUNTIME_ZIPFILE="\"$(TCL_ZIP_FILE)\"" \ -DCFG_RUNTIME_LIBDIR="\"$(libdir)\"" \ -DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY)\"" \ -I$(ZLIB_DIR) -I$(ZLIB_DIR)/contrib/minizip \ @@ -2411,7 +2399,7 @@ BUILD_HTML = \ .PHONY: install-tzdata install-msgs .PHONY: packages configure-packages test-packages clean-packages .PHONY: dist-packages distclean-packages install-packages -.PHONY: install-libraries-zipfs-shared install-libraries-zipfs-static tclzipfile +.PHONY: tclzipfile #-------------------------------------------------------------------------- # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/unix/configure b/unix/configure index 2943334..50a035b 100755 --- a/unix/configure +++ b/unix/configure @@ -5581,7 +5581,7 @@ fi then : CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" case "${CC}" in *++|*++-*) ;; @@ -7293,11 +7293,11 @@ then : fi - # See if the compiler supports casting to a union type. - # This is used to stop gcc from printing a compiler - # warning when initializing a union member. + # See if the compiler supports casting to a union type. + # This is used to stop gcc from printing a compiler + # warning when initializing a union member. - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cast to union support" >&5 printf %s "checking for cast to union support... " >&6; } if test ${tcl_cv_cast_to_union+y} then : @@ -7310,8 +7310,8 @@ int main (void) { - union foo { int i; double d; }; - union foo f = (union foo) (int) 0; + union foo { int i; double d; }; + union foo f = (union foo) (int) 0; ; return 0; @@ -7328,13 +7328,13 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cast_to_union" >&5 printf "%s\n" "$tcl_cv_cast_to_union" >&6; } - if test "$tcl_cv_cast_to_union" = "yes"; then + if test "$tcl_cv_cast_to_union" = "yes"; then printf "%s\n" "#define HAVE_CAST_TO_UNION 1" >>confdefs.h - fi - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto" - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -fno-lto" >&5 + fi + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto" + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working -fno-lto" >&5 printf %s "checking for working -fno-lto... " >&6; } if test ${ac_cv_nolto+y} then : @@ -7362,12 +7362,45 @@ rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_nolto" >&5 printf "%s\n" "$ac_cv_nolto" >&6; } + CFLAGS=$hold_cflags + if test "$ac_cv_nolto" = "yes" ; then + CFLAGS_NOLTO="-fno-lto" + else + CFLAGS_NOLTO="" + fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -finput-charset" >&5 +printf %s "checking if the compiler understands -finput-charset... " >&6; } +if test ${tcl_cv_cc_input_charset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + tcl_cv_cc_input_charset=yes +else $as_nop + tcl_cv_cc_input_charset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext CFLAGS=$hold_cflags - if test "$ac_cv_nolto" = "yes" ; then - CFLAGS_NOLTO="-fno-lto" - else - CFLAGS_NOLTO="" - fi +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_input_charset" >&5 +printf "%s\n" "$tcl_cv_cc_input_charset" >&6; } + if test $tcl_cv_cc_input_charset = yes; then + CFLAGS="$CFLAGS -finput-charset=UTF-8" + fi ac_fn_c_check_header_compile "$LINENO" "stdbool.h" "ac_cv_header_stdbool_h" "$ac_includes_default" if test "x$ac_cv_header_stdbool_h" = xyes @@ -11116,7 +11149,7 @@ printf "%s\n" "No zip found on PATH. Building minizip" >&6; } ZIPFS_BUILD=1 - TCL_ZIP_FILE=libtcl_${TCL_MAJOR_VERSION}_${TCL_MINOR_VERSION}_${TCL_PATCH_LEVEL}.zip + TCL_ZIP_FILE=libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_PATCH_LEVEL}.zip else ZIPFS_BUILD=0 TCL_ZIP_FILE= @@ -11130,17 +11163,13 @@ if test "${ZIPFS_BUILD}" = 1; then printf "%s\n" "#define ZIPFS_BUILD 2" >>confdefs.h - INSTALL_LIBRARIES=install-libraries-zipfs-static - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } else printf "%s\n" "#define ZIPFS_BUILD 1" >>confdefs.h \ - INSTALL_LIBRARIES=install-libraries-zipfs-shared - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } diff --git a/unix/configure.ac b/unix/configure.ac index 9967ef8..edf5f6d 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -888,7 +888,7 @@ if test "$tcl_ok" = "yes" -a "x$enable_framework" != "xyes"; then # SC_ZIPFS_SUPPORT ZIPFS_BUILD=1 - TCL_ZIP_FILE=libtcl_${TCL_MAJOR_VERSION}_${TCL_MINOR_VERSION}_${TCL_PATCH_LEVEL}.zip + TCL_ZIP_FILE=libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_PATCH_LEVEL}.zip else ZIPFS_BUILD=0 TCL_ZIP_FILE= @@ -899,13 +899,10 @@ if test "${ZIPFS_BUILD}" = 1; then if test "${SHARED_BUILD}" = 0; then ZIPFS_BUILD=2; AC_DEFINE(ZIPFS_BUILD, 2, [Are we building with zipfs enabled?]) - INSTALL_LIBRARIES=install-libraries-zipfs-static - AC_MSG_RESULT([yes]) else AC_DEFINE(ZIPFS_BUILD, 1, [Are we building with zipfs enabled?])\ - INSTALL_LIBRARIES=install-libraries-zipfs-shared - AC_MSG_RESULT([yes]) fi + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) INSTALL_LIBRARIES=install-libraries diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 08c1907..a8911f8 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -960,7 +960,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g AS_IF([test "$GCC" = yes], [ CFLAGS_OPTIMIZE=-O2 - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" case "${CC}" in *++|*++-*) ;; @@ -1838,36 +1838,44 @@ dnl # preprocessing tests use only CPPFLAGS. TCL_LIBS="${DL_LIBS} ${LIBS} ${MATH_LIBS}"]) AC_SUBST(TCL_LIBS) - # See if the compiler supports casting to a union type. - # This is used to stop gcc from printing a compiler - # warning when initializing a union member. - - AC_CACHE_CHECK(for cast to union support, - tcl_cv_cast_to_union, - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ - union foo { int i; double d; }; - union foo f = (union foo) (int) 0; - ]])], - [tcl_cv_cast_to_union=yes], - [tcl_cv_cast_to_union=no]) - ) - if test "$tcl_cv_cast_to_union" = "yes"; then - AC_DEFINE(HAVE_CAST_TO_UNION, 1, - [Defined when compiler supports casting to union type.]) - fi - hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto" - AC_CACHE_CHECK(for working -fno-lto, - ac_cv_nolto, - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], - [ac_cv_nolto=yes], - [ac_cv_nolto=no]) - ) - CFLAGS=$hold_cflags - if test "$ac_cv_nolto" = "yes" ; then - CFLAGS_NOLTO="-fno-lto" - else - CFLAGS_NOLTO="" - fi + # See if the compiler supports casting to a union type. + # This is used to stop gcc from printing a compiler + # warning when initializing a union member. + + AC_CACHE_CHECK(for cast to union support, + tcl_cv_cast_to_union, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ + union foo { int i; double d; }; + union foo f = (union foo) (int) 0; + ]])], + [tcl_cv_cast_to_union=yes], + [tcl_cv_cast_to_union=no]) + ) + if test "$tcl_cv_cast_to_union" = "yes"; then + AC_DEFINE(HAVE_CAST_TO_UNION, 1, + [Defined when compiler supports casting to union type.]) + fi + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -fno-lto" + AC_CACHE_CHECK(for working -fno-lto, + ac_cv_nolto, + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])], + [ac_cv_nolto=yes], + [ac_cv_nolto=no]) + ) + CFLAGS=$hold_cflags + if test "$ac_cv_nolto" = "yes" ; then + CFLAGS_NOLTO="-fno-lto" + else + CFLAGS_NOLTO="" + fi + AC_CACHE_CHECK([if the compiler understands -finput-charset], + tcl_cv_cc_input_charset, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_input_charset=yes],[tcl_cv_cc_input_charset=no]) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_input_charset = yes; then + CFLAGS="$CFLAGS -finput-charset=UTF-8" + fi AC_CHECK_HEADER(stdbool.h, [AC_DEFINE(HAVE_STDBOOL_H, 1, [Do we have <stdbool.h>?])],) diff --git a/unix/tcl.pc.in b/unix/tcl.pc.in index a343707..2693cd8 100644 --- a/unix/tcl.pc.in +++ b/unix/tcl.pc.in @@ -5,7 +5,6 @@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ libfile=@TCL_LIB_FILE@ -zipfile=@TCL_ZIP_FILE@ Name: Tool Command Language Description: Tcl is a powerful, easy-to-learn dynamic programming language, suitable for a wide range of uses. diff --git a/win/Makefile.in b/win/Makefile.in index 6476687..603f64b 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -545,11 +545,16 @@ ${TCL_ZIP_FILE}: ${ZIP_INSTALL_OBJS} ${DDE_DLL_FILE} ${REG_DLL_FILE} echo "${TCL_ZIP_FILE} successful created with $$zip" && \ cd ..) -$(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) +$(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) ${TCL_ZIP_FILE} $(CC) $(CFLAGS) $(TCLSH_OBJS) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \ tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE) $(COPY) tclsh.exe.manifest $(TCLSH).manifest @VC_MANIFEST_EMBED_EXE@ + @if test "${ZIPFS_BUILD}" = "2" ; then \ + cat ${TCL_ZIP_FILE} >> ${TCLSH}; \ + ${NATIVE_ZIP} -A ${TCLSH} \ + || echo 'ignore zip-error by adjust sfx process (not executable?)'; \ + fi cat32.$(OBJEXT): cat.c $(CC) -c $(CC_SWITCHES) -DUNICODE -D_UNICODE @DEPARG@ $(CC_OBJNAME) @@ -651,7 +656,6 @@ tclZipfs.${OBJEXT}: $(GENERIC_DIR)/tclZipfs.c $(CC) -c $(CC_SWITCHES) -DBUILD_tcl \ -DCFG_RUNTIME_PATH="\"$(bindir_native)\"" \ -DCFG_RUNTIME_DLLFILE="\"$(TCL_DLL_FILE)\"" \ - -DCFG_RUNTIME_ZIPFILE="\"$(TCL_ZIP_FILE)\"" \ -DCFG_RUNTIME_LIBDIR="\"$(bindir_native)\"" \ -DCFG_RUNTIME_SCRDIR="\"$(TCL_LIBRARY_NATIVE)\"" \ $(ZLIB_INCLUDE) -I$(MINIZIP_DIR_NATIVE) @DEPARG@ $(CC_OBJNAME) @@ -679,7 +683,6 @@ tclPkgConfig.${OBJEXT}: tclPkgConfig.c -DCFG_RUNTIME_INCDIR="\"$(includedir_native)\"" \ -DCFG_RUNTIME_DOCDIR="\"$(mandir_native)\"" \ -DCFG_RUNTIME_DLLFILE="\"$(TCL_DLL_FILE)\"" \ - -DCFG_RUNTIME_ZIPFILE="\"$(TCL_ZIP_FILE)\"" \ -DBUILD_tcl \ @DEPARG@ $(CC_OBJNAME) @@ -844,11 +847,6 @@ install-binaries: binaries $(COPY) $(REG_LIB_FILE) "$(LIB_INSTALL_DIR)/registry${REGDOTVER}"; \ fi -install-libraries-zipfs-shared: libraries - -install-libraries-zipfs-static: install-libraries-zipfs-shared - $(COPY) ${TCL_ZIP_FILE} "$(LIB_INSTALL_DIR)" - install-libraries: libraries install-tzdata install-msgs @for i in "$(prefix)/lib" "$(INCLUDE_INSTALL_DIR)" \ "$(SCRIPT_INSTALL_DIR)" "$(MODULE_INSTALL_DIR)"; \ @@ -896,8 +894,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl "$(MODULE_INSTALL_DIR)/8.7/msgcat-1.7.1.tm"; @echo "Installing package tcltest 2.5.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl "$(MODULE_INSTALL_DIR)/8.5/tcltest-2.5.4.tm"; - @echo "Installing package platform 1.0.16 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.16.tm"; + @echo "Installing package platform 1.0.17 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.17.tm"; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl "$(MODULE_INSTALL_DIR)/8.4/platform/shell-1.1.4.tm"; @echo "Installing encodings"; @@ -996,9 +994,8 @@ cleanhelp: clean: cleanhelp clean-packages $(RM) *.lib *.a *.exp *.dll *.$(RES) *.${OBJEXT} *~ \#* TAGS a.out $(RM) $(TCLSH) $(CAT32) $(TEST_EXE_FILE) $(TEST_DLL_FILE) tcltest.cmd tcltest.sh - $(RM) *.pch *.ilk *.pdb + $(RM) *.pch *.ilk *.pdb *.zip $(RM) minizip${HOST_EXEEXT} *.${HOST_OBJEXT} - $(RM) *.zip $(RMDIR) *.vfs distclean: distclean-packages clean @@ -1132,6 +1129,6 @@ html-tk: $(TCLSH) .PHONY: gdb depend cleanhelp clean distclean packages install-packages .PHONY: test-packages clean-packages distclean-packages genstubs html .PHONY: html-tcl html-tk -.PHONY: iinstall-libraries-zipfs-shared install-libraries-zipfs-static tclzipfile +.PHONY: tclzipfile # DO NOT DELETE THIS LINE -- make depend depends on it. diff --git a/win/configure b/win/configure index 97a680b..4659c61 100755 --- a/win/configure +++ b/win/configure @@ -4323,6 +4323,39 @@ printf "%s\n" "$ac_cv_nolto" >&6; } else CFLAGS_NOLTO="" fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the compiler understands -finput-charset" >&5 +printf %s "checking if the compiler understands -finput-charset... " >&6; } +if test ${tcl_cv_cc_input_charset+y} +then : + printf %s "(cached) " >&6 +else $as_nop + + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO" +then : + tcl_cv_cc_input_charset=yes +else $as_nop + tcl_cv_cc_input_charset=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext + CFLAGS=$hold_cflags +fi +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_input_charset" >&5 +printf "%s\n" "$tcl_cv_cc_input_charset" >&6; } + if test $tcl_cv_cc_input_charset = yes; then + extra_cflags="$extra_cflags -finput-charset=UTF-8" + fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking compiler flags" >&5 @@ -4386,7 +4419,7 @@ printf "%s\n" "using shared flags" >&6; } CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= @@ -5102,7 +5135,7 @@ printf "%s\n" "No zip found on PATH building minizip" >&6; } ZIPFS_BUILD=1 - TCL_ZIP_FILE=libtcl_${TCL_MAJOR_VERSION}_${TCL_MINOR_VERSION}_${TCL_PATCH_LEVEL}.zip + TCL_ZIP_FILE=libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_PATCH_LEVEL}.zip else ZIPFS_BUILD=0 TCL_ZIP_FILE= @@ -5116,17 +5149,13 @@ if test "${ZIPFS_BUILD}" = 1; then printf "%s\n" "#define ZIPFS_BUILD 2" >>confdefs.h - INSTALL_LIBRARIES=install-libraries-zipfs-static - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } else printf "%s\n" "#define ZIPFS_BUILD 1" >>confdefs.h \ - INSTALL_LIBRARIES=install-libraries-zipfs-shared - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -printf "%s\n" "yes" >&6; } fi + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +printf "%s\n" "yes" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } diff --git a/win/configure.ac b/win/configure.ac index 02b6363..87ffd8d 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -180,7 +180,7 @@ if test "$tcl_ok" = "yes" ; then SC_PROG_TCLSH SC_ZIPFS_SUPPORT ZIPFS_BUILD=1 - TCL_ZIP_FILE=libtcl_${TCL_MAJOR_VERSION}_${TCL_MINOR_VERSION}_${TCL_PATCH_LEVEL}.zip + TCL_ZIP_FILE=libtcl${TCL_MAJOR_VERSION}.${TCL_MINOR_VERSION}${TCL_PATCH_LEVEL}.zip else ZIPFS_BUILD=0 TCL_ZIP_FILE= @@ -191,13 +191,10 @@ if test "${ZIPFS_BUILD}" = 1; then if test "${SHARED_BUILD}" = 0; then ZIPFS_BUILD=2; AC_DEFINE(ZIPFS_BUILD, 2, [Are we building with zipfs enabled?]) - INSTALL_LIBRARIES=install-libraries-zipfs-static - AC_MSG_RESULT([yes]) else AC_DEFINE(ZIPFS_BUILD, 1, [Are we building with zipfs enabled?])\ - INSTALL_LIBRARIES=install-libraries-zipfs-shared - AC_MSG_RESULT([yes]) fi + AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) INSTALL_LIBRARIES=install-libraries diff --git a/win/makefile.vc b/win/makefile.vc index 2c75838..70bf504 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -576,18 +576,21 @@ $(OUT_DIR)\tommath.lib: $(TOMMATHDIR)\win32\tommath.lib $(COPY) $(TOMMATHDIR)\win32\tommath.lib $(OUT_DIR)\tommath.lib
!endif
-$(TCLSCRIPTZIP): .PHONY
+$(TCLSCRIPTZIP): $(TCLDDELIB) $(TCLREGLIB)
@echo Building Tcl library zip file
@if exist "$(LIBTCLVFS)" $(RMDIR) "$(LIBTCLVFS)"
@$(MKDIR) "$(LIBTCLVFS)"
@$(CPYDIR) $(LIBDIR) "$(LIBTCLVFS)\tcl_library"
@move /y "$(LIBTCLVFS)\tcl_library\manifest.txt" "$(LIBTCLVFS)\tcl_library\pkgIndex.tcl" > NUL
-!if ! $(STATIC_BUILD)
+!if $(STATIC_BUILD)
# Remove the registry and dde directories as the DLLS are still external
@del "$(LIBTCLVFS)\tcl_library\registry\pkgIndex.tcl"
@rmdir "$(LIBTCLVFS)\tcl_library\registry"
@del "$(LIBTCLVFS)\tcl_library\dde\pkgIndex.tcl"
@rmdir "$(LIBTCLVFS)\tcl_library\dde"
+!else
+ @$(COPY) $(TCLDDELIB) "$(LIBTCLVFS)\tcl_library\dde
+ @$(COPY) $(TCLREGLIB) "$(LIBTCLVFS)\tcl_library\registry
!endif
@echo file delete -force {$@} > "$(OUT_DIR)\zipper.tcl"
@echo zipfs mkzip {$@} {$(LIBTCLVFS)} {$(LIBTCLVFS)} >> "$(OUT_DIR)\zipper.tcl"
@@ -835,7 +838,7 @@ $(TMP_DIR)\tclZlib.obj: $(GENERICDIR)\tclZlib.c $(cc32) $(pkgcflags) -I$(COMPATDIR)\zlib -Fo$@ $?
# Following the lead of the autoconf based make, we define the
-# CFG_RUNTIME_DLLFILE and CFG_RUNTIME_ZIPFILE flags specifically for tclPkgConfig
+# CFG_RUNTIME_*DIR flags specifically for tclPkgConfig
# and not as part of the global defines. These are all defined
# as empty strings because they are intended to represent paths
# at *runtime*, not build time. This may make sense on Unix systems
@@ -859,8 +862,7 @@ $(TMP_DIR)\tclPkgConfig.obj: $(GENERICDIR)\tclPkgConfig.c /DCFG_RUNTIME_SCRDIR="\"$(SCRIPT_INSTALL_DIR:\=\\)\"" \
/DCFG_RUNTIME_INCDIR="\"$(INCLUDE_INSTALL_DIR:\=\\)\"" \
/DCFG_RUNTIME_DOCDIR="\"$(DOC_INSTALL_DIR:\=\\)\"" \
- /DCFG_RUNTIME_DLLFILE="\"\"" \
- /DCFG_RUNTIME_ZIPFILE="\"\"" \
+ /DCFG_RUNTIME_DLLFILE="\"$(TCL_LIB_FILE)\"" \
-Fo$@ $?
$(TMP_DIR)\tclAppInit.obj: $(WIN_DIR)\tclAppInit.c
diff --git a/win/rules.vc b/win/rules.vc index 97a7e37..0e99225 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -1122,16 +1122,8 @@ STUBPREFIX = $(PROJECT)stub #
# TIP 430. Unused for 8.6 but no harm defining it to allow a common rules.vc
-!if "$(TCL_PATCH_LETTER)" == "."
-TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_RELEASE_SERIAL).zip
-!else
-TCLSCRIPTZIPNAME = libtcl_$(TCL_MAJOR_VERSION)_$(TCL_MINOR_VERSION)_$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
-!endif
-!if "$(TK_PATCH_LETTER)" == "."
-TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_RELEASE_SERIAL).zip
-!else
-TKSCRIPTZIPNAME = libtk_$(TK_MAJOR_VERSION)_$(TK_MINOR_VERSION)_$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
-!endif
+TCLSCRIPTZIPNAME = libtcl$(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
+TKSCRIPTZIPNAME = libtk$(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
!if $(DOING_TCL)
TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe
@@ -251,7 +251,6 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ # TCL_BIN_DIR # TCL_SRC_DIR # TCL_LIB_FILE -# TCL_ZIP_FILE # #------------------------------------------------------------------------ @@ -288,7 +287,6 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [ AC_SUBST(TCL_BIN_DIR) AC_SUBST(TCL_SRC_DIR) - AC_SUBST(TCL_ZIP_FILE) AC_SUBST(TCL_LIB_FILE) AC_SUBST(TCL_LIB_FLAG) AC_SUBST(TCL_LIB_SPEC) @@ -617,6 +615,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ else CFLAGS_NOLTO="" fi + AC_CACHE_CHECK([if the compiler understands -finput-charset], + tcl_cv_cc_input_charset, [ + hold_cflags=$CFLAGS; CFLAGS="$CFLAGS -finput-charset=UTF-8" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],[tcl_cv_cc_input_charset=yes],[tcl_cv_cc_input_charset=no]) + CFLAGS=$hold_cflags]) + if test $tcl_cv_cc_input_charset = yes; then + extra_cflags="$extra_cflags -finput-charset=UTF-8" + fi fi AC_MSG_CHECKING([compiler flags]) @@ -677,7 +683,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS_DEBUG=-g CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer" - CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith -finput-charset=UTF-8" + CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith" LDFLAGS_DEBUG= LDFLAGS_OPTIMIZE= |