File: Buildscr

package info (click to toggle)
xtruss 0.0~git20241011.27fafffe-1
  • links: PTS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,172 kB
  • sloc: ansic: 17,121; sh: 20; makefile: 2
file content (36 lines) | stat: -rw-r--r-- 1,272 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# -*- sh -*-
#
# bob script to build the xtruss tarball.

module xtruss

set Version $(!builddate).$(vcsid)

# use perl to avoid inconsistent behaviour of echo '\v'
in xtruss do perl -e 'print "\n\\versionid xtruss version $$ARGV[0]\n"' $(Version) >> doc/man-xtruss.but
in xtruss do perl -e 'print "$#define PACKAGE_VERSION \"$$ARGV[0]\"\n"' $(Version) > version.h

# In cmake/gitcommit.cmake, replace the default output "unavailable"
# with the commit string generated by bob, so that people rebuilding
# the source archive will still get a useful value.
in xtruss do sed -i '/set(DEFAULT_COMMIT/s/unavailable/$(vcsfullid)/' cmake/gitcommit.cmake

# Build the man page.
in . do mkdir build-doc
in build-doc do cmake ../xtruss/doc
in build-doc do make -j$(nproc)
in build-doc do cp xtruss.1 ../xtruss

# Test-build the program itself, in STRICT mode. We should ensure this
# works before being willing to ship any tarball based on it.
in . do mkdir build-test
in build-test do cmake ../xtruss -DSTRICT=ON
in build-test do make -j$(nproc)

in . do cp -R xtruss xtruss-$(Version)
in . do tar chzvf xtruss-$(Version).tar.gz xtruss-$(Version)

in xtruss/doc do halibut --html=manpage.html man-xtruss.but

deliver xtruss-$(Version).tar.gz $@
deliver xtruss/doc/manpage.html $@