]> git.ipfire.org Git - thirdparty/sarg.git/blob - Makefile.in
Generate the manpage from a docbook document
[thirdparty/sarg.git] / Makefile.in
1 # Makefile.in for sarg
2
3 prefix=@prefix@
4 datarootdir=@datarootdir@
5 datadir=@datadir@
6 exec_prefix=@exec_prefix@
7 PACKAGE_TARNAME=@PACKAGE_TARNAME@
8 docdir = @docdir@
9 CC = @CC@
10 BINDIR = @bindir@
11 MANDIR = @mandir@
12 SYSCONFDIR = @sysconfdir@
13 SARGPHPDIR = @SARGPHPDIR@
14 FONTDIR = @FONTDIR@
15 IMAGEDIR = @IMAGEDIR@
16 IBINDIR = -DBINDIR=\"@bindir@\"
17 ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\"
18 ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\"
19 IFONTDIR = -DFONTDIR=\"@FONTDIR@\"
20 IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\"
21 ILOCALEDIR = -DLOCALEDIR=\"@localedir@\"
22 CFLAGS = @CFLAGS@
23 CPPFLAGS = @CPPFLAGS@
24 LDFLAGS = @LDFLAGS@
25 DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
26 LIBS = @LIBS@
27 SRCDIR = .
28 VPATH = .
29 INSTALL = cp
30
31 INSTALL_PROGRAM = $(INSTALL)
32
33 SRCS = util.c log.c report.c topuser.c email.c sort.c html.c \
34 totger.c index.c getconf.c usage.c decomp.c ip2name.c \
35 useragent.c exclude.c convlog.c totday.c repday.c datafile.c\
36 indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \
37 smartfilter.c denied.c authfail.c charset.c \
38 squidguard_log.c squidguard_report.c auth.c download.c grepday.c \
39 dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
40 usertab.c userinfo.c longline.c
41
42 OBJS = $(patsubst %.c,%.o,$(SRCS))
43
44 DISTFILES = $(SRCS) ABOUT-NLS
45
46 SUBDIRS = po
47 .PHONY: all install clean uninstall mostlyclean distclean update-po doc $(SUBDIRS)
48
49 all: sarg sarg.1
50
51 .c.o:
52 $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
53
54 *.o: include/conf.h include/info.h include/defs.h
55
56 sarg: $(OBJS)
57 $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
58
59 $(SUBDIRS):
60 $(MAKE) -C $@
61
62 doc: sarg.1 sarg_manpage.html
63
64 sarg.1: sarg_manpage.xml
65 echo "Making manual page"
66 xmllint --nonet --valid --noout $<
67 xsltproc --stringparam man.output.encoding latin1 --nonet /usr/share/sgml/docbook/xsl-stylesheets/manpages/docbook.xsl $<
68 # docbook2man.pl $<
69
70 sarg_manpage.html: sarg_manpage.xml
71 echo "Making html manual page"
72 xmllint --nonet --valid --noout $<
73 xsltproc --stringparam use.id.as.filename 1 --stringparam root.filename sarg_manpage --nonet /usr/share/sgml/docbook/xsl-stylesheets/html/onechunk.xsl $<
74
75 install: all install-po
76 -@if test ! -d $(DESTDIR)$(BINDIR); then \
77 echo "creating $(DESTDIR)$(BINDIR)"; \
78 mkdir -p $(DESTDIR)$(BINDIR); \
79 fi
80 -@if test ! -d $(DESTDIR)$(MANDIR); then \
81 echo "creating $(DESTDIR)$(MANDIR)"; \
82 mkdir -p $(DESTDIR)$(MANDIR); \
83 fi
84 -@if test ! -d $(DESTDIR)$(SYSCONFDIR); then \
85 echo "creating $(DESTDIR)$(SYSCONFDIR)"; \
86 mkdir -p $(DESTDIR)$(SYSCONFDIR); \
87 fi
88 -@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
89 echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
90 mkdir -p $(DESTDIR)$(IMAGEDIR); \
91 fi
92 $(INSTALL_PROGRAM) sarg $(DESTDIR)$(BINDIR)/sarg
93 chmod 755 $(DESTDIR)$(BINDIR)/sarg
94 $(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(MANDIR)/sarg.1
95 chmod 755 $(DESTDIR)$(MANDIR)/sarg.1
96 @if test ! -f $(DESTDIR)$(SYSCONFDIR)/sarg.conf; then \
97 echo "cp $(DESTDIR)$(SYSCONFDIR)/sarg.conf"; \
98 cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf; \
99 else \
100 cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf.default; \
101 fi
102 cp ./exclude_codes $(DESTDIR)$(SYSCONFDIR);
103 cp ./user_limit_block $(DESTDIR)$(SYSCONFDIR);
104 cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
105 -@if test -n "$(FONTDIR)" ; then \
106 if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
107 echo "Creating $(DESTDIR)$(FONTDIR)"; \
108 mkdir -p "$(DESTDIR)$(FONTDIR)"; \
109 fi; \
110 cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
111 fi
112 cp -r ./css.tpl $(DESTDIR)$(SYSCONFDIR);
113 -@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
114 cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
115 fi
116
117 uninstall: uninstall-po
118 rm -f $(DESTDIR)$(BINDIR)/sarg
119 rm -f $(DESTDIR)$(MANDIR)/sarg.1
120
121 TAGS: $(SRCS)
122 etags $(SRCS)
123
124 clean: clean-po
125 rm -f sarg *.o core
126
127 mostlyclean: clean
128
129 distclean: clean
130 rm -f Makefile config.status config.cache config.log
131
132 realclean: distclean
133 rm -f TAGS
134
135 install-po:
136 $(MAKE) -C po install
137
138 uninstall-po:
139 $(MAKE) -C po uninstall
140
141 clean-po:
142 $(MAKE) -C po clean
143
144 update-po:
145 $(MAKE) -C po update-po
146
147 po-from-tp:
148 @echo "Fetching latest po files from translationprojetc.org"
149 rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po