diff --git a/make-includes/build_document_rules.make b/make-includes/build_document_rules.make index 9bfb2fb..164fc65 100755 --- a/make-includes/build_document_rules.make +++ b/make-includes/build_document_rules.make @@ -220,7 +220,7 @@ $(PRINT_QUESTIONS_TEX): $(DERIVED_XML) @announce "Building $@ from $<" - @echo "\\markfirstpage{$(SECTION)/$(BASE_NAME)/$(@:.tex=.pdf)}" > $@ + @echo "\\markfirstpage{$(SECTION)/$(BASE_NAME)/$(@:.tex=.pdf)}" >> $@ $(call xslt,$<,xml2latex.xsl,$(call xslt_parameter,department,'$(SUBJECT_CODE)'),$(call xslt_parameter,paper,'$(PAPER_NUMBER)'),$(call xslt_parameter,standalone,'no'),$(call xslt_parameter,showanswers,'no'),$(call xslt_parameter,base-path,'Sections/$(SECTION)/$(BASE_NAME)'),$(call xslt_parameter,image-format,'pdf')) >> $@ @echo "\\marklastpage{$(SECTION)/$(BASE_NAME)/$(@:.tex=.pdf)}" >> $@ @@ -274,7 +274,9 @@ # $(DERIVED_XML): $(SOURCE_XML) @announce "Generating $@" - @perl -ne 'if (/^(.*)<\@INC\[([^]]+)\]@>(.*)$$/) { print "$$1\n" . `cat $(PAPER_ROOT)/$$2` . "\n$$3\n"; } else { print; }' $< > $@ + @echo "" > $@ + @echo >> $@ + @perl -ne 'if (/^(.*)<\@INC\[([^]]+)\]@>(.*)$$/) { print "$$1\n" . `cat $(PAPER_ROOT)/$$2` . "\n$$3\n"; } else { print; }' $< >> $@ ################################################################################