CS3700-project4/Makefile

42 lines
1.1 KiB
Makefile
Raw Normal View History

2020-04-12 06:03:06 +00:00
.PHONY: all test run clean
2020-04-10 20:31:41 +00:00
2020-04-12 06:03:06 +00:00
SOURCES=Makefile README.md private/util.rkt secret_flags smol-http/http-msg.rkt smol-http/info.rkt smol-http/main.rkt smol-http/util.rkt webcrawler
2020-04-11 08:02:33 +00:00
CCIS_TEAM_NAME=hash-lang-uwu
CCIS_PROJECT_NAME=project4
CCIS_SERVER=login.ccs.neu.edu
CCIS_PATH=CS3700/$(CCIS_PROJECT_NAME)/
CCIS_FMT_CHECK=/course/cs3700sp20/code/project4/project4_format_check.py
CCIS_TURNIN=/course/cs3700sp20/bin/turnin
2020-04-10 20:31:41 +00:00
all: .setup
raco setup smol-http
2020-04-10 20:31:41 +00:00
raco make webcrawler
test: .setup
raco test -p smol-http
2020-04-10 23:23:14 +00:00
run:
2020-04-10 23:07:45 +00:00
ifndef FB_USERNAME
$(error "Provide FB_USERNAME variable")
endif
ifndef FB_PASSWORD
$(error "Provide FB_PASSWORD variable")
endif
2020-04-11 00:13:04 +00:00
./webcrawler -d $(FB_USERNAME) $(FB_PASSWORD)
2020-04-10 23:07:45 +00:00
2020-04-10 20:31:41 +00:00
.setup:
2020-04-12 06:03:06 +00:00
-raco pkg install smol-http/
2020-04-10 20:31:41 +00:00
@touch $@
2020-04-11 08:02:33 +00:00
upload: $(SOURCES)
@rsync -avzzR --progress $^ $(CCIS_SERVER):$(CCIS_PATH)
@ssh $(CCIS_SERVER) -t -- "tput bold; $(CCIS_FMT_CHECK) $(CCIS_PATH); tput sgr0"
submit: upload
ssh $(CCIS_SERVER) -t -- "cd $(CCIS_PATH); make clean; $(CCIS_TURNIN) $(CCIS_PROJECT_NAME) ."
2020-04-12 06:03:06 +00:00
clean:
$(RM) .setup
find . \( -iname '*.zo' -o -iname '*.dep' \) -delete
find . -type d -iname compiled -delete