-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
executable file
·35 lines (27 loc) · 1.08 KB
/
makefile
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
PHRASES := $(wildcard ./phrases/*.txt)
WAVS := $(patsubst ./phrases/%.txt,./voice/%.wav,$(PHRASES))
DIRS := 1 2 3 4 5 6 7 9
POSES := $(foreach dir,$(DIRS),$(wildcard $(dir)/*.RM4))
NULLPOSES := $(wildcard 1/000*.RM4)
POSES := $(filter-out $(NULLPOSES) 4/000ダンス.RM4 9/songsouji3.RM4 9/songtimer3.RM4,$(POSES))
POSEDEP := $(POSES:%.RM4=%.d)
# Default target
all: $(WAVS) poses
# Our phony targets for managing the project
.PHONY: clean
clean:
$(RM) $(WAVS)
cleand:
$(RM) $(POSEDEP)
#convert files
voice/%.wav: phrases/%.txt
say -v Yannick -o "$@" --file-format=WAVE --data-format=LEI16@44100 < $<
poses: $(POSEDEP) $(POSES)
# the following part will create .d files with recipes in the form:
#3/233絶対勝ってね9.RM4:voice/233.wav
# python wave_rm4.py $@
%.d:
iconv -c -f SHIFT_JIS -t utf8 $(@:%.d=%.RM4) | awk -F'"' '/.wav/{gsub(/¥/,"/",$$2);wave[$$2]=$$2} END{for(w in wave) pre= pre" "w; print "$(@:%.d=%.RM4)" ":"pre; print "\tpython wave_rm4.py $(@:%.d=%.RM4)"}' > $@
-include $(POSEDEP)
cliplist.txt: $(PHRASES)
./collectphrases.sh > $@