# HG changeset patch # User Oleksandr Gavenko # Date 1456141923 -7200 # Node ID 69323ee4fd3af2b7e65312ab2bc97e3cdd58b95f # Parent 7ed63a9345717e45e00e9884b2ec54fe45f70b85 Remove HEADER.rst because that info now added to HTML template. diff -r 7ed63a934571 -r 69323ee4fd3a Makefile --- a/Makefile Mon Feb 22 13:31:27 2016 +0200 +++ b/Makefile Mon Feb 22 13:52:03 2016 +0200 @@ -40,7 +40,7 @@ ################################################################ # Proj dirs/files. -RST_FILES := $(filter-out HEADER.rst,$(wildcard *.rst)) +RST_FILES := $(wildcard *.rst) HTML_DIR := tips-html RST_HTML_FILES := $(patsubst %.rst,$(HTML_DIR)/%.html,$(RST_FILES)) @@ -61,7 +61,7 @@ LOCAL_DIR := /srv/www/tips ifneq '' '$(filter deploy%,$(MAKECMDGOALS))' - $(shell rm -f HEADER.rst) + $(shell rm -f $(HTML_DIR)/rst.tmpl) endif .PHONY: deploy @@ -98,8 +98,8 @@ .PHONY: html html: $(HTML_FILES) -$(HTML_DIR)/%.html: %.rst HEADER.rst rst.css rst-multi.css rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR) - $(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css,rst-multi.css --template=rst.tmpl $*.rst $@ +$(HTML_DIR)/%.html: %.rst rst.css rst-multi.css $(HTML_DIR)/rst.tmpl $(MAKEFILE_LIST) | $(HTML_DIR) + $(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css,rst-multi.css --template=$(HTML_DIR)/rst.tmpl $*.rst $@ $(HTML_DIR)/iframe.html: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR) { \ @@ -118,21 +118,8 @@ echo ''; \ } >$@ -HEADER.rst: $(MAKEFILE_LIST) - { \ -echo '.. _About: README.html'; \ -echo '.. _`Contacts`: http://resume.defun.work/'; \ -echo '.. _`Oleksandr Gavenko`: http://resume.defun.work/'; \ -echo '.. _`gavenkoa`: http://resume.defun.work/'; \ -echo '.. _Licence: README.html#tips-licence'; \ -echo; \ -echo '.. container:: header'; \ -echo; \ -echo ' [ About_ | Licence_ | `Contacts`_ ]'; \ -echo '.. container:: header small'; \ -echo; \ -echo ' Written by Oleksandr Gavenko (AKA gavenkoa), compiled at ``'`date +%F`'`` from rev ``'`hg id -i`'``.'; \ -} >$@ +$(HTML_DIR)/rst.tmpl: rst.tmpl $(MAKEFILE_LIST) + sed -e "s|{date}|$$(date +%F)|" -e "s|{rev}|$$(hg id -i)|" <$< >$@ $(HTML_DIR)/index.html: $(HTML_DIR)/README.html $(MAKEFILE_LIST) | $(HTML_DIR) cp $< $@ @@ -184,7 +171,7 @@ .PHONY: clean clean: - rm -r -f $(DIRS) HEADER.rst + rm -r -f $(DIRS) ################################################################ # Helper target. @@ -201,9 +188,6 @@ if grep '^.. -\*- coding: utf-8; -\*-' $$f >/dev/null; then :; else \ echo $$f:1:" Has no 'coding: utf-8' directive."; \ fi; \ - if grep '^.. include:: HEADER.rst' $$f >/dev/null; then :; else \ - echo $$f:2:" Has no 'include:: HEADER.rst' directive."; \ - fi; \ if grep '^.. contents::' $$f >/dev/null; then :; else \ echo $$f:7:" Has no 'contents::' directive."; \ fi; \ diff -r 7ed63a934571 -r 69323ee4fd3a index.rst --- a/index.rst Mon Feb 22 13:31:27 2016 +0200 +++ b/index.rst Mon Feb 22 13:52:03 2016 +0200 @@ -1,5 +1,4 @@ .. -*- coding: utf-8; -*- -.. include:: HEADER.rst ========== Рецепты.