chiark / gitweb /
chpwd, subcommand.py: Only show global options in admin context help.
[chopwood] / Makefile
index 9cedd7f13e4a27f1392bc6f4033dce765195783e..3ccd4e592be2bb2087ce7e1d4b5937768f3e521f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -32,6 +32,7 @@ VERSION                        = $(shell ./get-version)
 
 ## The main source files.
 SOURCES                        += chpwd
+SOURCES                        += agpl.py
 SOURCES                        += backend.py
 SOURCES                        += cgi.py
 SOURCES                        += cmdutil.py
@@ -39,6 +40,7 @@ SOURCES                       += config.py
 SOURCES                        += crypto.py
 SOURCES                        += dbmaint.py
 SOURCES                        += format.py
+SOURCES                        += hash.py
 SOURCES                        += httpauth.py
 SOURCES                        += operation.py
 SOURCES                        += output.py
@@ -79,16 +81,16 @@ CLEANFILES           = *.pyc
 
 TARGETS                        += auto.py auto-$(VERSION).py
 
-auto-$(VERSION).py: Makefile get-version $(SOURCES)
+auto-$(VERSION).py: Makefile get-version $(SOURCES) $(wildcard RELEASE)
        { echo "### -*-python-*-"; \
          echo "PACKAGE = '$(PACKAGE)'"; \
          echo "VERSION = '$(VERSION)'"; \
          echo "HOME = '$$(pwd)'"; \
        } >$@.new
        mv $@.new $@
-       rm -f auto.py.new && ln -s $@ auto.py.new && mv auto.py.new auto.py
 
 auto.py: auto-$(VERSION).py
+       rm -f auto.py.new && ln -s $^ auto.py.new && mv auto.py.new auto.py
        for i in auto-*.py; do \
          case $$i in auto-$(VERSION).py) ;; *) rm -f $$i ;; esac; \
        done
@@ -115,4 +117,23 @@ CLEANFILES += $(TARGETS)
 clean::; rm -f $(CLEANFILES)
 .PHONY: clean
 
+###--------------------------------------------------------------------------
+### Distributions.
+
+distdir                         = $(PACKAGE)-$(VERSION)
+
+DISTFILES               = $(SOURCES)
+DISTFILES              += AGPLv3
+DISTFILES              += Makefile get-version
+DISTFILES              += userv.rc
+
+dist:
+       rm -rf $(distdir)
+       mkdir $(distdir)
+       cp $(DISTFILES) $(distdir)
+       echo $(VERSION) >$(distdir)/RELEASE
+       tar cvfz $(distdir).tar.gz $(distdir)
+       rm -rf $(distdir)
+.PHONY: dist
+
 ###----- That's all, folks --------------------------------------------------