Browse Source

Add more memes to makefile

master
haskal 10 months ago
parent
commit
5351d159d1
2 changed files with 41 additions and 9 deletions
  1. +39
    -9
      Makefile
  2. +2
    -0
      README.md

+ 39
- 9
Makefile View File

@@ -1,21 +1,51 @@
.PHONY: all test clean
.PHONY: all test clean upload submit stage-test

SOURCES=Makefile router README.md $(shell find . -path ./build -prune -o -iname '*.rkt' -print)

TESTS_DIR=build
CONTAINER_DIR=$(TESTS_DIR)/container
TEST_SIM_PKG=https://course.ccs.neu.edu/cs3700sp20/archive/bgp-sim.tar.gz

CCIS_TEAM_NAME=hash-lang-uwu
CCIS_PROJECT_NAME=project2-milestone
CCIS_SERVER=login.ccs.neu.edu
CCIS_PATH=CS3700/$(CCIS_PROJECT_NAME)/
CCIS_FMT_CHECK=/course/cs3700sp20/code/project2/project2_format_check.py
CCIS_TURNIN=/course/cs3700sp20/bin/turnin


all:
@echo "This recipe intentionally left blank"

$(TESTS_DIR): $(TESTS_DIR)/sim
mkdir -p $(TESTS_DIR)
sudo ./scripts/nspawn-support.sh create $(TESTS_DIR)/container
clean:
sudo $(RM) -r $(TESTS_DIR)

$(TESTS_DIR)/sim:

$(TESTS_DIR):
mkdir -p $(TESTS_DIR)
cd $(TESTS_DIR) && wget -O bgp-sim.tar.gz $(TEST_SIM_PKG)
cd $(TESTS_DIR) && tar xf bgp-sim.tar.gz

clean:
sudo $(RM) -r $(TESTS_DIR)
$(CONTAINER_DIR):
mkdir -p $(TESTS_DIR)
sudo ./scripts/nspawn-support.sh create $(CONTAINER_DIR)

test: $(TESTS_DIR) $(CONTAINER_DIR)
sudo ./scripts/nspawn-support.sh boot $(CONTAINER_DIR)


upload: $(SOURCES)
@rsync -avzzR --progress $^ $(CCIS_SERVER):$(CCIS_PATH)
@ssh $(CCIS_SERVER) -t -- "tput bold; $(CCIS_FMT_CHECK) $(CCIS_PATH); tput sgr0"

stage-test: upload
ssh $(CCIS_SERVER) -t -- "cd $(CCIS_PATH); make ccis-test && make ccis-clean"

submit: upload
ssh $(CCIS_SERVER) -t -- "cd $(CCIS_PATH); make ccis-clean; $(CCIS_TURNIN) $(CCIS_PROJECT_NAME) $(CCIS_PATH)"

ccis-test: $(TESTS_DIR)
cd $(TESTS_DIR) && ./sim --router ../router milestone

test: $(TESTS_DIR)
sudo ./scripts/nspawn-support.sh boot $(TESTS_DIR)/container
ccis-clean:
$(RM) -r $(TESTS_DIR)

+ 2
- 0
README.md View File

@@ -0,0 +1,2 @@
# \#lang uwu BGP Router


Loading…
Cancel
Save