forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswig.BUILD
165 lines (159 loc) · 4.84 KB
/
swig.BUILD
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
licenses(["restricted"]) # GPLv3
exports_files(["LICENSE"])
config_setting(
name = "on_windows",
constraint_values = ["@platforms//os:windows"],
)
cc_binary(
name = "swig",
srcs = [
"Source/Include/swigconfig.h",
"Source/DOH/dohint.h",
"Source/DOH/doh.h",
"Source/Swig/swigfile.h",
"Source/Swig/swigtree.h",
"Source/Swig/swig.h",
"Source/Swig/swigparm.h",
"Source/Swig/swigwrap.h",
"Source/Swig/swigscan.h",
"Source/Swig/swigopt.h",
"Source/Include/swigwarn.h",
"Source/CParse/parser.h",
"Source/CParse/cparse.h",
"Source/Doxygen/doxycommands.h",
"Source/Doxygen/doxyentity.h",
"Source/Doxygen/javadoc.h",
"Source/Doxygen/doxytranslator.h",
"Source/Doxygen/doxyparser.h",
"Source/Doxygen/pydoc.h",
"Source/Modules/swigmod.h",
"Source/Preprocessor/preprocessor.h",
"Source/DOH/list.c",
"Source/DOH/memory.c",
"Source/DOH/base.c",
"Source/DOH/string.c",
"Source/DOH/hash.c",
"Source/DOH/fio.c",
"Source/DOH/void.c",
"Source/DOH/file.c",
"Source/Swig/scanner.c",
"Source/Swig/fragment.c",
"Source/Swig/typesys.c",
"Source/Swig/naming.c",
"Source/Swig/parms.c",
"Source/Swig/deprecate.c",
"Source/Swig/extend.c",
"Source/Swig/typemap.c",
"Source/Swig/error.c",
"Source/Swig/wrapfunc.c",
"Source/Swig/symbol.c",
"Source/Swig/stype.c",
"Source/Swig/cwrap.c",
"Source/Swig/include.c",
"Source/Swig/typeobj.c",
"Source/Swig/misc.c",
"Source/Swig/getopt.c",
"Source/Swig/tree.c",
"Source/CParse/templ.c",
"Source/CParse/util.c",
"Source/CParse/cscanner.c",
"Source/CParse/parser.c",
"Source/Preprocessor/cpp.c",
"Source/Preprocessor/expr.c",
"Source/Doxygen/doxytranslator.cxx",
"Source/Doxygen/javadoc.cxx",
"Source/Doxygen/doxyparser.cxx",
"Source/Doxygen/doxyentity.cxx",
"Source/Doxygen/pydoc.cxx",
"Source/Modules/nested.cxx",
"Source/Modules/python.cxx",
"Source/Modules/ruby.cxx",
"Source/Modules/main.cxx",
"Source/Modules/lang.cxx",
"Source/Modules/lua.cxx",
"Source/Modules/mzscheme.cxx",
"Source/Modules/tcl8.cxx",
"Source/Modules/xml.cxx",
"Source/Modules/javascript.cxx",
"Source/Modules/directors.cxx",
"Source/Modules/allocate.cxx",
"Source/Modules/interface.cxx",
"Source/Modules/java.cxx",
"Source/Modules/emit.cxx",
"Source/Modules/swigmain.cxx",
"Source/Modules/go.cxx",
"Source/Modules/csharp.cxx",
"Source/Modules/d.cxx",
"Source/Modules/typepass.cxx",
"Source/Modules/contract.cxx",
"Source/Modules/ocaml.cxx",
"Source/Modules/overload.cxx",
"Source/Modules/perl5.cxx",
"Source/Modules/r.cxx",
"Source/Modules/octave.cxx",
"Source/Modules/utils.cxx",
"Source/Modules/guile.cxx",
"Source/Modules/scilab.cxx",
"Source/Modules/php.cxx",
],
copts = ["$(STACK_FRAME_UNLIMITED)"] + select({
"on_windows": [],
"//conditions:default": [
"-Wno-parentheses",
"-Wno-unused-variable",
"-fexceptions",
],
}),
includes = [
"Source/CParse",
"Source/DOH",
"Source/Doxygen",
"Source/Include",
"Source/Modules",
"Source/Preprocessor",
"Source/Swig",
],
output_licenses = ["unencumbered"],
visibility = ["//visibility:public"],
deps = ["@pcre2//:pcre2"],
)
filegroup(
name = "lib_java",
srcs = glob([
'Lib/*',
'Lib/java/*',
'Lib/std/*',
'Lib/typemaps/*'
]),
licenses = ["notice"], # simple notice license for Lib/
path = "Lib",
visibility = ["//visibility:public"],
)
filegroup(
name = "lib_python",
srcs = glob([
'Lib/*',
'Lib/python/*',
'Lib/std/*',
'Lib/typemaps/*'
]),
licenses = ["notice"], # simple notice license for Lib/
path = "Lib",
visibility = ["//visibility:public"],
)
genrule(
name = "swigconfig",
outs = ["Source/Include/swigconfig.h"],
cmd = "cat <<EOF >$@\n" +
"#define HAVE_BOOL\n" +
"#define HAVE_PCRE\n" +
"#define HAVE_POPEN\n" +
"#define PACKAGE_BUGREPORT \"http://www.swig.org\"\n" +
"#define PACKAGE_VERSION \"4.1.1\"\n" +
"#define STDC_HEADERS\n" +
"#define SWIG_CXX \"bazel4lyfe\"\n" +
"#define SWIG_LIB \"external/swig/Lib\"\n" +
"#define SWIG_LIB_WIN_UNIX \"\"\n" +
"#define SWIG_PLATFORM \"bazel4lyfe\"\n" +
"EOF",
)