]> gitweb @ CieloNegro.org - cabal-shared-makefile.git/commitdiff
improved "make push"
authorPHO <pho@cielonegro.org>
Tue, 27 Sep 2011 16:16:40 +0000 (01:16 +0900)
committerPHO <pho@cielonegro.org>
Tue, 27 Sep 2011 16:16:40 +0000 (01:16 +0900)
cabal-package.mk

index 2363b98c6d4f6d38725bc0352c8cf6de2a08b9cf..572e5b60eedd82edac5f6edf331dfb41daaf25f1 100644 (file)
@@ -112,19 +112,26 @@ fixme:
 lint:
        $(HLINT) . --report
 
 lint:
        $(HLINT) . --report
 
-push: doc ditz
+push: push-repo push-ditz push-doc
+
+push-repo:
        if [ -d "_darcs" ]; then \
                darcs push; \
        elif [ -d ".git" ]; then \
                git push --all && git push --tags; \
        fi
        if [ -d "_darcs" ]; then \
                darcs push; \
        elif [ -d ".git" ]; then \
                git push --all && git push --tags; \
        fi
+
+push-ditz: ditz
+       rsync -av --delete \
+               dist/ditz/ \
+               www@nem.cielonegro.org:static.cielonegro.org/htdocs/ditz/$(PKG_NAME)
+
+push-doc: doc
        if [ -d "dist/doc" ]; then \
                rsync -av --delete \
                        dist/doc/html/$(PKG_NAME)/ \
                        www@nem.cielonegro.org:static.cielonegro.org/htdocs/doc/$(PKG_NAME); \
        fi
        if [ -d "dist/doc" ]; then \
                rsync -av --delete \
                        dist/doc/html/$(PKG_NAME)/ \
                        www@nem.cielonegro.org:static.cielonegro.org/htdocs/doc/$(PKG_NAME); \
        fi
-       rsync -av --delete \
-               dist/ditz/ \
-               www@nem.cielonegro.org:static.cielonegro.org/htdocs/ditz/$(PKG_NAME)
 
 
-.PHONY: build build-hook setup-config setup-config-hook run clean clean-hook install doc sdist test lint push
+.PHONY: build build-hook setup-config setup-config-hook run clean clean-hook \
+               install doc sdist test lint push push-repo push-ditz push-doc