summaryrefslogtreecommitdiff
path: root/Buildscr
diff options
context:
space:
mode:
Diffstat (limited to 'Buildscr')
-rw-r--r--Buildscr48
1 files changed, 24 insertions, 24 deletions
diff --git a/Buildscr b/Buildscr
index a1f1e63..2272f8d 100644
--- a/Buildscr
+++ b/Buildscr
@@ -15,39 +15,39 @@ in halibut do perl -e 'print "\n\\versionid Halibut version $$ARGV[0]\n"' $(Vers
in halibut do echo '/* Generated by automated build script */' > version.h
in halibut do echo '$#define VERSION "version $(Version)"' >> version.h
-set Rel
-ifneq "$(RELEASE)" "" set Rel RELEASE=$(RELEASE)
+# Substitute the version into configure.ac.
+in halibut do perl -i -pe 's!NOVERSION!$(Version)!' configure.ac
-set Basename halibut-$(Version)
+# Run autotools.
+in halibut do ./autogen.sh
# Make the source archive.
-in halibut do ./release.sh $(Basename) $(Version)
+in . do mkdir builddist
+in builddist do ../halibut/configure && make dist
# Build a Windows binary of Halibut using clang-cl.
-in halibut with clangcl64 do make CC='clang --target=x86_64-pc-windows-msvc18.0.0 -D_CRT_SECURE_NO_WARNINGS' CC_LINK='lld-link -defaultlib:libcmt -out:$$@' EXE=.exe
-in halibut do mv build/halibut.exe .
-in halibut do rm -rf build
+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
+
delegate windows
# 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 "$(winsigncode)" "" in halibut do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/halibut/ halibut.exe
- return halibut/halibut.exe
+ ifneq "$(winsigncode)" "" in buildwin do $(winsigncode) -i http://www.chiark.greenend.org.uk/~sgtatham/halibut/ halibut.exe
+ return buildwin/halibut.exe
enddelegate
-# Build a local binary of Halibut in order to build the docs. Make
-# sure to tag it with the supplied version number, so that the
-# release docs announce themselves as having been built with the
-# release Halibut (e.g. PDF's Producer property).
-in halibut do make $(Rel)
-
-# And now build the docs.
-in halibut/doc do make
-
-deliver halibut/*.tar.gz $@
-deliver halibut/halibut.exe $@
-deliver halibut/doc/halibut.pdf $@
-deliver halibut/doc/halibut.txt $@
-deliver halibut/doc/halibut.chm $@
-deliver halibut/doc/*.html $@
+# 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 $@