diff --git a/make-includes/build_misc_rules.make b/make-includes/build_misc_rules.make index f563f26..1a08f91 100644 --- a/make-includes/build_misc_rules.make +++ b/make-includes/build_misc_rules.make @@ -284,6 +284,7 @@ # If the variable NOSYNC is set (to anything), then files won't be synchronised # with Blackboard. # +ifndef HAS_ANSWERS install: all ifndef NOSYNC @$(LOCKFILE) -r0 $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock && $(SITECOPY) --update --keep-going Blackboard$(PAPER_NUMBER) && $(RM) -f $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock @@ -293,18 +294,55 @@ @$(TEST) -d $(HANDBOOK_INSTALL_ROOT) @$(MKDIR_P) $(INSTALL_DIRECTORY) @if $(TEST) -n "$(WEB_IMAGES)"; then $(MKDIR_P) $(INSTALL_DIRECTORY)/$(IMGDIR); fi -ifdef HAS_ANSWERS # Note: no -p because we're writing to an SMB volume that doesn't accept Unix-style permissions (implies no -a). - @$(RSYNC) -rltgoDv $(QUESTION_INSTALL_FILES) $(ANSWER_INSTALL_FILES) $(INSTALL_DIRECTORY) -else @$(RSYNC) -rltgoDv $(INSTALL_FILES) $(INSTALL_DIRECTORY) -endif @$(RSYNC) -rltgoDv --ignore-missing-args $(foreach i,$(WEB_IMAGES),$(IMGDIR)/$(i)) $(INSTALL_DIRECTORY)/$(IMGDIR) ifndef NOSYNC @$(ANNOUNCE) "Synchronising with Blackboard" @$(LOCKFILE) -r0 $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock && $(SITECOPY) --update Blackboard$(PAPER_NUMBER) && $(RM) -f $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock endif +install-questions: install + +install-answers: +else +install: install-questions install-answers + +install-questions: +ifndef NOSYNC + @$(LOCKFILE) -r0 $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock && $(SITECOPY) --update --keep-going Blackboard$(PAPER_NUMBER) && $(RM) -f $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock + @$(LOCKFILE) -r0 $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock && $(SITECOPY) --catchup Blackboard$(PAPER_NUMBER) && $(RM) -f $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock +endif + @$(ANNOUNCE) "Deploying questions into $(INSTALL_DIRECTORY)" + @$(TEST) -d $(HANDBOOK_INSTALL_ROOT) + @$(MKDIR_P) $(INSTALL_DIRECTORY) + @if $(TEST) -n "$(WEB_IMAGES)"; then $(MKDIR_P) $(INSTALL_DIRECTORY)/$(IMGDIR); fi +# Note: no -p because we're writing to an SMB volume that doesn't accept Unix-style permissions (implies no -a). + @$(RSYNC) -rltgoDv $(QUESTION_INSTALL_FILES) $(INSTALL_DIRECTORY) + @$(RSYNC) -rltgoDv --ignore-missing-args $(foreach i,$(WEB_IMAGES),$(IMGDIR)/$(i)) $(INSTALL_DIRECTORY)/$(IMGDIR) +ifndef NOSYNC + @$(ANNOUNCE) "Synchronising with Blackboard" + @$(LOCKFILE) -r0 $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock && $(SITECOPY) --update Blackboard$(PAPER_NUMBER) && $(RM) -f $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock +endif + +install-answers: +ifndef NOSYNC + @$(LOCKFILE) -r0 $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock && $(SITECOPY) --update --keep-going Blackboard$(PAPER_NUMBER) && $(RM) -f $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock + @$(LOCKFILE) -r0 $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock && $(SITECOPY) --catchup Blackboard$(PAPER_NUMBER) && $(RM) -f $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock +endif + @$(ANNOUNCE) "Deploying answers into $(INSTALL_DIRECTORY)" + @$(TEST) -d $(HANDBOOK_INSTALL_ROOT) + @$(MKDIR_P) $(INSTALL_DIRECTORY) + @if $(TEST) -n "$(WEB_IMAGES)"; then $(MKDIR_P) $(INSTALL_DIRECTORY)/$(IMGDIR); fi +# Note: no -p because we're writing to an SMB volume that doesn't accept Unix-style permissions (implies no -a). + @$(RSYNC) -rltgoDv $(ANSWER_INSTALL_FILES) $(INSTALL_DIRECTORY) + @$(RSYNC) -rltgoDv --ignore-missing-args $(foreach i,$(WEB_IMAGES),$(IMGDIR)/$(i)) $(INSTALL_DIRECTORY)/$(IMGDIR) +ifndef NOSYNC + @$(ANNOUNCE) "Synchronising with Blackboard" + @$(LOCKFILE) -r0 $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock && $(SITECOPY) --update Blackboard$(PAPER_NUMBER) && $(RM) -f $(HOME)/.sitecopy/Blackboard$(PAPER_NUMBER).lock +endif +endif + ################################################################################ #