]> mj.ucw.cz Git - subauth.git/blob - Makefile
Debian: Re-packaged for Bookworm
[subauth.git] / Makefile
1 VERSION=1.0
2 YEAR=2018
3
4 # The default target
5 all: runtree programs configs
6
7 # Include configuration
8 s=.
9 -include obj/config.mk
10 obj/config.mk:
11         @echo "You need to run configure first." && false
12
13 # Do not show strange errors if the BUILDSYS is not set
14 # (it happens if noone called configure as reported above)
15 ifdef BUILDSYS
16
17 # We will use the libucw build system
18 include $(BUILDSYS)/Maketop
19
20 EXTRA_RUNDIRS=run/subauthd lib/subauthd share/man/man1 share/man/man8
21
22 # Add the detected flags to all the global flags
23 CFLAGS+=$(LIBUCW_CFLAGS) $(LIBUCW_JSON_CFLAGS)
24 LIBS+=$(LIBUCW_LIBS) $(LIBUCW_JSON_LIBS)
25
26 install::
27 .PHONY: install
28
29 include $(s)/server/Makefile
30 include $(s)/client/Makefile
31 include $(s)/pam/Makefile
32
33 ifdef CONFIG_APACHE_MOD
34 include $(s)/apache/Makefile
35 endif
36
37 # And finally the default rules of the build system
38 include $(BUILDSYS)/Makebottom
39
40 # Our own rules for building man pages. They are a little bit hacky
41 # as a2x cannot produce output in a different directory.
42 $(o)/%.1: $(s)/%.1.txt
43         $(M)MAN $<
44         $(Q)cp $< $@.txt
45         $(Q)a2x -f manpage $@.txt
46         $(Q)$(call symlink,$@,run/share/man/man1)
47
48 $(o)/%.8: $(s)/%.8.txt
49         $(M)MAN $<
50         $(Q)cp $< $@.txt
51         $(Q)a2x -f manpage $@.txt
52         $(Q)$(call symlink,$@,run/share/man/man8)
53
54 # The dependency on %.1 is there to serialize both calls of asciidoc,
55 # which does not name temporary files safely.
56 $(o)/%.1.html: $(s)/%.1.txt $(o)/%.1
57         $(M)HTML $<
58         $(Q)a2x -f xhtml -D $(@D) $<
59 $(o)/%.8.html: $(s)/%.8.txt $(o)/%.8
60         $(M)HTML $<
61         $(Q)a2x -f xhtml -D $(@D) $<
62
63 release: $(HTML_DOCS)
64         git tag v$(VERSION)
65         git push --tags
66         git archive --format=tar --prefix=subauth-$(VERSION)/ HEAD | gzip >subauth-$(VERSION).tar.gz
67         rsync subauth-$(VERSION).tar.gz atrey:ftp/linux/
68         rsync $(HTML_DOCS) jw:www/static/sw/subauth/
69         ssh jw 'cd web && bin/release-prog subauth $(VERSION)'
70
71 endif