Commit dd27ca7d authored by Marcus M. Darden's avatar Marcus M. Darden
Browse files

Add support for syncing from Macs to CAEN.

New target 'mac2caen' relies on SSH multiplexing, and an open SSH session
to keep files synced FROM Mac TO CAEN.
parent 160d9ae4
......@@ -22,6 +22,12 @@ PATH := /usr/um/gcc-6.2.0/bin:$(PATH)
LD_LIBRARY_PATH := /usr/um/gcc-6.2.0/lib64
LD_RUN_PATH := /usr/um/gcc-6.2.0/lib64
# This is the path from the CAEN home folder to where projects will be
# uploaded. (eg. /home/mmdarden/eecs281/project1)
# Change this if you prefer a different path.
# REMOTE_BASEDIR := w18/eecs281 # /home/mmdarden/w18/eecs281/project0
REMOTE_BASEDIR := eecs281
# TODO
# Change EXECUTABLE to match the command name given in the project spec.
EXECUTABLE = executable
......@@ -138,6 +144,35 @@ $(FULL_SUBMITFILE): $(FULL_SUBMITFILES)
partialsubmit: $(PARTIAL_SUBMITFILE)
fullsubmit: $(FULL_SUBMITFILE)
mac2caen: REMOTE_PATH:="${REMOTE_BASEDIR}/$$(basename `pwd`)"
mac2caen:
@echo "Build time: `date`" > rsync.log
@open rsync.log
# Make target directory on CAEN server
@echo "Making remote target directory ... ${REMOTE_PATH}" \
>> rsync.log
@ssh login.engin.umich.edu \
"mkdir -p ${REMOTE_PATH}" \
>> rsync.log
# Synchronize local files into target directory on CAEN
@echo "Synchronizing local files to CAEN ..." \
>> rsync.log
@rsync \
-av \
--delete \
--exclude '.git*' \
--exclude 'rsync.log' \
--exclude '.DS_Store' \
--filter=":- .gitignore" \
./ \
"login.engin.umich.edu:${REMOTE_PATH}/" \
>> rsync.log
# Do remote builds
@echo "Making remote executables with \"make all\" ..." \
>> rsync.log
@ssh login.engin.umich.edu "cd ${REMOTE_PATH} && make all" \
>> rsync.log
define MAKEFILE_HELP
EECS281 Advanced Makefile Help
* This Makefile uses advanced techniques, for more information:
......@@ -176,6 +211,13 @@ EECS281 Advanced Makefile Help
A) Matches current autograder style grading tests
B) Usage:
$$ make static
* Mac to CAEN upload support
A) Requires an .ssh/config file with SSH Multiplexing enabled and an
open SSH connection.
B) Edit the REMOTE_BASEDIR variable if default is not preferred.
C) Usage:
$$ make mac2caen
endef
export MAKEFILE_HELP
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment