# HG changeset patch # User Oleksandr Gavenko # Date 1470313207 -10800 # Node ID 093ee7c2985fb29de9d5ca411ca77f3ee19dda6a # Parent df763e1c3fe677597130b24fcf0be8cd95a49243 Generate sitemap. diff -r df763e1c3fe6 -r 093ee7c2985f Makefile --- a/Makefile Wed Feb 24 21:50:25 2016 +0200 +++ b/Makefile Thu Aug 04 15:20:07 2016 +0300 @@ -54,7 +54,7 @@ ################################################################ # Deploy targets. -WWW_SRV_NAME := defun.work +WWW_SRV_NAME := tips.defun.work WWW_SRV_USER := user HG_SRV_NAME := hg.defun.work HG_SRV_USER := user @@ -69,7 +69,7 @@ # Will be accessible via: http://tips.defun.work/ .PHONY: deploy2defun-web -deploy2defun-web: html +deploy2defun-web: www rsync --delete -avP -e ssh $(HTML_DIR)/ $(WWW_SRV_USER)@$(WWW_SRV_NAME):/srv/www/tips/ .PHONY: deploy2defun-hg @@ -78,7 +78,7 @@ # Will be accessible via: http://gavenkoa.users.sourceforge.net/tips-html/ .PHONY: deploy2sf-web -deploy2sf-web: html +deploy2sf-web: www rsync --delete -avP -e ssh $(HTML_DIR)/ gavenkoa@frs.sourceforge.net:/home/user-web/g/ga/gavenkoa/htdocs/tips-html/ .PHONY: deploy2sf-hg @@ -95,6 +95,9 @@ .PHONY: all all: +.PHONY: www +www: html $(HTML_DIR)/sitemap.xml + .PHONY: html html: $(HTML_FILES) @@ -151,6 +154,19 @@ for f in *.rst; do echo ".. include:: ../$$f"; done; \ } >$@ +$(HTML_DIR)/sitemap.xml: $(RST_FILES) $(MAKEFILE_LIST) + { \ +echo ''; \ +echo ''; \ +for f in *.rst iframe; do \ + echo ''; \ + echo " http://$(WWW_SRV_NAME)/$${f%.rst}.html"; \ + echo ' weekly'; \ + echo ''; \ +done; \ +echo ''; \ +} >$@ + ################################################################ # Init targets.