Check-in [50fb4f4fc1]
Overview
Comment:Updated windows makefile to preserve manifest.uuid file if it already exists. Added checks for git repo.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | tls-1.8
Files: files | file ages | folders
SHA3-256: 50fb4f4fc1f1c6305a0e5ab919a522d79dbd974254b9b2c13ea20b750b94cadc
User & Date: bohagan on 2024-10-26 22:32:46
Other Links: branch diff | manifest | tags
Context
2024-10-26
22:32
Updated windows makefile to preserve manifest.uuid file if it already exists. Added checks for git repo. Leaf check-in: 50fb4f4fc1 user: bohagan tags: tls-1.8
17:34
Added support for loading CA certificates from virtual file systems. Source: https://core.tcl-lang.org/tcltls/tktview/030c713ca2 check-in: b70fbfd8cf user: bohagan tags: tls-1.8
Changes

Modified configure.ac from [1aed756715] to [aade937b37].

81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
#
# A few miscellaneous platform-specific items:
# TEA_ADD_* any platform specific compiler/build info here.
#--------------------------------------------------------------------

TEA_ADD_CLEANFILES([pkgIndex.tcl generic/tls.tcl.h tlsUuid.h manifest.uuid])

if test "${TEA_PLATFORM}" = "windows" ; then
    TEA_ADD_CLEANFILES([*.lib *.dll *.exp *.ilk *.pdb vc*.pch])
else
    TEA_ADD_CLEANFILES([*.so])
fi
AC_SUBST(CLEANFILES)







|







81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# Add pkgIndex.tcl if it is generated in the Makefile instead of ./configure
# and change Makefile.in to move it from CONFIG_CLEAN_FILES to BINARIES var.
#
# A few miscellaneous platform-specific items:
# TEA_ADD_* any platform specific compiler/build info here.
#--------------------------------------------------------------------

TEA_ADD_CLEANFILES([pkgIndex.tcl generic/tls.tcl.h tlsUuid.h])

if test "${TEA_PLATFORM}" = "windows" ; then
    TEA_ADD_CLEANFILES([*.lib *.dll *.exp *.ilk *.pdb vc*.pch])
else
    TEA_ADD_CLEANFILES([*.so])
fi
AC_SUBST(CLEANFILES)

Modified win/makefile.vc from [4638c1447c] to [7c67a5e877].

36
37
38
39
40
41
42

43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59


60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77

# Define any additional project include flags
# SSL_INSTALL_FOLDER = with the OpenSSL installation folder following.
PRJ_INCLUDES = -I"$(SSL_INSTALL_FOLDER)\include" -I"$(OPENSSL_INSTALL_DIR)\include" -I"$(TMP_DIR)"

# Define any additional compiler flags that might be required for the project
PRJ_DEFINES = -D NO_SSL2 -D NO_SSL3 /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=1


#
# SSL Libs:
#    1. ${LIBCRYPTO}.dll
#    2. ${LIBSSL}.dll
# Where LIBCRYPTO (#1.) and LIBSSL (#2.) are defined as follows:
#    v1.1: libcrypto-1.1-x64.dll and libssl-1.1-x64.dll
#    v3: libcrypto-3-x64.dll and libssl-3-x64.dll
# On *nix libcrypto.so.* and libssl.so.* (where suffix is a version indicator).
#
PRJ_LIBS = \
	"$(SSL_INSTALL_FOLDER)\lib\libssl.lib" \
	"$(SSL_INSTALL_FOLDER)\lib\libcrypto.lib" \
	User32.Lib WS2_32.Lib Gdi32.Lib AdvAPI32.Lib Crypt32.Lib

# Define the standard targets which calls rules.vc
!include "targets.vc"



#---------------------------------------------------------------------
# Project specific targets
#---------------------------------------------------------------------

all: setup default-target

clean: default-clean
	@if exist $(WIN_DIR)\..\manifest.uuid del $(WIN_DIR)\..\manifest.uuid

realclean: clean default-hose

# Explicit dependency rules
$(PRJ_OBJS): $(TMP_DIR)\tls.tcl.h $(TMP_DIR)\tlsUuid.h

# We must define a pkgindex target that will create a pkgIndex.tcl
# file in the $(OUT_DIR) directory. We can just redirect to the
# default-pkgindex target for our sample extension.







>

















>
>








<

|







36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70

71
72
73
74
75
76
77
78
79

# Define any additional project include flags
# SSL_INSTALL_FOLDER = with the OpenSSL installation folder following.
PRJ_INCLUDES = -I"$(SSL_INSTALL_FOLDER)\include" -I"$(OPENSSL_INSTALL_DIR)\include" -I"$(TMP_DIR)"

# Define any additional compiler flags that might be required for the project
PRJ_DEFINES = -D NO_SSL2 -D NO_SSL3 /D_CRT_SECURE_NO_WARNINGS /D_CRT_NONSTDC_NO_DEPRECATE /D__STDC_WANT_SECURE_LIB__=1
# /DTCLEXT_TCLTLS_DEBUG

