Debian Codegraph @

Buildscr

raw
1 # -*- sh -*-
2 #
3 # bob script to build the agedu tarball.
4
5 module agedu
6
7 set Version $(!builddate).$(vcsid)
8
9 # use perl to avoid inconsistent behaviour of echo '\v'
10 in agedu do perl -e 'print "$#define AGEDU_VERSION \"$$ARGV[0]\"\n"' $(Version) >> version.h
11 in agedu do perl -e 'print "\n\\versionid agedu version $$ARGV[0]\n"' $(Version) >> agedu.but
12
13 # Build the man page. While we're in there, we also ensure agedu
14 # builds, and runs its help.
15 in . do mkdir docbuild
16 in docbuild do cmake ../agedu
17 in docbuild do make -j$(nproc) VERBOSE=1
18 in docbuild do ./agedu --help
19
20 in . do cp -R agedu agedu-$(Version)
21 in . do cp -R docbuild/agedu.1 agedu-$(Version)
22 in . do tar chzvf agedu-$(Version).tar.gz agedu-$(Version)
23
24 in agedu do halibut --html=manpage.html agedu.but
25 in agedu do halibut --html=tree.html tree.but
26
27 deliver agedu-$(Version).tar.gz $@
28 deliver agedu/manpage.html $@
29 deliver agedu/tree.html $@
30
31 in . do mkdir winbuild
32 in winbuild do cmake ../agedu -DCMAKE_TOOLCHAIN_FILE=$(cmake_toolchain_clangcl64) -DCMAKE_BUILD_TYPE=Release -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded -DCMAKE_C_FLAGS_RELEASE="/MT /O2"
33 in winbuild do make -j$(nproc) VERBOSE=1
34 # Code-sign this Windows binary, if the local bob config provides a
35 # script to do so. We assume here that the script accepts an -i
36 # option to provide a 'more info' URL, and that it signs the file in
37 # place.
38 ifneq "$(cross_winsigncode)" "" in winbuild do $(cross_winsigncode) -i https://www.chiark.greenend.org.uk/~sgtatham/agedu/ ageduscan.exe
39
40 deliver winbuild/ageduscan.exe $@