From 8615892fb76fc99bed2e5437bed14d7d5a7b2322 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Fri, 1 Jun 2018 19:35:15 +0100 Subject: [PATCH] Buildscr: separate 'make all' from 'make cleantestprogs'. When our Windows make commands were serial, 'make all cleantestprogs' was a nice shorthand for 'first build all the binaries, then delete the ones we don't want to ship'. Now they're using -j, that doesn't work so well - last night's snapshot build log shows that the command 'rm -f testbn.exe' from the cleantestprogs target happened _before_ the lld-link command that created testbn.exe in the first place, so that file got shipped into the download directory by mistake. Easily fixed, of course - just run two separate make commands per build directory. --- Buildscr | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Buildscr b/Buildscr index 69cb3213..e44762c2 100644 --- a/Buildscr +++ b/Buildscr @@ -160,12 +160,12 @@ in putty do convert -size 493x58 canvas:white \( icons/putty-48.png -geometry +4 # # For the 32-bit ones, we set a subsystem version of 5.01, which # allows the resulting files to still run on Windows XP. -in putty/windows with clangcl32 do mkdir build32 && Platform=x86 make -f Makefile.clangcl BUILDDIR=build32/ SUBSYSVER=,5.01 $(Makeargs) all cleantestprogs -j$(nproc) -in putty/windows with clangcl64 do mkdir build64 && Platform=x64 make -f Makefile.clangcl BUILDDIR=build64/ $(Makeargs) all cleantestprogs -j$(nproc) +in putty/windows with clangcl32 do mkdir build32 && Platform=x86 make -f Makefile.clangcl BUILDDIR=build32/ SUBSYSVER=,5.01 $(Makeargs) all -j$(nproc) +in putty/windows with clangcl64 do mkdir build64 && Platform=x64 make -f Makefile.clangcl BUILDDIR=build64/ $(Makeargs) all -j$(nproc) # Build experimental Arm Windows binaries. -in putty/windows with clangcl_a32 do mkdir abuild32 && Platform=arm make -f Makefile.clangcl BUILDDIR=abuild32/ SUBSYSVER=,5.01 $(Makeargs) all cleantestprogs -j$(nproc) -in putty/windows with clangcl_a64 do mkdir abuild64 && Platform=arm64 make -f Makefile.clangcl BUILDDIR=abuild64/ $(Makeargs) all cleantestprogs -j$(nproc) +in putty/windows with clangcl_a32 do mkdir abuild32 && Platform=arm make -f Makefile.clangcl BUILDDIR=abuild32/ SUBSYSVER=,5.01 $(Makeargs) all -j$(nproc) +in putty/windows with clangcl_a64 do mkdir abuild64 && Platform=arm64 make -f Makefile.clangcl BUILDDIR=abuild64/ $(Makeargs) all -j$(nproc) # Build the 'old' binaries, which should still run on all 32-bit # versions of Windows back to Win95 (but not Win32s). These link @@ -174,7 +174,16 @@ in putty/windows with clangcl_a64 do mkdir abuild64 && Platform=arm64 make -f Ma # a subsystem version of 4.0, and compile with /arch:IA32 to prevent # the use of modern CPU features like MMX which older machines also # might not have. -in putty/windows with clangcl32_2003 do mkdir buildold && Platform=x86 make -f Makefile.clangcl BUILDDIR=buildold/ $(Makeargs) CCTARGET=i386-pc-windows-msvc13.0.0 SUBSYSVER=,4.0 EXTRA_windows=wincrt0.obj EXTRA_console=crt0.obj XFLAGS=/arch:IA32 all cleantestprogs -j$(nproc) +in putty/windows with clangcl32_2003 do mkdir buildold && Platform=x86 make -f Makefile.clangcl BUILDDIR=buildold/ $(Makeargs) CCTARGET=i386-pc-windows-msvc13.0.0 SUBSYSVER=,4.0 EXTRA_windows=wincrt0.obj EXTRA_console=crt0.obj XFLAGS=/arch:IA32 all -j$(nproc) + +# Remove Windows binaries for the test programs we don't want to ship, +# like testbn.exe. (But we still _built_ them, to ensure the build +# worked.) +in putty/windows do make -f Makefile.clangcl BUILDDIR=build32/ cleantestprogs +in putty/windows do make -f Makefile.clangcl BUILDDIR=build64/ cleantestprogs +in putty/windows do make -f Makefile.clangcl BUILDDIR=abuild32/ cleantestprogs +in putty/windows do make -f Makefile.clangcl BUILDDIR=abuild64/ cleantestprogs +in putty/windows do make -f Makefile.clangcl BUILDDIR=buildold/ cleantestprogs # Code-sign the Windows binaries, if the local bob config provides a # script to do so in a cross-compiling way. We assume here that the