-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile.in
70 lines (58 loc) · 1.93 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
#!/usr/bin/make
# @configure_input@
# Package-related substitution variables
package = @PACKAGE_NAME@
version = @PACKAGE_VERSION@
tarname = @PACKAGE_TARNAME@
distdir = $(tarname)-$(version)
# Prefix-related substitution variables
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
depsdir = @PWD@/deps
toolsdir = @PWD@/tools
workdir = @WORKDIR@
datdir = @PWD@/data
resultsdir = @PWD@/results
# Rule to create the different directories:
# resultsdir: Holds the resulting .tar.gz package with the voice
# toolsdir: where the tools are installed
# workdir: where the intermediate files are generated
$(resultsdir) $(toolsdir) $(workdir):
mkdir -p "$@"
# Downloads and installs all the dependencies
dependencies: $(toolsdir)
cd $(depsdir) && make all
# Downloads and installs the language-specific tools
lang_%: dependencies
cd $(datdir)/$* && make $@
# This is a dirty kludge I need later.
# Basically empty is empty and space is a space.
empty:=
space:= $(empty) $(empty)
# Rule to train a voice. It basically is of the form
# ${lang}_${spk}.spk. "make ca_ona.spk"
%.spk: dependencies
# This next line:
# 1. Replace "_" with " ": ca_ona.spk -> ca ona.spk
# 2. Get the first word: ca ona.spk -> ca
# So this is "cd data/ca && make ca_ona.spk"
echo $(word 1,$(subst _,$(space),$@))
cd $(datdir)/$(word 1,$(subst _,$(space),$@)) && \
$(MAKE) $@
clean:
(cd $(datdir)/ca/ && make clean)
$(RM) -rf deps/HDecode-3.4.1.tar.gz
$(RM) -rf deps/HTK-3.4.1.tar.gz
$(RM) -rf deps/HTS-2.3_for_HTK-3.4.1.tar.bz2
$(RM) -rf deps/SPTK*
$(RM) -rf deps/festival-*.tar.gz
$(RM) -rf deps/hts_engine_API-1.*.tar.gz
$(RM) -rf deps/speech_tools-*.tar.gz
$(RM) -rf deps/hts deps/hts_engine_API-*
$(RM) -rf deps/htspatch
$(RM) -rf tools work
distclean: clean
(cd $(datdir)/ca/ && make distclean)
$(RM) -rf Makefile autom4te.cache config.log config.status
$(RM) -rf data/ca/Makefile data/en/Makefile deps/Makefile