forked from silnrsi/encoding-converters-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
175 lines (159 loc) · 7.12 KB
/
Makefile.in
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
166
167
168
169
170
171
172
173
174
175
# Makefile is generated by Makefile.in.
# Master Makefile for the encConverters package
# Makefile.in created January 20, 2012 by Stephen McConnel
#
# 06-Jun-13 JDK Added uninstall target.
# 16-Jul-13 SMc Add conditional test for FIELDWORKS (requires GNU Make)
# 15-Apr-15 SMc Add packageclean target
@SET_MAKE@
# the next line requires GNU make ...
MAKEFLAGS =#--no-print-directory
srcdir = @srcdir@
VPATH = @srcdir@
INSTALL = @INSTALL@
prefix = @prefix@
exec_prefix = @exec_prefix@
ROOTDIR = @abs_top_srcdir@
OUTDIR = $(ROOTDIR)/output/Debug
RELEASEOUT = $(ROOTDIR)/output/Release
MONO = @MONO@
MONO_LDFLAGS= @MONO_LDFLAGS@
# For fieldworks, define COMMON_DATA_FW in ECInterfaces.csproj for Util.cs.
# Also change REGROOT in ECDriver Makefile.in.
ifeq ($(strip $(FIELDWORKS)),)
LIBDIR = @libdir@/encConverters
REGROOT = /var/lib/encConverters
else
LIBDIR = @libdir@/fieldworks
REGROOT = /var/lib/fieldworks
endif
REGKEY = $(REGROOT)/registry/LocalMachine/software/sil/silencconverters40
TECKITLIBS = $(shell pkg-config --variable=libdir teckit)
SRCDIRS = src/IcuEC src/PyScriptEC src/ECDriver/linux
DLLS = ECInterfaces.dll SilEncConverters40.dll CcEC.dll \
IcuEC.dll PyScriptEC.dll PerlExpressionEC.dll AIGuesserEC.dll
# CodePageEC.dll
PLUGINS = "AI 4.0.0.0 Plugin Details.xml" "CC 4.0.0.0 Plugin Details.xml" \
"EC 4.0.0.0 Plugin Details.xml" "IcuEC 4.0.0.0 Plugin Details.xml" \
"PerlEC 4.0.0.0 Plugin Details.xml" "PythonEC 4.0.0.0 Plugin Details.xml"
NUGET_URL = https://dist.nuget.org/win-x86-commandline/v3.4.4/nuget.exe
all: debug
download_nuget:
ifneq ($(EC_DOWNLOAD_NUGETEXE), false)
build/multitry wget -O build/nuget.exe $(NUGET_URL) || build/multitry curl -o build/nuget.exe -L $(NUGET_URL)
endif
download_dependencies: download_nuget
ifneq ($(EC_DOWNLOAD_DEPS), false)
. ./environ && build/multitry mono build/nuget.exe restore .nuget/packages.config -NonInteractive -PackagesDirectory "$(ROOTDIR)/packages"
cp -a packages/Geckofx45.64.Linux.45.0.21.0/build/Geckofx-Core.dll.config packages/Geckofx45.64.Linux.45.0.21.0/lib/net40
cp -a packages/Geckofx45.32.Linux.45.0.21.0/build/Geckofx-Core.dll.config packages/Geckofx45.32.Linux.45.0.21.0/lib/net40
endif
debug: download_dependencies
cd build && ./msbuild.sh $(MONO) $(MONO_LDFLAGS) /property:FIELDWORKS=$(FIELDWORKS)
for subdir in $(SRCDIRS); do \
echo making in $$subdir; \
(cd $$subdir && $(MAKE) all FIELDWORKS=$(FIELDWORKS)) || break; \
done
mkdir -p $(OUTDIR)/EC/Plugins
for file in $(PLUGINS); do \
cp -p redist/EC/Plugins/"$$file" $(OUTDIR)/EC/Plugins; \
done
if [ -z $(FIELDWORKS) ]; then cp -pR redist/Help $(OUTDIR); fi
# For now from libteckit-dev package. A further improvement would be modifying this package or FieldWorks to depend on libteckit0 and find the .so files where libteckit0 installs them, and update the filename in SilEncConverters40.dll.config to match what comes from libteckit0.
cp -pL $(TECKITLIBS)/libTECkit.so $(TECKITLIBS)/libTECkit_Compiler.so $(OUTDIR)
cp -p src/EncCnvtrs/SilEncConverters40.dll.config $(OUTDIR)
cp -p src/CcEC/CcEC.dll.config $(OUTDIR)
cp -p src/TestEncCnvtrs/TestEncCnvtrs.dll.config $(OUTDIR)
release: download_dependencies
cd build && ./msbuild.sh $(MONO) $(MONO_LDFLAGS) /property:config=Release /property:FIELDWORKS=$(FIELDWORKS)
for subdir in $(SRCDIRS); do \
echo making in $$subdir; \
(cd $$subdir && $(MAKE) release FIELDWORKS=$(FIELDWORKS)) || break; \
done
mkdir -p $(RELEASEOUT)/EC/Plugins
for file in $(PLUGINS); do \
cp -p redist/EC/Plugins/"$$file" $(RELEASEOUT)/EC/Plugins; \
done
if [ -z $(FIELDWORKS) ]; then cp -pR redist/Help $(RELEASEOUT); fi
cp -pL $(TECKITLIBS)/libTECkit.so $(TECKITLIBS)/libTECkit_Compiler.so $(RELEASEOUT)
cp -p src/EncCnvtrs/SilEncConverters40.dll.config $(RELEASEOUT)
cp -p src/CcEC/CcEC.dll.config $(RELEASEOUT)
cp -p src/TestEncCnvtrs/TestEncCnvtrs.dll.config $(RELEASEOUT)
clean:
cd build && ./msbuild.sh $(MONO) $(MONO_LDFLAGS) /target:clean
for subdir in $(SRCDIRS); do \
echo making in $$subdir; \
(cd $$subdir && $(MAKE) clean) || true; \
done
if [ -d $(OUTDIR) ]; then cd $(OUTDIR) && rm -f *.xml; fi
if [ -d $(OUTDIR) ]; then cd $(OUTDIR) && rm -rf EC; fi
if [ -d $(RELEASEOUT) ]; then cd $(RELEASEOUT) && rm -f *.xml; fi
if [ -d $(RELEASEOUT) ]; then cd $(RELEASEOUT) && rm -rf EC; fi
rm -f *~
# we need to keep the generated configure script and Makefile for packaging
packageclean: clean
for subdir in $(SRCDIRS); do \
echo making in $$subdir; \
(cd $$subdir && $(MAKE) packageclean) || true; \
done
rm -f src/config.h config.log
rm -f src/stamp-h1
rm -f autogen.err TestResult.xml src/TestEncCnvtrs/TestEncCnvtrs.pidb
rm -rf autom4te.cache output build/Obj src/TestEncCnvtrs/test-results
rm -rf $(OUTDIR) $(RELEASEDIR)
distclean: packageclean
for subdir in $(SRCDIRS); do \
echo making in $$subdir; \
(cd $$subdir && $(MAKE) distclean) || true; \
done
rm -f Makefile configure aclocal.m4 config.cache config.status
install: release
for subdir in $(SRCDIRS); do \
echo installing in $$subdir; \
(cd $$subdir && $(MAKE) install) || break; \
done
mkdir -p $(DESTDIR)$(LIBDIR)/EC/Plugins
for file in $(DLLS); do \
$(INSTALL) $(RELEASEOUT)/$$file $(DESTDIR)$(LIBDIR); \
done
for file in $(PLUGINS); do \
cp -p redist/EC/Plugins/"$$file" $(DESTDIR)$(LIBDIR)/EC/Plugins; \
done
if [ -z $(FIELDWORKS) ]; then cp -pR redist/Help $(DESTDIR)$(LIBDIR); fi
install $(TECKITLIBS)/libTECkit.so $(DESTDIR)$(LIBDIR)
install $(TECKITLIBS)/libTECkit_Compiler.so $(DESTDIR)$(LIBDIR)
cp -p src/EncCnvtrs/SilEncConverters40.dll.config $(DESTDIR)$(LIBDIR)
cp -p src/CcEC/CcEC.dll.config $(DESTDIR)$(LIBDIR)
cp -p $(RELEASEOUT)/PerlExpressionEC.dll.config $(DESTDIR)$(LIBDIR)
# Set up writable directories and keys to use as a registry.
$(INSTALL) -d $(DESTDIR)$(REGROOT) -m +rwxt
mkdir -p $(DESTDIR)$(REGKEY)
find $(DESTDIR)$(REGROOT) -type d -exec chmod 777 {} \;
$(INSTALL) values.xml $(DESTDIR)$(REGKEY) -m +rw
cp -pR redist/MapsTables $(DESTDIR)$(REGROOT)/SIL
# useful for debugging the ECDriver
install-debug:
cp $(OUTDIR)/*.dll $(DESTDIR)$(LIBDIR)
cp $(OUTDIR)/*.dll.mdb $(DESTDIR)$(LIBDIR)
cp $(OUTDIR)/*.tlb $(DESTDIR)$(LIBDIR)
cp $(OUTDIR)/*.so $(DESTDIR)$(LIBDIR)
uninstall:
rm -f -r $(DESTDIR)$(LIBDIR)/*
rm -f -r $(DESTDIR)$(REGROOT)/SIL
rm -f $(DESTDIR)$(REGKEY)/values.xml
NUNITROOT=`which nunit-console | sed s=/bin/nunit-console=/lib/mono=`
check: all
if [ ! -f $(OUTDIR)/nunit.framework.dll ]; then \
echo '#' even with nunit in the GAC, we seem to need need this copying...; \
find $(NUNITROOT) -name nunit.framework.dll -exec cp -p '{}' $(OUTDIR) ';' -print ; \
find $(NUNITROOT) -name nunit.core.dll -exec cp -p '{}' $(OUTDIR) ';' -print ; \
find $(NUNITROOT) -name nunit.core.interfaces.dll -exec cp -p '{}' $(OUTDIR) ';' -print ; \
fi
cd build && LD_LIBRARY_PATH="$(OUTDIR)" ./msbuild.sh $(MONO) $(MONO_LDFLAGS) /target:test
for subdir in $(SRCDIRS); do \
echo checking in $$subdir; \
(cd $$subdir && $(MAKE) check) || break; \
done
test:
cd src/ECDriver/linux && $(MAKE) test
.PHONY: all debug release clean packageclean distclean install install-debug uninstall check test