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)) ...@@ -61,8 +61,9 @@ SOURCES := $(filter-out $(TESTSOURCES), $(SOURCES))
OBJECTS = $(SOURCES:%.cpp=%.o) OBJECTS = $(SOURCES:%.cpp=%.o)
# name of the tarball created for submission # name of the tarball created for submission
PARTIAL_SUBMITFILE = partialsubmit.tar.gz
FULL_SUBMITFILE = fullsubmit.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 # name of the perf data file, only used by the clean target
PERF_FILE = perf.data* PERF_FILE = perf.data*
...@@ -144,31 +145,46 @@ alltests: $(TESTS) ...@@ -144,31 +145,46 @@ alltests: $(TESTS)
# make clean - remove .o files, executables, tarball # make clean - remove .o files, executables, tarball
clean: clean:
rm -f $(OBJECTS) $(EXECUTABLE) $(EXECUTABLE)_debug $(EXECUTABLE)_profile \ 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 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 # make partialsubmit.tar.gz - cleans, creates tarball
# omitting test files # omitting test files
PARTIAL_SUBMITFILES=$(filter-out $(TESTSOURCES), \ PARTIAL_SUBMITFILES=$(filter-out $(wildcard test*.txt), $(FULL_SUBMITFILES))
$(wildcard Makefile *.h *.hpp *.cpp))
$(PARTIAL_SUBMITFILE): $(PARTIAL_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) \ COPYFILE_DISABLE=true tar -vczf $(PARTIAL_SUBMITFILE) \
$(PARTIAL_SUBMITFILES) $(PARTIAL_SUBMITFILES)
@echo !!! WARNING: No test files included. Use 'make fullsubmit' to include test files. !!! @echo !!! WARNING: No test files included. Use 'make fullsubmit' to include test files. !!!
# make fullsubmit.tar.gz - cleans, runs dos2unix, creates tarball # make ungraded.tar.gz - cleans, creates tarball omitting test files, Makefile
# including test files UNGRADED_SUBMITFILES=$(filter-out Makefile, $(PARTIAL_SUBMITFILES))
FULL_SUBMITFILES=$(filter-out $(TESTSOURCES), \ $(UNGRADED_SUBMITFILE): $(UNGRADED_SUBMITFILES)
$(wildcard Makefile *.h *.hpp *.cpp test*.txt)) rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) $(UNGRADED_SUBMITFILE)
$(FULL_SUBMITFILE): $(FULL_SUBMITFILES) @touch __ungraded
rm -f $(PARTIAL_SUBMITFILE) $(FULL_SUBMITFILE) COPYFILE_DISABLE=true tar -vczf $(UNGRADED_SUBMITFILE) \
COPYFILE_DISABLE=true tar -vczf $(FULL_SUBMITFILE) $(FULL_SUBMITFILES) $(UNGRADED_SUBMITFILES) __ungraded
@echo !!! Final submission prepared, test files included... READY FOR GRADING !!! @rm -f __ungraded
@echo !!! WARNING: This submission will not be graded. !!!
# shortcut for make submit tarballs # shortcut for make submit tarballs
partialsubmit: identifier $(PARTIAL_SUBMITFILE)
fullsubmit: identifier $(FULL_SUBMITFILE) fullsubmit: identifier $(FULL_SUBMITFILE)
partialsubmit: identifier $(PARTIAL_SUBMITFILE)
ungraded: identifier $(UNGRADED_SUBMITFILE)
# REMOTE_PATH has default definition above # REMOTE_PATH has default definition above
sync2caen: sync2caen:
...@@ -279,6 +295,6 @@ help: ...@@ -279,6 +295,6 @@ help:
# these targets do not create any files # these targets do not create any files
.PHONY: all release debug profile static clean alltests partialsubmit \ .PHONY: all release debug profile static clean alltests partialsubmit \
fullsubmit sync2caen help identifier fullsubmit ungraded sync2caen help identifier
# disable built-in rules # disable built-in rules
.SUFFIXES: .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