CS3700-project4/Makefile

42 lines
1.1 KiB
Makefile

.PHONY: all test run clean
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
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
all: .setup
raco setup smol-http
raco make webcrawler
test: .setup
raco test -p smol-http
run:
ifndef FB_USERNAME
$(error "Provide FB_USERNAME variable")
endif
ifndef FB_PASSWORD
$(error "Provide FB_PASSWORD variable")
endif
./webcrawler -d $(FB_USERNAME) $(FB_PASSWORD)
.setup:
-raco pkg install smol-http/
@touch $@
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) ."
clean:
$(RM) .setup
find . \( -iname '*.zo' -o -iname '*.dep' \) -delete
find . -type d -iname compiled -delete