#
# SSL Libs:
#    1. ${LIBCRYPTO}.dll
#    2. ${LIBSSL}.dll
# Where LIBCRYPTO (#1.) and LIBSSL (#2.) are defined as follows:
#    v1.1: libcrypto-1.1-x64.dll and libssl-1.1-x64.dll
#    v3: libcrypto-3-x64.dll and libssl-3-x64.dll
# On *nix libcrypto.so.* and libssl.so.* (where suffix is a version indicator).
#
PRJ_LIBS = \
	"$(SSL_INSTALL_FOLDER)\lib\libssl.lib" \
	"$(SSL_INSTALL_FOLDER)\lib\libcrypto.lib" \
	User32.Lib WS2_32.Lib Gdi32.Lib AdvAPI32.Lib Crypt32.Lib

# Define the standard targets which calls rules.vc
!include "targets.vc"

.SUFFIXES: .c .obj .res .man

#---------------------------------------------------------------------
# Project specific targets
#---------------------------------------------------------------------

all: setup default-target

clean: default-clean


realclean: default-hose

# Explicit dependency rules
$(PRJ_OBJS): $(TMP_DIR)\tls.tcl.h $(TMP_DIR)\tlsUuid.h

# We must define a pkgindex target that will create a pkgIndex.tcl
# file in the $(OUT_DIR) directory. We can just redirect to the
# default-pkgindex target for our sample extension.
87
88
89
90
91
92
93
94
95
96



97
98
99
100
101
102
103




104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

119
120
121

122
123
124

	    switch -regexp -- $$line "^$$" - {^\s*#} continue
	    regsub -all {\\} $$line {\\\\} line
	    regsub -all {"} $$line {\"} line
	    puts "\"$$line\\n\""
	}
<<

# Manifest which defines fossil/git commit id for build-info command
$(ROOT)\manifest.uuid:
    if not exist $(ROOT)\manifest.uuid (



	copy $(WIN_DIR)\gitmanifest.in $(ROOT)\manifest.uuid
	where git
	if ERRORLEVEL 0 (
	    git rev-parse HEAD >>$(ROOT)\manifest.uuid
	) else (
	    echo unknown >>$(ROOT)\manifest.uuid
	)




    )

$(TMP_DIR)\tlsUuid.h:	$(ROOT)\manifest.uuid
	copy $(WIN_DIR)\tlsUuid.h.in+$(ROOT)\manifest.uuid $(TMP_DIR)\tlsUuid.h
	echo: >>$(TMP_DIR)\tlsUuid.h


# The default install target only installs binaries and scripts so add
# an additional target for our documentation. Note this *adds* a target
# since no commands are listed after it. The original targets for
# install (from targets.vc) will remain.
install: pkgindex default-install default-install-docs-html
    if exist "$(SSL_INSTALL_FOLDER)\bin\libcrypto-*-x64.dll" (
        xcopy /c /y "$(SSL_INSTALL_FOLDER)\bin\libcrypto-*-x64.dll" "$(PRJ_INSTALL_DIR)"
    )

    if exist "$(SSL_INSTALL_FOLDER)\bin\libssl-*-x64.dll" (
        xcopy /c /y "$(SSL_INSTALL_FOLDER)\bin\libssl-*-x64.dll" "$(PRJ_INSTALL_DIR)"
    )


# Test package
test: default-test








|
|
|
>
>
>
|
|
|
|

|

>
>
>
>
|
<
|
|
|
<






|
|
<
>
|
|
<
>



>
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113

114
115
116

117
118
119
120
121
122
123
124

125
126
127

128
129
130
131
132
	    switch -regexp -- $$line "^$$" - {^\s*#} continue
	    regsub -all {\\} $$line {\\\\} line
	    regsub -all {"} $$line {\"} line
	    puts "\"$$line\\n\""
	}
<<

# Use manifest file which defines fossil/git commit id for build-info command
$(TMP_DIR)\manifest.uuid:
!if exist($(ROOT)\manifest.uuid)
	@copy "$(ROOT)\manifest.uuid" "$(TMP_DIR)\manifest.uuid"
!else
!if exist($(ROOT)\.git)
	@copy "$(WIN_DIR)\gitmanifest.in" "$(TMP_DIR)\manifest.uuid"
	@for /f "delims=" %i in ('where git') do (set GIT_PATH=%i)
	@if [%GIT_PATH%] NEQ [] (
		@git rev-parse HEAD >>$(TMP_DIR)\manifest.uuid
	) else (
		@echo unknown >>$(TMP_DIR)\manifest.uuid
	)
!else
	@echo unknown >$(TMP_DIR)\manifest.uuid
!endif
!endif


$(TMP_DIR)\tlsUuid.h:	$(TMP_DIR)\manifest.uuid
	@copy $(WIN_DIR)\tlsUuid.h.in+$(TMP_DIR)\manifest.uuid $(TMP_DIR)\tlsUuid.h
	@echo: >>$(TMP_DIR)\tlsUuid.h


# The default install target only installs binaries and scripts so add
# an additional target for our documentation. Note this *adds* a target
# since no commands are listed after it. The original targets for
# install (from targets.vc) will remain.
install: pkgindex default-install default-install-docs-html
!if exist($(SSL_INSTALL_FOLDER)\bin\libcrypto-*-x64.dll)
	xcopy /c /y "$(SSL_INSTALL_FOLDER)\bin\libcrypto-*-x64.dll" "$(PRJ_INSTALL_DIR)"

!endif
!if exist($(SSL_INSTALL_FOLDER)\bin\libssl-*-x64.dll)
	xcopy /c /y "$(SSL_INSTALL_FOLDER)\bin\libssl-*-x64.dll" "$(PRJ_INSTALL_DIR)"

!endif

# Test package
test: default-test