summaryrefslogtreecommitdiff
path: root/sqlite3/buildfile
blob: e408acbebc00a691e3617677b76030b277dc977d (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# file      : buildfile
# copyright : not copyrighted - public domain

./: exe{sqlite3} doc{INSTALL README} man1{sqlite3} manifest

import libs  = libsqlite3%lib{sqlite3}
import libs += libz%lib{z}

exe{sqlite3}: {h c}{*} $libs testscript

# @@ TMP Workaround GCC bug 84583:
#
#        shell.exe.o.i:165900:40: error: unterminated string literal
#
#        Note: on upgrade check if it is still required.
#
if ($c.id == 'gcc' && $c.target.system == 'mingw32')
  obj{shell}: cc.reprocess = true

gcc = ($c.class == 'gcc')

# Build options.
#
# By default we are going to build a spartan shell without readline support
# since if you are on a system that has readline then you probably already
# have sqlite3 and won't be building this package in the first place. But
# if you want readline, then you can enable it like this:
#
# config.c.poptions=-DHAVE_READLINE config.c.libs="-lreadline -lncurses"
#

# This is the subset of features that we enable by default in libsqlite3 and
# that affect the shell. They can be overridden in the same way.
#
c.poptions =+ -DSQLITE_ENABLE_COLUMN_METADATA -DSQLITE_ENABLE_SESSION=1 \
              -DSQLITE_HAVE_ZLIB

# Both Debian and Fedora add this so gotta be important.
#
if $gcc
  c.coptions += -fno-strict-aliasing

# Disable warnings that pop up with -Wextra. Upstream doesn't seem to care
# about these and it is not easy to disable specific warnings in a way that
# works across compilers/version (some -Wno-* options are only recognized in
# newer versions). Some warnings may still appear for certain (newer)
# platforms/compilers. We pass them through but disable treating them as
# errors.
#
if $gcc
  c.coptions += -Wno-extra -Wno-error

# Don't install INSTALL file.
#
doc{INSTALL}@./: install = false