Makefile
changeset 64 e1866d4fdbad
parent 63 638be4cee0fe
child 65 6e28048f3e74
equal deleted inserted replaced
63:638be4cee0fe 64:e1866d4fdbad
    98 $(HTML_DIR)/%.html: %.rst HEADER.rst rst.css $(MAKEFILE_LIST) | $(HTML_DIR)
    98 $(HTML_DIR)/%.html: %.rst HEADER.rst rst.css $(MAKEFILE_LIST) | $(HTML_DIR)
    99 	$(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css $*.rst $@
    99 	$(RST2HTML) $(RST_FLAGS) --stylesheet=rst.css $*.rst $@
   100 
   100 
   101 $(HTML_DIR)/iframe.html: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
   101 $(HTML_DIR)/iframe.html: $(RST_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
   102 	{ \
   102 	{ \
   103 echo '<html><head></head><body>'; \
   103 echo '<html><head><style>'; \
       
   104 echo 'a { text-decoration: none; color: hsl(240, 100%, 50%); }'; \
       
   105 echo '</style></head><body>'; \
   104 echo '<ul style="padding-left: 1em;">'; \
   106 echo '<ul style="padding-left: 1em;">'; \
   105 for f in $(RST_FILES); do \
   107 for f in $(sort $(RST_FILES)); do \
   106   n=$${f%.rst}; \
   108   n=$${f%.rst}; \
   107   printf '<li><a target="_parent" href="%s.html">%s</a></li>' $$n $$n; \
   109   printf '<li><a target="_parent" href="%s.html">%s</a></li>' $$n $$n; \
   108 done; \
   110 done; \
   109 echo '</ul>'; \
   111 echo '</ul>'; \
   110 echo '</body></html>'; \
   112 echo '</body></html>'; \
   115 echo '.. raw:: html'; \
   117 echo '.. raw:: html'; \
   116 echo; \
   118 echo; \
   117 echo '  <div id="sidebar"><iframe src="iframe.html"></iframe></div>'; \
   119 echo '  <div id="sidebar"><iframe src="iframe.html"></iframe></div>'; \
   118 echo; \
   120 echo; \
   119 echo '.. _About: README.html'; \
   121 echo '.. _About: README.html'; \
   120 echo '.. _`About author`: http://resume.defun.work/'; \
   122 echo '.. _`Contacts`: http://resume.defun.work/'; \
   121 echo '.. _`Oleksandr Gavenko`: http://resume.defun.work/'; \
   123 echo '.. _`Oleksandr Gavenko`: http://resume.defun.work/'; \
   122 echo '.. _`gavenkoa`: http://resume.defun.work/'; \
   124 echo '.. _`gavenkoa`: http://resume.defun.work/'; \
   123 echo '.. _Licence: README.html#tips-licence'; \
   125 echo '.. _Licence: README.html#tips-licence'; \
   124 echo '.. _`Contact`: gavenkoa@gmail.com'; \
   126 echo; \
   125 echo; \
   127 echo '.. container:: header'; \
   126 echo '[ About_ | Licence_ | `About author`_ | `Contact`_ ]'; \
   128 echo; \
   127 echo; \
   129 echo '  [ About_ | Licence_ | `Contacts`_ ]'; \
   128 echo 'Written by Oleksandr Gavenko (AKA gavenkoa), compiled at ``'`date +%F`'`` from rev ``'`hg id -i`'``.'; \
   130 echo '.. container:: header small'; \
       
   131 echo; \
       
   132 echo '  Written by Oleksandr Gavenko (AKA gavenkoa), compiled at ``'`date +%F`'`` from rev ``'`hg id -i`'``.'; \
   129 } >$@
   133 } >$@
   130 
   134 
   131 $(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
   135 $(HTML_DIR)/frame-index.html: index.sh $(RST_HTML_FILES) $(MAKEFILE_LIST) | $(HTML_DIR)
   132 	./index.sh frame >$@
   136 	./index.sh frame >$@
   133 
   137