# HG changeset patch # User Oleksandr Gavenko # Date 1342207939 -10800 # Node ID c7017f58585c31f35bd2f274649c91bce89c661f # Parent dacdabba767c903e974fae17ecfb283a02cfe749 Include common header with quick links. diff -r dacdabba767c -r c7017f58585c Makefile --- a/Makefile Fri Jul 13 22:02:58 2012 +0300 +++ b/Makefile Fri Jul 13 22:32:19 2012 +0300 @@ -34,7 +34,7 @@ ################################################################ # Proj dirs/files. -RST_FILES := $(wildcard *.rst) +RST_FILES := $(filter-out HEADER.rst,$(wildcard *.rst)) TXT_FILES := $(wildcard *.txt) HTML_DIR := tips-html @@ -67,9 +67,18 @@ .PHONY: html html: $(HTML_FILES) $(TXT__FILES) -$(HTML_DIR)/%.html: %.rst rst.css $(MAKEFILE_LIST) | $(HTML_DIR) +$(HTML_DIR)/%.html: %.rst HEADER.rst rst.css $(MAKEFILE_LIST) | $(HTML_DIR) $(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css $*.rst $@ +HEADER.rst: Makefile + { \ +echo '.. _Home: frame.html'; \ +echo '.. _`Home (no frame)`: index.html'; \ +echo '.. _About: http://gavenkoa.users.sourceforge.net/'; \ +echo; \ +echo '[ Home_ | `Home (no frame)`_ | About_ ]'; \ +} >$@ + $(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) $(MAKEFILE_LIST) | $(HTML_DIR) ./index.sh frame >$@ @@ -112,7 +121,7 @@ .PHONY: clean clean: - rm -r -f $(DIRS) + rm -r -f $(DIRS) HEADER.rst ################################################################ # Helper target.