-
Notifications
You must be signed in to change notification settings - Fork 9
/
Makefile.in
160 lines (141 loc) · 7 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
# 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/x64/Debug
RELEASEOUT = $(ROOTDIR)/output/x64/Release
MONO = @MONO@
MONO_LDFLAGS= @MONO_LDFLAGS@
# Allow REGROOT to be specified externally (such as when building Flatpak
# FieldWorks). Otherwise, set it according to FIELDWORKS.
ifeq ($(origin REGROOT), undefined)
# For fieldworks, define COMMON_DATA_FW in ECInterfaces.csproj for Util.cs.
# Also change REGROOT in ECDriver Makefile.in.
ifeq ($(strip $(FIELDWORKS)),)
REGROOT = /var/lib/encConverters
else
REGROOT = /var/lib/fieldworks
endif
endif
ifeq ($(strip $(FIELDWORKS)),)
LIBDIR = @libdir@/encConverters
else
LIBDIR = @libdir@/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 src/EncCnvtrs/packages.config -NonInteractive -PackagesDirectory "$(ROOTDIR)/packages"
. ./environ && build/multitry mono build/nuget.exe restore src/TestEncCnvtrs/packages.config -NonInteractive -PackagesDirectory "$(ROOTDIR)/packages"
cp -a packages/Geckofx60.64.Linux.60.0.51/build/Geckofx-Core.dll.config packages/Geckofx60.64.Linux.60.0.51/lib/net40
cp -a packages/Geckofx60.32.Linux.60.0.49/build/Geckofx-Core.dll.config packages/Geckofx60.32.Linux.60.0.49/lib/net40
endif
$(SRCDIRS):
$(MAKE) -C "$@" $(MAKECMDGOALS) FIELDWORKS=$(FIELDWORKS)
debug: download_dependencies $(SRCDIRS)
cd build && ./msbuild.sh $(MONO) $(MONO_LDFLAGS) -p:SolutionDir=$(ROOTDIR)/ -p:Platform=x64 -p:FIELDWORKS=$(FIELDWORKS) -p:DefineConstants=NEED_RESOLVE_ICUBREAKITERATORENCCONVERTER
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 $(SRCDIRS)
cd build && ./msbuild.sh $(MONO) $(MONO_LDFLAGS) -p:SolutionDir=$(ROOTDIR)/ -p:Platform=x64 -p:config=Release -p:FIELDWORKS=$(FIELDWORKS) -p:DefineConstants=NEED_RESOLVE_ICUBREAKITERATORENCCONVERTER
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: $(SRCDIRS)
cd build && ./msbuild.sh $(MONO) $(MONO_LDFLAGS) /target:clean
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 $(SRCDIRS)
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 $(SRCDIRS)
rm -f Makefile configure aclocal.m4 config.cache config.status
install: release $(SRCDIRS)
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 $(SRCDIRS)
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
test:
cd src/ECDriver/linux && $(MAKE) test
.PHONY: all debug release clean packageclean distclean install install-debug uninstall check test $(SRCDIRS)