Makefile
changeset 111 84fe35f49224
parent 110 bf134608773d
child 112 e48a802ce83b
equal deleted inserted replaced
110:bf134608773d 111:84fe35f49224
   108 DIST_FILES = $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES) $(RST_FILES) VERSION
   108 DIST_FILES = $(DICTDZ_FILES) $(INDEX_FILES) $(HTML_FILES) $(RST_FILES) VERSION
   109 
   109 
   110 DISTSRC_HELPER_FILES = VERSION Makefile rst.css .dir-locals.el
   110 DISTSRC_HELPER_FILES = VERSION Makefile rst.css .dir-locals.el
   111 DISTSRC_FILES = $(HTML_FILES) $(RST_FILES) $(DISTSRC_HELPER_FILES)
   111 DISTSRC_FILES = $(HTML_FILES) $(RST_FILES) $(DISTSRC_HELPER_FILES)
   112 
   112 
   113 ################################################################
       
   114 # Dist targets.
       
   115 
       
   116 DIST_TARBALLS = $(DIST_DIR).tar.gz $(DIST_DIR).tar.bz2
   113 DIST_TARBALLS = $(DIST_DIR).tar.gz $(DIST_DIR).tar.bz2
   117 DISTSRC_TARBALLS = $(DISTSRC_DIR).tar.gz $(DISTSRC_DIR).tar.bz2
   114 DISTSRC_TARBALLS = $(DISTSRC_DIR).tar.gz $(DISTSRC_DIR).tar.bz2
       
   115 
       
   116 ################################################################
       
   117 # Deploy targets.
       
   118 
       
   119 .PHONY: deploy
       
   120 deploy: deploy2sf
       
   121 
       
   122 SFTP_PATH = gavenkoa,$(name)@frs.sourceforge.net
       
   123 
       
   124 # First time you deploy to SourceForge (sf) you need manually login to:
       
   125 #   $ sftp $(SFTP_PATH)
       
   126 # as it may require interactive input for accepting server public key.
       
   127 # Next time any action fully automated.
       
   128 
       
   129 .PHONY: deploy2sf
       
   130 deploy2sf: deploy2sf-doc deploy2sf-release deploy2sf-src
       
   131 
       
   132 # Will be accessed via http://$(name).sourceforge.net
       
   133 .PHONY: deploy2sf-doc
       
   134 deploy2sf-doc: $(HTML_FILES)
       
   135 	( echo 'cd htdocs'; \
       
   136 for f in $(HTML_FILES); do \
       
   137   echo "put $$f"; \
       
   138   echo "chmod 644 $$f"; \
       
   139 done; \
       
   140 echo 'quit'; \
       
   141 ) | sftp -b - $(SFTP_PATH)
       
   142 
       
   143 .PHONY: deploy2sf-release
       
   144 deploy2sf-release: $(DIST_TARBALLS) $(DISTSRC_TARBALLS)
       
   145 	( echo 'cd /home/frs/project/g/ga/gadict'; \
       
   146 echo "put CHANGES.rst README.rst"; \
       
   147 echo "mkdir v$(vmajor).$(vminor)"; \
       
   148 echo "cd v$(vmajor).$(vminor)"; \
       
   149 for f in $^; do \
       
   150 	echo "put $$f"; \
       
   151 	echo "chmod 644 $$f"; \
       
   152 done; \
       
   153 echo 'quit'; \
       
   154 ) | sftp -b - $(SFTP_PATH)
       
   155 
       
   156 .PHONY: deploy2sf-src
       
   157 deploy2sf-src:
       
   158 	hg push ssh://gavenkoa@hg.code.sf.net/p/$(name)/code
       
   159 
       
   160 ################################################################
       
   161 # Dist targets.
   118 
   162 
   119 .PHONY: dist
   163 .PHONY: dist
   120 dist: dist-dictd dist-src
   164 dist: dist-dictd dist-src
   121 
   165 
   122 .PHONY: dist-dictd
   166 .PHONY: dist-dictd