mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-01 03:22:48 -05:00
Integrate the 'doc' subdir into the CMake system.
The standalone separate doc/Makefile is gone, replaced by a CMakeLists.txt that makes 'doc' function as a subdirectory of the main CMake build system. This auto-detects Halibut, and if it's present, uses it to build the man pages and the various forms of the main manual, including the Windows CHM help file in particular. One awkward thing I had to do was to move just one config directive in blurb.but into its own file: the one that cites a relative path to the stylesheet file to put into the CHM. CMake builds often like to be out-of-tree, so there's no longer a fixed relative path between the build directory and chm.css. And Halibut has no concept of an include path to search for files cited by other files, so I can't fix that with an -I option on the Halibut command line. So I moved that single config directive into its own file, and had CMake write out a custom version of that file in the build directory citing the right path. (Perhaps in the longer term I should fix that omission in Halibut; out-of-tree friendliness seems like a useful feature. But even if I do, I still need this build to work now.)
This commit is contained in:
48
Buildscr
48
Buildscr
@ -55,7 +55,7 @@ ifneq "$(SNAPSHOT)" "" set Puttytextver PuTTY development snapshot $(Date).$(vcs
|
||||
ifneq "$(SNAPSHOT)" "" set Textver Development snapshot $(Date).$(vcsid)
|
||||
ifeq "$(RELEASE)$(PRERELEASE)$(SNAPSHOT)" "" set Puttytextver PuTTY custom build $(Date).$(vcsid)
|
||||
ifeq "$(RELEASE)$(PRERELEASE)$(SNAPSHOT)" "" set Textver Custom build $(Date).$(vcsid)
|
||||
set Docmakever VERSION="$(Puttytextver)"
|
||||
in putty/doc do echo "\\versionid $(Puttytextver)" > version.but
|
||||
|
||||
# Set up the version string for use in the SSH connection greeting.
|
||||
#
|
||||
@ -122,9 +122,13 @@ in putty do echo '$#define BINARY_VERSION $(Winvercommas)' >> version.h
|
||||
# the source archive will still get a useful value.
|
||||
in putty do sed -i '/set(DEFAULT_COMMIT/s/unavailable/$(vcsfullid)/' cmake/gitcommit.cmake
|
||||
|
||||
in . do mkdir docbuild
|
||||
in docbuild do cmake ../putty
|
||||
in docbuild do make -j$(nproc) VERBOSE=1 doc
|
||||
in putty/doc do cp ../../docbuild/doc/*.1 .
|
||||
|
||||
in putty do ./mksrcarc.sh
|
||||
in putty do ./mkunxarc.sh '$(Uxarcsuffix)' $(Docmakever)
|
||||
in putty/doc do make $(Docmakever) putty.chm -j$(nproc)
|
||||
in putty do ./mkunxarc.sh '$(Uxarcsuffix)'
|
||||
|
||||
delegate -
|
||||
# Run the test suite, under self-delegation so that we don't leave any
|
||||
@ -194,10 +198,10 @@ ifneq "$(cross_winsigncode)" "" in putty/windows do $(cross_winsigncode) -N -i h
|
||||
in putty do for hash in md5 sha1 sha256 sha512; do for dir_plat in "build32 w32" "build64 w64" "abuild32 wa32" "abuild64 wa64"; do set -- $$dir_plat; (cd windows/$$1 && $${hash}sum *.exe | sed 's!\( \+\)!\1'$$2'/!;s!$$! (installer version)!') >> $${hash}sums.installer; done; done
|
||||
|
||||
# Build a WiX MSI installer, for each build flavour.
|
||||
in putty/windows with wixonlinux do candle -arch x86 -dRealPlatform=x86 -dDllOk=yes -dBuilddir=build32/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer32.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x64 -dRealPlatform=x64 -dDllOk=yes -dBuilddir=build64/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer64.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x64 -dRealPlatform=Arm -dDllOk=no -dBuilddir=abuild32/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installera32.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x64 -dRealPlatform=Arm64 -dDllOk=no -dBuilddir=abuild64/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installera64.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x86 -dRealPlatform=x86 -dDllOk=yes -dBuilddir=build32/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" -dHelpFilePath="../../docbuild/doc/putty.chm" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer32.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x64 -dRealPlatform=x64 -dDllOk=yes -dBuilddir=build64/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" -dHelpFilePath="../../docbuild/doc/putty.chm" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installer64.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x64 -dRealPlatform=Arm -dDllOk=no -dBuilddir=abuild32/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" -dHelpFilePath="../../docbuild/doc/putty.chm" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installera32.msi -spdb
|
||||
in putty/windows with wixonlinux do candle -arch x64 -dRealPlatform=Arm64 -dDllOk=no -dBuilddir=abuild64/ -dWinver="$(Winver)" -dPuttytextver="$(Puttytextver)" -dHelpFilePath="../../docbuild/doc/putty.chm" installer.wxs && light -ext WixUIExtension -ext WixUtilExtension -sval installer.wixobj -o installera64.msi -spdb
|
||||
|
||||
# Change the width field for our dialog background image so that it
|
||||
# doesn't stretch across the whole dialog. (WiX's default one does; we
|
||||
@ -219,13 +223,13 @@ ifneq "$(cross_winsigncode)" "" in putty/windows do $(cross_winsigncode) -i http
|
||||
|
||||
# Build the standalone binaries, in both 32- and 64-bit flavours.
|
||||
# These differ from the previous set in that they embed the help file.
|
||||
in putty/windows/build32 with cmake_at_least_3.20 do cmake . -DPUTTY_EMBEDDED_CHM_FILE=$$(realpath ../../doc/putty.chm)
|
||||
in putty/windows/build32 with cmake_at_least_3.20 do cmake . -DPUTTY_EMBEDDED_CHM_FILE=$$(realpath ../../../docbuild/doc/putty.chm)
|
||||
in putty/windows/build32 with cmake_at_least_3.20 do make -j$(nproc) VERBOSE=1
|
||||
in putty/windows/build64 with cmake_at_least_3.20 do cmake . -DPUTTY_EMBEDDED_CHM_FILE=$$(realpath ../../doc/putty.chm)
|
||||
in putty/windows/build64 with cmake_at_least_3.20 do cmake . -DPUTTY_EMBEDDED_CHM_FILE=$$(realpath ../../../docbuild/doc/putty.chm)
|
||||
in putty/windows/build64 with cmake_at_least_3.20 do make -j$(nproc) VERBOSE=1
|
||||
in putty/windows/abuild32 with cmake_at_least_3.20 do cmake . -DPUTTY_EMBEDDED_CHM_FILE=$$(realpath ../../doc/putty.chm)
|
||||
in putty/windows/abuild32 with cmake_at_least_3.20 do cmake . -DPUTTY_EMBEDDED_CHM_FILE=$$(realpath ../../../docbuild/doc/putty.chm)
|
||||
in putty/windows/abuild32 with cmake_at_least_3.20 do make -j$(nproc) VERBOSE=1
|
||||
in putty/windows/abuild64 with cmake_at_least_3.20 do cmake . -DPUTTY_EMBEDDED_CHM_FILE=$$(realpath ../../doc/putty.chm)
|
||||
in putty/windows/abuild64 with cmake_at_least_3.20 do cmake . -DPUTTY_EMBEDDED_CHM_FILE=$$(realpath ../../../docbuild/doc/putty.chm)
|
||||
in putty/windows/abuild64 with cmake_at_least_3.20 do make -j$(nproc) VERBOSE=1
|
||||
|
||||
# Build the 'old' binaries, which should still run on all 32-bit
|
||||
@ -253,14 +257,12 @@ in putty/windows do mkdir deliver
|
||||
in putty/windows do for subdir in build32 abuild32 build64 abuild64 buildold; do mkdir deliver/$$subdir; done
|
||||
in putty/windows do while read x; do mv $$x deliver/$$x; mv $$x.map deliver/$$x.map; done < to-sign.txt
|
||||
|
||||
in putty/doc do make mostlyclean
|
||||
in putty/doc do make $(Docmakever) -j$(nproc)
|
||||
in putty/windows/deliver/buildold do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../doc/putty.chm
|
||||
in putty/windows/deliver/build32 do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../doc/putty.chm
|
||||
in putty/windows/deliver/build64 do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../doc/putty.chm
|
||||
in putty/windows/deliver/abuild32 do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../doc/putty.chm
|
||||
in putty/windows/deliver/abuild64 do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../doc/putty.chm
|
||||
in putty/doc do zip puttydoc.zip *.html
|
||||
in putty/windows/deliver/buildold do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../../docbuild/doc/putty.chm
|
||||
in putty/windows/deliver/build32 do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../../docbuild/doc/putty.chm
|
||||
in putty/windows/deliver/build64 do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../../docbuild/doc/putty.chm
|
||||
in putty/windows/deliver/abuild32 do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../../docbuild/doc/putty.chm
|
||||
in putty/windows/deliver/abuild64 do zip -k -j putty.zip `ls *.exe | grep -v puttytel` ../../../docbuild/doc/putty.chm
|
||||
in docbuild/doc/html do zip puttydoc.zip *.html
|
||||
|
||||
# Deliver the actual PuTTY release directory into a subdir `putty'.
|
||||
deliver putty/windows/deliver/buildold/*.exe putty/w32old/$@
|
||||
@ -277,10 +279,10 @@ deliver putty/windows/deliver/abuild32/*.exe putty/wa32/$@
|
||||
deliver putty/windows/deliver/abuild32/putty.zip putty/wa32/$@
|
||||
deliver putty/windows/deliver/abuild64/*.exe putty/wa64/$@
|
||||
deliver putty/windows/deliver/abuild64/putty.zip putty/wa64/$@
|
||||
deliver putty/doc/puttydoc.zip putty/$@
|
||||
deliver putty/doc/putty.chm putty/$@
|
||||
deliver putty/doc/puttydoc.txt putty/$@
|
||||
deliver putty/doc/*.html putty/htmldoc/$@
|
||||
deliver docbuild/doc/html/puttydoc.zip putty/$@
|
||||
deliver docbuild/doc/putty.chm putty/$@
|
||||
deliver docbuild/doc/puttydoc.txt putty/$@
|
||||
deliver docbuild/doc/html/*.html putty/htmldoc/$@
|
||||
deliver putty/putty-src.zip putty/$@
|
||||
deliver putty/*.tar.gz putty/$@
|
||||
|
||||
|
Reference in New Issue
Block a user