- Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathwscript
More file actions
Latest commit
47 lines (40 loc) · 1.58 KB
/
Copy pathwscript
File metadata and controls
47 lines (40 loc) · 1.58 KB
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
importos
APPNAME='numerical and temporal expression normalizer'
VERSION='0.5.0'
defoptions(opt):
opt.load('compiler_cxx')
opt.load('unittest_gtest')
defconfigure(conf):
conf.env.CXXFLAGS+= ['-O2', '-Wall', '-g', '-pipe']
conf.load('compiler_cxx')
conf.load('unittest_gtest')
conf.check_cfg(package='pficommon', args='--cflags --libs')
conf.check_cfg(package='ux', args='--cflags --libs')
#conf.check_cxx(lib='re2', libpath=conf.env.LIBDIR)
#conf.check_cfg(package = 'boost', args = '--cflags --libs')
#conf.check_cxx(lib='libname', header_name = 'header.h')
pass
defbuild(bld):
create_dic_file(bld)
bld.recurse('src')
# bld.install_files('${PREFIX}/include', 'src/*.hpp') #cannot install
fordpath, dnames, fnamesinos.walk("src") :
forfnameinfnames :
ifnotfname.endswith(".hpp") : continue
bld.install_files('${PREFIX}/include/normalizeNumexp/', [dpath+"/"+fname])
fordpath, dnames, fnamesinos.walk("src/dic") :
forfnameinfnames :
ifnotfname.endswith(".txt") : continue
bld.install_files('${PREFIX}/lib/normalizeNumexp/'+dpath[4:], [dpath+"/"+fname])
defcreate_dic_file(bld) :
#辞書ファイルの場所を指定
dictionary_dirpath=str(bld.env.PREFIX) +"/lib/normalizeNumexp/dic/"
# dictionary_dirpath = "/home/katsuma/usr/local/lib/normalizeNumexp/dic/"
source="""
#include "dictionary_dirpath.hpp"
namespace dictionary_dirpath {
std::string get_dictionary_dirpath(){
return \"%s\";}}"""
source=source%dictionary_dirpath
fout=open("./src/dictionary_dirpath.cpp", "w")
fout.write(source)