# HG changeset patch # User Oleksandr Gavenko # Date 1470313207 -10800 # Node ID 7bfe538a4cfe73ffb06eb5432d45c9bf74f1f0b6 # Parent bbd8c9309d8b2ea7fb2ba699a2d9fa644d7437ac Generate sitemap. diff -r bbd8c9309d8b -r 7bfe538a4cfe Makefile --- a/Makefile Wed Aug 03 22:58:19 2016 +0300 +++ 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.