-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
35 lines (31 loc) · 1.36 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
# This is the Makefile helping you submit the labs.
# Just create 6.5840/api.key with your API key in it,
# and submit your lab with the following command:
# $ make [lab1|lab2|lab3a|lab3b|lab3c|lab3d|lab4a|lab4b|lab5a|lab5b]
LABS=" lab1 lab2 lab3a lab3b lab3c lab3d lab4a lab4b lab5a lab5b "
%: check-%
@echo "Preparing [email protected]"
@if echo $(LABS) | grep -q " $@ " ; then \
echo "Tarring up your submission..." ; \
COPYFILE_DISABLE=1 tar cvzf [email protected] \
"--exclude=src/main/pg-*.txt" \
"--exclude=src/main/diskvd" \
"--exclude=src/mapreduce/824-mrinput-*.txt" \
"--exclude=src/mapreduce/5840-mrinput-*.txt" \
"--exclude=src/main/mr-*" \
"--exclude=mrtmp.*" \
"--exclude=src/main/diff.out" \
"--exclude=src/main/mrcoordinator" \
"--exclude=src/main/mrsequential" \
"--exclude=src/main/mrworker" \
"--exclude=*.so" \
Makefile src; \
if test `stat -c "%s" "[email protected]" 2>/dev/null || stat -f "%z" "[email protected]"` -ge 20971520 ; then echo "File exceeds 20MB."; rm [email protected]; exit; fi; \
echo "[email protected] successfully created. Please upload the tarball manually on Gradescope."; \
else \
echo "Bad target $@. Usage: make [$(LABS)]"; \
fi
.PHONY: check-%
check-%:
@echo "Checking that your submission builds correctly..."
@./.check-build git://g.csail.mit.edu/6.5840-golabs-2024 $(patsubst check-%,%,$@)