-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
91 lines (75 loc) · 2.65 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
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
##############################################################################
# #
# GabbieBot: A simple chat bot #
# By Eric G. Kratz #
# #
##############################################################################
### Python settings ###
PYPATH=$(shell which python)
### Sed commands ###
#In-place flag (GNU: -i, OSX: -i "")
SEDI=-i
#####################################################
### Compile rules for users and devs ###
install: title binary stats compdone
clean: title delbin compdone
#####################################################
### Rules for building various parts of the code ###
binary:
@echo ""; \
echo "### Building executables ###"; \
echo ""; \
mkdir -p bin
@rm -rf ./bin/__pycache__
@echo 'echo "#!$(PYPATH)" > ./bin/RunGabbie'; \
echo "!!${PYPATH}" > ./bin/RunGabbie
cat ./src/RunGabbie.py >> ./bin/RunGabbie
@echo 'echo "#!$(PYPATH)" > ./bin/TrainGabbie'; \
echo "!!${PYPATH}" > ./bin/TrainGabbie
cat ./src/TrainGabbie.py >> ./bin/TrainGabbie
@cp ./src/Gabbie.py ./bin/Gabbie.py; \
sed $(SEDI) 's/\#.*//g' ./bin/*; \
sed $(SEDI) 's/[[:space:]]*$$//g' ./bin/*; \
sed $(SEDI) '/^$$/d' ./bin/*; \
sed $(SEDI) 's/\!\!/\#\!/g' ./bin/*
echo "#!/bin/bash" > ./bin/GabbieForget
cat ./src/Forget.bash >> ./bin/GabbieForget
@chmod a+x ./bin/*
title:
@echo ""; \
echo "###################################################"; \
echo "# #"; \
echo "# GabbieBot #"; \
echo "# #"; \
echo "# A simple chat bot #"; \
echo "# #"; \
echo "###################################################"
stats:
@echo ""; \
echo "### Source code statistics ###"; \
echo ""; \
echo "Number of GabbieBot source code files:"; \
ls -al src/* | wc -l; \
echo "Total length of GabbieBot (lines):"; \
cat src/* | wc -l
compdone:
@echo ""; \
echo "Done."; \
echo ""
delbin:
@echo ""; \
echo ' ___'; \
echo ' |_ |'; \
echo ' \ \'; \
echo ' |\ \'; \
echo ' | \ \'; \
echo ' \ \ \'; \
echo ' \ \ \'; \
echo ' \ \ \ <wrrr vroooom wrrr> '; \
echo ' \__\ \________'; \
echo ' |_________\'; \
echo ' |__________| .., ,.,. .,.,, ,..'; \
echo ""; \
echo ""; \
echo "Removing binaries..."; \
rm -rf ./bin