diff --git a/make-includes/build_document_rules.make b/make-includes/build_document_rules.make index 567b6d5..1e19cd1 100755 --- a/make-includes/build_document_rules.make +++ b/make-includes/build_document_rules.make @@ -166,7 +166,7 @@ $(PRINT_QUESTIONS_PDF_2UP) $(wildcard *.png) ANSWER_INSTALL_FILES:=$(WEB_ANSWERS_HTML) $(PRINT_ANSWERS_PDF_1UP) \ - $(PRINT_ANSWERS_PDF_2UP) + $(PRINT_ANSWERS_PDF_2UP) $(wildcard *.png) ################################################################################ @@ -394,10 +394,11 @@ # environment variable HANDBOOK_INSTALL_DIRECTORY being defined, and # and that it points to a valid directory. # -# This checks each file in the build directory against the corresponding -# file in the install directory. The local file is only copied to the -# install directory if it is newer, or the remote file doesn't exist. I -# was going to do the "newer" testing using a target rule that dealt with +# This links each file in the build directory into the install directory. +# There's no need to check modification dates, etc., because all of the links +# in the install directory are deleted first anyway. +# +# I was going to do the testing using a target rule that dealt with # each file individually, but for some weird reason it would ignore any # additional files appended to the *_INSTALL_FILES variables. So I've done # it with a foreach instead, which _does_ work. (Ick, although ironically @@ -409,12 +410,12 @@ install-questions: @$(TEST) -d $(HANDBOOK_INSTALL_ROOT) @$(MKDIR_P) $(INSTALL_DIRECTORY) - @$(foreach f,$(QUESTION_INSTALL_FILES),if $(TEST) ! -f $(INSTALL_DIRECTORY)/$(f) -o $(CURDIR)/$(f) -nt $(INSTALL_DIRECTORY)/$(f); then $(ECHO) "Linking $(f)"; $(LN_S) $(CURDIR)/$(f) $(INSTALL_DIRECTORY); fi;) + @$(foreach f,$(QUESTION_INSTALL_FILES),if $(TEST) -f $(CURDIR)/$(f); then $(ECHO) "Linking $(f)"; $(LN_S) -f $(CURDIR)/$(f) $(INSTALL_DIRECTORY); fi;) install-answers: @$(TEST) -d $(HANDBOOK_INSTALL_ROOT) @$(MKDIR_P) $(INSTALL_DIRECTORY) - @$(foreach f,$(ANSWER_INSTALL_FILES),if $(TEST) ! -f $(INSTALL_DIRECTORY)/$(f) -o $(CURDIR)/$(f) -nt $(INSTALL_DIRECTORY)/$(f); then $(ECHO) "Linking $(f)"; $(LN_S) $(CURDIR)/$(f) $(INSTALL_DIRECTORY); fi;) + @$(foreach f,$(ANSWER_INSTALL_FILES),if $(TEST) -f $(CURDIR)/$(f); then $(ECHO) "Linking $(f)"; $(LN_S) -f $(CURDIR)/$(f) $(INSTALL_DIRECTORY); fi;) ################################################################################