Skip to content
Snippets Groups Projects
Commit 889672e1 authored by Marcus M. Darden's avatar Marcus M. Darden
Browse files

Add the 'ungraded' target

Prior to this change, a student would need to create their own tarball
if they wanted to only upload code to facilitate staff viewing their
code on the AG. This makes a source-only archive with no tests or
Makefile, to guarantee that a submission is not used.
parent 156f1a0b
No related branches found
No related tags found
No related merge requests found
......@@ -61,8 +61,9 @@ SOURCES := $(filter-out $(TESTSOURCES), $(SOURCES))
OBJECTS = $(SOURCES:%.cpp=%.o)
# name of the tarball created for submission
PARTIAL_SUBMITFILE = partialsubmit.tar.gz
FULL_SUBMITFILE = fullsubmit.tar.gz
PARTIAL_SUBMITFILE = partialsubmit.tar.gz
UNGRADED_SUBMITFILE = ungraded.tar.gz
# name of the perf data file, only used by the clean target
PERF_FILE = perf.data*
......@@ -144,31 +145,46 @@ alltests: $(TESTS)
# make clean - remove .o files, executables, tarball
clean:
rm -f $(OBJECTS) $(EXECUTABLE) $(EXECUTABLE)_debug $(EXECUTABLE)_profile \
$(TESTS) $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) $(PERF_FILE)
$(TESTS) $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) $(PERF_FILE) \
$(UNGRADED_SUBMITFILE)
rm -Rf *.dSYM
# get a list of all files that might be included in a submit
# different submit types can do additional filtering to remove unwanted files
FULL_SUBMITFILES=$(filter-out $(TESTSOURCES), \
$(wildcard Makefile *.h *.hpp *.cpp test*.txt))
# make fullsubmit.tar.gz - cleans, runs dos2unix, creates tarball
# including test files
$(FULL_SUBMITFILE): $(FULL_SUBMITFILES)
rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) $(UNGRADED_SUBMITFILE)
COPYFILE_DISABLE=true tar -vczf $(FULL_SUBMITFILE) $(FULL_SUBMITFILES)
@echo !!! Final submission prepared, test files included... READY FOR GRADING !!!
# make partialsubmit.tar.gz - cleans, creates tarball
# omitting test files
PARTIAL_SUBMITFILES=$(filter-out $(TESTSOURCES), \
$(wildcard Makefile *.h *.hpp *.cpp))
PARTIAL_SUBMITFILES=$(filter-out $(wildcard test*.txt), $(FULL_SUBMITFILES))
$(PARTIAL_SUBMITFILE): $(PARTIAL_SUBMITFILES)
rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE)
rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) $(UNGRADED_SUBMITFILE)
COPYFILE_DISABLE=true tar -vczf $(PARTIAL_SUBMITFILE) \
$(PARTIAL_SUBMITFILES)
@echo !!! WARNING: No test files included. Use 'make fullsubmit' to include test files. !!!
# make fullsubmit.tar.gz - cleans, runs dos2unix, creates tarball
# including test files
FULL_SUBMITFILES=$(filter-out $(TESTSOURCES), \
$(wildcard Makefile *.h *.hpp *.cpp test*.txt))
$(FULL_SUBMITFILE): $(FULL_SUBMITFILES)
rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE)
COPYFILE_DISABLE=true tar -vczf $(FULL_SUBMITFILE) $(FULL_SUBMITFILES)
@echo !!! Final submission prepared, test files included... READY FOR GRADING !!!
# make ungraded.tar.gz - cleans, creates tarball omitting test files, Makefile
UNGRADED_SUBMITFILES=$(filter-out Makefile, $(PARTIAL_SUBMITFILES))
$(UNGRADED_SUBMITFILE): $(UNGRADED_SUBMITFILES)
rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) $(UNGRADED_SUBMITFILE)
@touch __ungraded
COPYFILE_DISABLE=true tar -vczf $(UNGRADED_SUBMITFILE) \
$(UNGRADED_SUBMITFILES) __ungraded
@rm -f __ungraded
@echo !!! WARNING: This submission will not be graded. !!!
# shortcut for make submit tarballs
partialsubmit: identifier $(PARTIAL_SUBMITFILE)
fullsubmit: identifier $(FULL_SUBMITFILE)
partialsubmit: identifier $(PARTIAL_SUBMITFILE)
ungraded: identifier $(UNGRADED_SUBMITFILE)
# REMOTE_PATH has default definition above
sync2caen:
......@@ -279,6 +295,6 @@ help:
# these targets do not create any files
.PHONY: all release debug profile static clean alltests partialsubmit \
fullsubmit sync2caen help identifier
fullsubmit ungraded sync2caen help identifier
# disable built-in rules
.SUFFIXES:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment