-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
17 lines (16 loc) · 827 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# This is the Makefile helping you submit the labs.
# $ make [lab1|lab2|lab3a|lab3b|lab4a|lab4b]
COURSE=cs451
LABS=" lab1 lab2a lab2b lab2c lab3a lab3b lab4a lab4b"
%:
@if echo $(LABS) | grep -q " $@ " ; then \
tar cvzf $@-handin.tar.gz --exclude=src/main/kjv12.txt Makefile .git src; \
echo "Are you sure you want to submit $@? Enter 'yes' to continue:"; \
read line; \
if test $$line != "yes" ; then echo "Giving up submission"; exit; fi; \
if test `stat -c "%s" "$@-handin.tar.gz" 2>/dev/null || stat -f "%z" "$@-handin.tar.gz"` -ge 20971520 ; then echo "File exceeds 20MB."; exit; fi; \
gsubmit $(COURSE) $@-handin.tar.gz; \
gsubmit $(COURSE) -ls; \
else \
echo "Bad target $@. Usage: make [$(LABS)]"; \
fi