summaryrefslogtreecommitdiff
path: root/Buildscr
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2017-05-20 08:42:45 +0100
committerSimon Tatham <anakin@pobox.com>2017-05-20 08:48:11 +0100
commit41394e187f6fad8dfb44baefe7603b77c0bff57b (patch)
tree6fb71966e4473fa2169047112dcd2abc52724240 /Buildscr
parent80d18da9a127d1d7d111625133742691b9aeedfe (diff)
downloadhalibut-41394e187f6fad8dfb44baefe7603b77c0bff57b.zip
halibut-41394e187f6fad8dfb44baefe7603b77c0bff57b.tar.gz
halibut-41394e187f6fad8dfb44baefe7603b77c0bff57b.tar.bz2
halibut-41394e187f6fad8dfb44baefe7603b77c0bff57b.tar.xz
Replace Halibut's makefiles with autotools.
This commit updates the libcharset submodule to incorporate the autotools-ification that I just pushed to that subproject, and builds on it by replacing Halibut's own makefile system similarly with an autotools setup. The new Makefile.am incorporates both of the old Makefile and doc/Makefile, so a single run of 'make' should now build Halibut itself and all the formats of its own documentation, which also means that the automake-generated 'make install' target can do the right thing in terms of putting an appropriate subset of those documentation formats in the assorted installation directories. The old Makefiles are gone, as is release.sh (which is now obsolete because autotools's 'make dist' doesn't do anything obviously wrong). The bob build script is comprehensively rewritten, but should still work - even the clang-based Windows build can use the autotools-generated makefile system, provided I do the libcharset build with a manual override of bin_PROGRAMS to prevent it trying to build the libcharset supporting utilities (which are not completely Windows-portable).
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 $@