# -*- sh -*- # Build script to build Halibut releases. module halibut ifnexist halibut/charset checkout charset halibut/charset set Version $(!builddate).$(vcsid) ifneq "$(RELEASE)" "" set Version $(RELEASE) # use perl to avoid inconsistent behaviour of echo '\v' in halibut do perl -e 'print "\n\\versionid Halibut version $$ARGV[0]\n"' $(Version) >> doc/manpage.but # Write out a version.h that contains the real version number. in halibut do echo '/* Generated by automated build script */' > version.h in halibut do echo '$#define VERSION "version $(Version)"' >> version.h # Substitute the version into configure.ac. in halibut do perl -i -pe 's!NOVERSION!$(Version)!' configure.ac # Run autotools. in halibut do ./autogen.sh # Make the source archive. in . do mkdir builddist in builddist do ../halibut/configure && make dist # Build a Windows binary of Halibut using clang-cl. in . do mkdir buildwin in buildwin do mkdir lld-link-bodge in buildwin/lld-link-bodge do { echo '$#!/bin/sh'; echo 'exec lld-link "$$@"'; } > lld-link.exe && chmod +x lld-link.exe in buildwin do ../halibut/configure in buildwin/charset with clangcl64 do PATH="$$PWD/lld-link-bodge:$$PATH" make CC='clang --target=x86_64-pc-windows-msvc18.0.0 -D_CRT_SECURE_NO_WARNINGS -fuse-ld=lld' bin_PROGRAMS= in buildwin with clangcl64 do PATH="$$PWD/lld-link-bodge:$$PATH" make CC='clang --target=x86_64-pc-windows-msvc18.0.0 -D_CRT_SECURE_NO_WARNINGS -fuse-ld=lld' EXEEXT=.exe halibut.exe # Code-sign the Windows binary, if the local bob config provides # a script to do so. We assume here that the script accepts an -i # option to provide a 'more info' URL, and that it signs the file # in place. ifneq "$(cross_winsigncode)" "" in buildwin do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/halibut/ halibut.exe # Do a full local build of Halibut, which will also build the docs. in builddist do make deliver builddist/*.tar.gz $@ deliver buildwin/halibut.exe $@ deliver builddist/halibut.pdf $@ deliver builddist/halibut.txt $@ deliver builddist/halibut.chm $@ deliver builddist/*.html $@