forked from myopark/cs373
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile
276 lines (262 loc) · 8.61 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
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
.DEFAULT_GOAL := test
ifeq ($(shell uname), Darwin) # Apple
PYTHON := python3.5
PIP := pip3.5
MYPY := mypy
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else ifeq ($(CI), true) # Travis CI
PYTHON := python3.5
PIP := pip3.5
MYPY := mypy
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else ifeq ($(shell uname -p), unknown) # Docker
PYTHON := python3.5
PIP := pip3.5
MYPY := mypy
PYLINT := pylint
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
else # UTCS
PYTHON := python3
PIP := pip3
MYPY := mypy
PYLINT := pylint3
COVERAGE := coverage-3.5
PYDOC := pydoc3.5
AUTOPEP8 := autopep8
endif
clean:
cd examples; make clean
@echo
cd exercises; make clean
@echo
cd projects/collatz; make clean
config:
git config -l
docker-build:
docker build -t gpdowning/python .
docker-pull:
docker pull gpdowning/python
docker-push:
docker push gpdowning/python
docker-run:
docker run -it -v $(PWD):/usr/cs373 -w /usr/cs373 gpdowning/python
init:
touch README
git init
git add README
git commit -m 'first commit'
git remote add origin git@github.com:gpdowning/cs373.git
git push -u origin master
pull:
make clean
@echo
git pull
git status
push:
make clean
@echo
git add .gitignore
git add .travis.yml
git add Dockerfile
git add examples
git add exercises
git add patterns
git add projects
git add makefile
git add notes
git commit -m "another commit"
git push
git status
status:
make clean
@echo
git branch
git remote -v
git status
sync:
@rsync -r -t -u -v --delete \
--include "Docker.txt" \
--include "Hello.py" \
--include "Assertions.py" \
--include "Exceptions.py" \
--include "Types.py" \
--include "Operators.py" \
--include "Variables.py" \
--include "Copy.py" \
--include "Cache.py" \
--include "Iteration.py" \
--include "Lambdas.py" \
--include "Comprehensions.py" \
--include "Yield.py" \
--include "Iterables.py" \
--include "FunctionKeywords.py" \
--include "FunctionDefaults.py" \
--include "FunctionUnpacking.py" \
--include "FunctionTuple.py" \
--include "FunctionDict.py" \
--include "Callables.py" \
--include "MyPy.py" \
--include "RegExps.py" \
--include "Reflection.py" \
--exclude "*" \
../../examples/python/ examples
@rsync -r -t -u -v --delete \
--include "Bookstore1.dtd.xml" \
--include "Bookstore1.xml" \
--include "Bookstore2.dtd.xml" \
--include "Bookstore3.xml" \
--include "Bookstore3.xsd.xml" \
--exclude "*" \
../../examples/xml/ examples
@rsync -r -t -u -v --delete \
--include "Bookstore.json" \
--include "Bookstore.schema.json" \
--exclude "*" \
../../examples/json/ examples
@rsync -r -t -u -v --delete \
--include "ShowDatabases.sql" \
--include "ShowEngines.sql" \
--include "Create.sql" \
--include "Select.sql" \
--include "Join.sql" \
--include "Joins.sql" \
--include "Subqueries.sql" \
--include "Sets.sql" \
--include "Aggregation.sql" \
--exclude "*" \
../../examples/sql/ examples
@rsync -r -t -u -v --delete \
--include "MethodOverriding.java" \
--include "DynamicBinding.java" \
--include "Reflection.java" \
--exclude "*" \
../../examples/java/ examples
@rsync -r -t -u -v --delete \
--include "UnitTests1.py" \
--include "UnitTests1T.py" \
--include "UnitTests2.py" \
--include "UnitTests2T.py" \
--include "UnitTests3.py" \
--include "UnitTests3T.py" \
--include "Coverage1.py" \
--include "Coverage1T.py" \
--include "Coverage2.py" \
--include "Coverage2T.py" \
--include "Coverage3.py" \
--include "Coverage3T.py" \
--include "IsPrime1.py" \
--include "IsPrime1T.py" \
--include "IsPrime2.py" \
--include "IsPrime2T.py" \
--include "Factorial.py" \
--include "FactorialT.py" \
--include "Reduce.py" \
--include "ReduceT.py" \
--include "RMSE.py" \
--include "RMSET.py" \
--include "RangeIterator.py" \
--include "RangeIteratorT.py" \
--include "Map.py" \
--include "MapT.py" \
--include "Range.py" \
--include "RangeT.py" \
--include "Decorators.py" \
--include "DecoratorsT.py" \
--include "Decorators2.py" \
--include "Decorators2T.py" \
--include "Select.py" \
--include "SelectT.py" \
--include "Project.py" \
--include "ProjectT.py" \
--include "CrossJoin.py" \
--include "CrossJoinT.py" \
--include "ThetaJoin.py" \
--include "ThetaJoinT.py" \
--include "NaturalJoin.py" \
--include "NaturalJoinT.py" \
--exclude "*" \
../../exercises/python/ exercises
@rsync -r -t -u -v --delete \
--include "StrategyPattern1.java" \
--include "StrategyPattern2.java" \
--include "StrategyPattern3.java" \
--include "StrategyPattern4.java" \
--include "StrategyPattern5.java" \
--include "StrategyPattern6.java" \
--include "SingletonPattern.java" \
--include "SingletonPatternT.java" \
--include "StrategyPattern7.java" \
--include "StrategyPattern8.java" \
--include "StrategyPattern9.java" \
--include "CreationalPattern.java" \
--include "CreationalPatternT.java" \
--include "FactoryMethodPattern.java" \
--include "FactoryMethodPatternT.java" \
--include "AbstractFactoryPattern.java" \
--include "AbstractFactoryPatternT.java" \
--include "AdapterPattern.java" \
--include "AdapterPatternT.java" \
--include "VisitorPattern1.java" \
--include "VisitorPattern1T.java" \
--include "VisitorPattern2.java" \
--include "VisitorPattern2T.java" \
--exclude "*" \
../../patterns/java/ patterns
@rsync -r -t -u -v --delete \
--include "StrategyPattern9.py" \
--exclude "*" \
../../patterns/python/ patterns
@rsync -r -t -u -v --delete \
--include "Collatz.py" \
--include "RunCollatz.in" \
--include "RunCollatz.py" \
--include "RunCollatz.out" \
--include "TestCollatz.py" \
--include "TestCollatz.out" \
--exclude "*" \
../../projects/python/collatz/ projects/collatz
test:
make clean
@echo
cd examples; make test
@echo
cd exercises; make test
@echo
cd projects/collatz; make test
versions:
which make
make --version
@echo
which git
git --version
@echo
which $(PYTHON)
$(PYTHON) --version
@echo
which $(PIP)
$(PIP) --version
@echo
which $(MYPY)
$(MYPY) --version
@echo
which $(PYLINT)
$(PYLINT) --version
@echo
which $(COVERAGE)
$(COVERAGE) --version
@echo
-which $(PYDOC)
-$(PYDOC) --version
@echo
which $(AUTOPEP8)
$(AUTOPEP8) --version
@echo
$(PIP) list