Fossil SCM
Update the makemake.tcl script.
Commit
771ab1943904d51fde81afca3afa163be42fb271e9a21ca1dd8b65252cd4971d
Parent
c62f663e195948d…
1 file changed
+39
-6
+39
-6
| --- tools/makemake.tcl | ||
| +++ tools/makemake.tcl | ||
| @@ -1571,11 +1571,10 @@ | ||
| 1571 | 1571 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1572 | 1572 | SSLLIBDIR = $(SSLDIR) |
| 1573 | 1573 | !else |
| 1574 | 1574 | SSLLIBDIR = $(SSLDIR) |
| 1575 | 1575 | !endif |
| 1576 | -SSLLFLAGS = /nologo /opt:ref /debug | |
| 1577 | 1576 | SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib |
| 1578 | 1577 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1579 | 1578 | !message Using 'x64' platform for OpenSSL... |
| 1580 | 1579 | SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers |
| 1581 | 1580 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| @@ -1643,16 +1642,27 @@ | ||
| 1643 | 1642 | !endif |
| 1644 | 1643 | |
| 1645 | 1644 | !if $(FOSSIL_ENABLE_WINXP)!=0 |
| 1646 | 1645 | XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1 |
| 1647 | 1646 | CFLAGS = $(CFLAGS) $(XPCFLAGS) |
| 1647 | +# | |
| 1648 | +# NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and | |
| 1649 | +# explicit initialization is redundant, but is required for post-built edits. | |
| 1650 | +# | |
| 1648 | 1651 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1649 | -XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02 | |
| 1652 | +XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02 | |
| 1650 | 1653 | !else |
| 1651 | -XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01 | |
| 1654 | +XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01 | |
| 1652 | 1655 | !endif |
| 1653 | 1656 | LDFLAGS = $(LDFLAGS) $(XPLDFLAGS) |
| 1657 | +# | |
| 1658 | +# NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS | |
| 1659 | +# is applied in a separate post-build step, see below for more information. | |
| 1660 | +# | |
| 1661 | +!if $(FOSSIL_ENABLE_SSL)!=0 | |
| 1662 | +SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS) | |
| 1663 | +!endif | |
| 1654 | 1664 | !endif |
| 1655 | 1665 | |
| 1656 | 1666 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1657 | 1667 | !if $(DEBUG)!=0 |
| 1658 | 1668 | CRTFLAGS = /MDd |
| @@ -1823,19 +1833,42 @@ | ||
| 1823 | 1833 | @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd |
| 1824 | 1834 | |
| 1825 | 1835 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1826 | 1836 | openssl: |
| 1827 | 1837 | @echo Building OpenSSL from "$(SSLDIR)"... |
| 1838 | +!if $(FOSSIL_ENABLE_WINXP)!=0 | |
| 1839 | + @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration... | |
| 1840 | +!endif | |
| 1828 | 1841 | !ifdef PERLDIR |
| 1829 | 1842 | @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd |
| 1830 | 1843 | !else |
| 1831 | 1844 | @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd |
| 1832 | 1845 | !endif |
| 1833 | -!if $(FOSSIL_ENABLE_WINXP)!=0 | |
| 1834 | - @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd | |
| 1835 | -!else | |
| 1836 | 1846 | @pushd "$(SSLDIR)" && $(MAKE) && popd |
| 1847 | +!if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0 | |
| 1848 | +# | |
| 1849 | +# NOTE: Appending custom linker flags to the OpenSSL default linker flags is | |
| 1850 | +# somewhat difficult, as summarized in this Fossil Forum post: | |
| 1851 | +# | |
| 1852 | +# https://fossil-scm.org/forum/forumpost/a9a2d6af28b | |
| 1853 | +# | |
| 1854 | +# Therefore the custom linker flags required for Windows XP dynamic builds are | |
| 1855 | +# applied in a separate post-build step. | |
| 1856 | +# | |
| 1857 | +# If the build stops here, or if the custom linker flags are outside the scope | |
| 1858 | +# of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking | |
| 1859 | +# the OpenSSL makefile by hand. | |
| 1860 | +# | |
| 1861 | +# Also note that this step changes the subsystem for the OpenSSL DLLs from | |
| 1862 | +# WINDOWS to CONSOLE, but which has no effect on DLLs. | |
| 1863 | +# | |
| 1864 | + @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs... | |
| 1865 | + @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) <<<NEXT_LINE>>> | |
| 1866 | + do @( <<<NEXT_LINE>>> | |
| 1867 | + echo %F & <<<NEXT_LINE>>> | |
| 1868 | + link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 <<<NEXT_LINE>>> | |
| 1869 | + ) | |
| 1837 | 1870 | !endif |
| 1838 | 1871 | |
| 1839 | 1872 | clean-openssl: |
| 1840 | 1873 | @pushd "$(SSLDIR)" && $(MAKE) clean && popd |
| 1841 | 1874 | !endif |
| 1842 | 1875 |
| --- tools/makemake.tcl | |
| +++ tools/makemake.tcl | |
| @@ -1571,11 +1571,10 @@ | |
| 1571 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1572 | SSLLIBDIR = $(SSLDIR) |
| 1573 | !else |
| 1574 | SSLLIBDIR = $(SSLDIR) |
| 1575 | !endif |
| 1576 | SSLLFLAGS = /nologo /opt:ref /debug |
| 1577 | SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib |
| 1578 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1579 | !message Using 'x64' platform for OpenSSL... |
| 1580 | SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers |
| 1581 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| @@ -1643,16 +1642,27 @@ | |
| 1643 | !endif |
| 1644 | |
| 1645 | !if $(FOSSIL_ENABLE_WINXP)!=0 |
| 1646 | XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1 |
| 1647 | CFLAGS = $(CFLAGS) $(XPCFLAGS) |
| 1648 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1649 | XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.02 |
| 1650 | !else |
| 1651 | XPLDFLAGS = $(XPLDFLAGS) /SUBSYSTEM:CONSOLE,5.01 |
| 1652 | !endif |
| 1653 | LDFLAGS = $(LDFLAGS) $(XPLDFLAGS) |
| 1654 | !endif |
| 1655 | |
| 1656 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1657 | !if $(DEBUG)!=0 |
| 1658 | CRTFLAGS = /MDd |
| @@ -1823,19 +1833,42 @@ | |
| 1823 | @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd |
| 1824 | |
| 1825 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1826 | openssl: |
| 1827 | @echo Building OpenSSL from "$(SSLDIR)"... |
| 1828 | !ifdef PERLDIR |
| 1829 | @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd |
| 1830 | !else |
| 1831 | @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd |
| 1832 | !endif |
| 1833 | !if $(FOSSIL_ENABLE_WINXP)!=0 |
| 1834 | @pushd "$(SSLDIR)" && $(MAKE) "CC=cl $(XPCFLAGS)" "LFLAGS=$(XPLDFLAGS)" && popd |
| 1835 | !else |
| 1836 | @pushd "$(SSLDIR)" && $(MAKE) && popd |
| 1837 | !endif |
| 1838 | |
| 1839 | clean-openssl: |
| 1840 | @pushd "$(SSLDIR)" && $(MAKE) clean && popd |
| 1841 | !endif |
| 1842 |
| --- tools/makemake.tcl | |
| +++ tools/makemake.tcl | |
| @@ -1571,11 +1571,10 @@ | |
| 1571 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1572 | SSLLIBDIR = $(SSLDIR) |
| 1573 | !else |
| 1574 | SSLLIBDIR = $(SSLDIR) |
| 1575 | !endif |
| 1576 | SSLLIB = libssl.lib libcrypto.lib user32.lib gdi32.lib crypt32.lib |
| 1577 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1578 | !message Using 'x64' platform for OpenSSL... |
| 1579 | SSLCONFIG = VC-WIN64A no-asm no-ssl3 no-weak-ssl-ciphers |
| 1580 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| @@ -1643,16 +1642,27 @@ | |
| 1642 | !endif |
| 1643 | |
| 1644 | !if $(FOSSIL_ENABLE_WINXP)!=0 |
| 1645 | XPCFLAGS = $(XPCFLAGS) /D_WIN32_WINNT=0x0501 /D_USING_V110_SDK71_=1 |
| 1646 | CFLAGS = $(CFLAGS) $(XPCFLAGS) |
| 1647 | # |
| 1648 | # NOTE: For regular builds, /OSVERSION defaults to the /SUBSYSTEM version and |
| 1649 | # explicit initialization is redundant, but is required for post-built edits. |
| 1650 | # |
| 1651 | !if "$(PLATFORM)"=="amd64" || "$(PLATFORM)"=="x64" |
| 1652 | XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.02 /SUBSYSTEM:CONSOLE,5.02 |
| 1653 | !else |
| 1654 | XPLDFLAGS = $(XPLDFLAGS) /OSVERSION:5.01 /SUBSYSTEM:CONSOLE,5.01 |
| 1655 | !endif |
| 1656 | LDFLAGS = $(LDFLAGS) $(XPLDFLAGS) |
| 1657 | # |
| 1658 | # NOTE: Only XPCFLAGS is forwarded to the OpenSSL configuration, and XPLDFLAGS |
| 1659 | # is applied in a separate post-build step, see below for more information. |
| 1660 | # |
| 1661 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1662 | SSLCONFIG = $(SSLCONFIG) $(XPCFLAGS) |
| 1663 | !endif |
| 1664 | !endif |
| 1665 | |
| 1666 | !if $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1667 | !if $(DEBUG)!=0 |
| 1668 | CRTFLAGS = /MDd |
| @@ -1823,19 +1833,42 @@ | |
| 1833 | @pushd "$(ZLIBDIR)" && $(MAKE) /f win32\Makefile.msc clean && popd |
| 1834 | |
| 1835 | !if $(FOSSIL_ENABLE_SSL)!=0 |
| 1836 | openssl: |
| 1837 | @echo Building OpenSSL from "$(SSLDIR)"... |
| 1838 | !if $(FOSSIL_ENABLE_WINXP)!=0 |
| 1839 | @echo Passing XPCFLAGS = [ $(XPCFLAGS) ] to the OpenSSL configuration... |
| 1840 | !endif |
| 1841 | !ifdef PERLDIR |
| 1842 | @pushd "$(SSLDIR)" && "$(PERLDIR)\$(PERL)" Configure $(SSLCONFIG) && popd |
| 1843 | !else |
| 1844 | @pushd "$(SSLDIR)" && "$(PERL)" Configure $(SSLCONFIG) && popd |
| 1845 | !endif |
| 1846 | @pushd "$(SSLDIR)" && $(MAKE) && popd |
| 1847 | !if $(FOSSIL_ENABLE_WINXP)!=0 && $(FOSSIL_DYNAMIC_BUILD)!=0 |
| 1848 | # |
| 1849 | # NOTE: Appending custom linker flags to the OpenSSL default linker flags is |
| 1850 | # somewhat difficult, as summarized in this Fossil Forum post: |
| 1851 | # |
| 1852 | # https://fossil-scm.org/forum/forumpost/a9a2d6af28b |
| 1853 | # |
| 1854 | # Therefore the custom linker flags required for Windows XP dynamic builds are |
| 1855 | # applied in a separate post-build step. |
| 1856 | # |
| 1857 | # If the build stops here, or if the custom linker flags are outside the scope |
| 1858 | # of `editbin` or `link /EDIT` (i.e. additional libraries), consider tweaking |
| 1859 | # the OpenSSL makefile by hand. |
| 1860 | # |
| 1861 | # Also note that this step changes the subsystem for the OpenSSL DLLs from |
| 1862 | # WINDOWS to CONSOLE, but which has no effect on DLLs. |
| 1863 | # |
| 1864 | @echo Applying XPLDFLAGS = [ $(XPLDFLAGS) ] to the OpenSSL DLLs... |
| 1865 | @for /F "usebackq delims=" %F in (`dir /A:-D/B "$(SSLDIR)\*.dll" 2^>nul`) <<<NEXT_LINE>>> |
| 1866 | do @( <<<NEXT_LINE>>> |
| 1867 | echo %F & <<<NEXT_LINE>>> |
| 1868 | link /EDIT /NOLOGO $(XPLDFLAGS) "$(SSLDIR)\%F" || exit 1 <<<NEXT_LINE>>> |
| 1869 | ) |
| 1870 | !endif |
| 1871 | |
| 1872 | clean-openssl: |
| 1873 | @pushd "$(SSLDIR)" && $(MAKE) clean && popd |
| 1874 | !endif |
| 1875 |