]> mj.ucw.cz Git - subauth.git/blob - Makefile
Finished man pages and their installation targets
[subauth.git] / Makefile
1 # The default target
2 all: runtree programs configs
3
4 # Include configuration
5 s=.
6 -include obj/config.mk
7 obj/config.mk:
8         @echo "You need to run configure first." && false
9
10 # Do not show strange errors if the BUILDSYS is not set
11 # (it happens if noone called configure as reported above)
12 ifdef BUILDSYS
13
14 # We will use the libucw build system
15 include $(BUILDSYS)/Maketop
16
17 EXTRA_RUNDIRS=run share/man/man1 share/man/man8
18
19 # Add the detected flags to all the global flags
20 CFLAGS+=$(LIBUCW_CFLAGS) $(LIBUCW_JSON_CFLAGS)
21 LIBS+=$(LIBUCW_LIBS) $(LIBUCW_JSON_LIBS)
22
23 install::
24 .PHONY: install
25
26 include $(s)/server/Makefile
27 include $(s)/client/Makefile
28 include $(s)/pam/Makefile
29
30 ifdef CONFIG_APACHE_MOD
31 include $(s)/apache/Makefile
32 endif
33
34 # And finally the default rules of the build system
35 include $(BUILDSYS)/Makebottom
36
37 # Our own rules for building man pages. They are a little bit hacky
38 # as a2x cannot produce output in a different directory.
39 $(o)/%.1: $(s)/%.1.txt
40         $(M)MAN $<
41         $(Q)cp $< $@.txt
42         $(Q)a2x -f manpage $@.txt
43         $(Q)$(call symlink,$@,run/share/man/man1)
44
45 $(o)/%.8: $(s)/%.8.txt
46         $(M)MAN $<
47         $(Q)cp $< $@.txt
48         $(Q)a2x -f manpage $@.txt
49         $(Q)$(call symlink,$@,run/share/man/man8)
50
51 endif