chiark / gitweb /
httpauth.py: Capitalize the login whinges.
[chopwood] / Makefile
CommitLineData
a2916c06
MW
1### -*-makefile-*-
2###
3### Build and setup script
4###
5### (c) 2013 Mark Wooding
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This file is part of Chopwood: a password-changing service.
11###
12### Chopwood is free software; you can redistribute it and/or modify
13### it under the terms of the GNU Affero General Public License as
14### published by the Free Software Foundation; either version 3 of the
15### License, or (at your option) any later version.
16###
17### Chopwood is distributed in the hope that it will be useful,
18### but WITHOUT ANY WARRANTY; without even the implied warranty of
19### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20### GNU Affero General Public License for more details.
21###
22### You should have received a copy of the GNU Affero General Public
23### License along with Chopwood; if not, see
24### <http://www.gnu.org/licenses/>.
25
26## Basic naming stuff.
27PACKAGE = chopwood
28VERSION = $(shell ./get-version)
29
30###--------------------------------------------------------------------------
31### The big list of source files.
32
33## The main source files.
34SOURCES += chpwd
a6af9c27 35SOURCES += agpl.py
a2916c06
MW
36SOURCES += backend.py
37SOURCES += cgi.py
38SOURCES += cmdutil.py
39SOURCES += config.py
40SOURCES += crypto.py
41SOURCES += dbmaint.py
42SOURCES += format.py
a6af9c27 43SOURCES += hash.py
a2916c06
MW
44SOURCES += httpauth.py
45SOURCES += operation.py
46SOURCES += output.py
47SOURCES += service.py
48SOURCES += subcommand.py
49SOURCES += util.py
50
51## The command implementations.
52SOURCES += cmd-admin.py
53SOURCES += cmd-cgi.py
54SOURCES += cmd-remote.py
55SOURCES += cmd-user.py
56
57## Template HTML files.
58SOURCES += about.fhtml
59SOURCES += cookies.fhtml
60SOURCES += error.fhtml
61SOURCES += exception.fhtml
62SOURCES += list.fhtml
63SOURCES += login.fhtml
64SOURCES += operate.fhtml
65SOURCES += wrapper.fhtml
66
67## Other static files.
68SOURCES += chpwd.css
69SOURCES += chpwd.js
70
71###--------------------------------------------------------------------------
72### Default rules.
73
74all::
75.PHONY: all
76
77CLEANFILES = *.pyc
78
79###--------------------------------------------------------------------------
80### The automatically-generated installation module.
81
82TARGETS += auto.py auto-$(VERSION).py
83
ffd791da 84auto-$(VERSION).py: Makefile get-version $(SOURCES) $(wildcard RELEASE)
a2916c06
MW
85 { echo "### -*-python-*-"; \
86 echo "PACKAGE = '$(PACKAGE)'"; \
87 echo "VERSION = '$(VERSION)'"; \
88 echo "HOME = '$$(pwd)'"; \
89 } >$@.new
90 mv $@.new $@
a2916c06
MW
91
92auto.py: auto-$(VERSION).py
ffd791da 93 rm -f auto.py.new && ln -s $^ auto.py.new && mv auto.py.new auto.py
a2916c06
MW
94 for i in auto-*.py; do \
95 case $$i in auto-$(VERSION).py) ;; *) rm -f $$i ;; esac; \
96 done
97
98###--------------------------------------------------------------------------
99### Generate the static files.
100
101TARGETS += static/stamp
102
103static/stamp: $(SOURCES) auto.py
104 rm -rf static.new
105 ./chpwd static static.new
106 touch static.new/stamp
107 rm -rf static && mv static.new static
108
109clean::; rm -rf static
110
111###--------------------------------------------------------------------------
112### The standard rules.
113
114all:: $(TARGETS)
115
116CLEANFILES += $(TARGETS)
117clean::; rm -f $(CLEANFILES)
118.PHONY: clean
119
a4a97b6b
MW
120###--------------------------------------------------------------------------
121### Distributions.
122
123distdir = $(PACKAGE)-$(VERSION)
124
125DISTFILES = $(SOURCES)
126DISTFILES += AGPLv3
127DISTFILES += Makefile get-version
128DISTFILES += userv.rc
129
130dist:
131 rm -rf $(distdir)
132 mkdir $(distdir)
133 cp $(DISTFILES) $(distdir)
134 echo $(VERSION) >$(distdir)/RELEASE
135 tar cvfz $(distdir).tar.gz $(distdir)
136 rm -rf $(distdir)
137.PHONY: dist
138
a2916c06 139###----- That's all, folks --------------------------------------------------