]> git.ipfire.org Git - thirdparty/sarg.git/blob - Makefile.in
Indent the configure script for more readability.
[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 man1dir = $(mandir)/man1
13 sysconfdir = @sysconfdir@
14 SARGPHPDIR = @SARGPHPDIR@
15 FONTDIR = @FONTDIR@
16 IMAGEDIR = @IMAGEDIR@
17 IBINDIR = -DBINDIR=\"@bindir@\"
18 ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\"
19 ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\"
20 IFONTDIR = -DFONTDIR=\"@FONTDIR@\"
21 IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\"
22 ILOCALEDIR = -DLOCALEDIR=\"@localedir@\"
23 CFLAGS = @CFLAGS@
24 CPPFLAGS = @CPPFLAGS@
25 LDFLAGS = @LDFLAGS@
26 DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
27 LIBS = @LIBS@ @LIBINTL@ -lm
28 SRCDIR = .
29 VPATH = .
30 INSTALL = cp
31 XSL_MAN_STYLESHEET=@XSL_MAN_STYLESHEET@
32 XSL_HTML_STYLESHEET=@XSL_HTML_STYLESHEET@
33 EXEEXT = @EXEEXT@
34
35 INSTALL_PROGRAM = $(INSTALL)
36
37 SRCS = util.c log.c report.c topuser.c email.c sort.c html.c \
38 index.c getconf.c usage.c decomp.c ip2name.c ip2name_dns.c \
39 useragent.c exclude.c convlog.c totday.c repday.c datafile.c\
40 indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \
41 smartfilter.c denied.c authfail.c dichotomic.c \
42 redirector.c auth.c download.c grepday.c ip2name_exec.c \
43 dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
44 usertab.c userinfo.c longline.c url.c fnmatch.c stringbuffer.c \
45 filelist.c readlog.c alias.c fileobject.c \
46 readlog_squid.c readlog_sarg.c readlog_extlog.c readlog_common.c
47
48 all: sarg
49
50 *.o: include/conf.h include/info.h include/defs.h
51
52 alias.o: include/alias.h include/stringbuffer.h
53 authfail.o: include/readlog.h
54 denied.o: include/readlog.h
55 download.o: include/readlog.h
56 filelist.o: include/stringbuffer.h
57 log.o: include/readlog.h
58 readlog.o: include/readlog.h
59 readlog_common.o: include/readlog.h
60 readlog_extlog.o: include/readlog.h
61 readlog_sarg.o: include/readlog.h
62 readlog_squid.o: include/readlog.h
63 stringbuffer.o: include/stringbuffer.h
64 userinfo.o: include/stringbuffer.h include/alias.h
65 fileobject.o: include/fileobject.h
66
67 OBJS = $(SRCS:.c=.o)
68
69 DISTFILES = $(SRCS) ABOUT-NLS
70
71 SUBDIRS = po
72 .PHONY: all install clean uninstall mostlyclean distclean update-po doc $(SUBDIRS)
73
74 .c.o:
75 $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
76
77 sarg: $(OBJS)
78 $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
79
80 $(SUBDIRS):
81 $(MAKE) -C $@
82
83 doc: sarg.1 sarg_manpage.html
84
85 sarg.1: sarg_manpage.xml
86 echo "Making manual page"
87 xmllint --nonet --valid --noout $<
88 xsltproc --stringparam man.output.encoding latin1 --nonet "$(XSL_MAN_STYLESHEET)" $<
89 # docbook2man.pl $<
90
91 sarg_manpage.html: sarg_manpage.xml
92 echo "Making html manual page"
93 xmllint --nonet --valid --noout $<
94 xsltproc --stringparam use.id.as.filename 1 --stringparam root.filename sarg_manpage --nonet "$(XSL_HTML_STYLESHEET)" $<
95
96 install: all install-po
97 -@if test ! -d $(DESTDIR)$(bindir); then \
98 echo "creating $(DESTDIR)$(bindir)"; \
99 mkdir -p $(DESTDIR)$(bindir); \
100 fi
101 -@if test ! -d $(DESTDIR)$(man1dir); then \
102 echo "creating $(DESTDIR)$(man1dir)"; \
103 mkdir -p $(DESTDIR)$(man1dir); \
104 fi
105 -@if test ! -d $(DESTDIR)$(sysconfdir); then \
106 echo "creating $(DESTDIR)$(sysconfdir)"; \
107 mkdir -p $(DESTDIR)$(sysconfdir); \
108 fi
109 -@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
110 echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
111 mkdir -p $(DESTDIR)$(IMAGEDIR); \
112 fi
113 $(INSTALL_PROGRAM) sarg$(EXEEXT) $(DESTDIR)$(bindir)/sarg$(EXEEXT);
114 chmod 755 $(DESTDIR)$(bindir)/sarg$(EXEEXT);
115 $(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(man1dir)/sarg.1
116 chmod 755 $(DESTDIR)$(man1dir)/sarg.1
117 @if test ! -f $(DESTDIR)$(sysconfdir)/sarg.conf; then \
118 echo "cp $(DESTDIR)$(sysconfdir)/sarg.conf"; \
119 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf; \
120 else \
121 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf.default; \
122 fi
123 cp ./exclude_codes $(DESTDIR)$(sysconfdir);
124 cp ./user_limit_block $(DESTDIR)$(sysconfdir);
125 cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
126 -@if test -n "$(FONTDIR)" ; then \
127 if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
128 echo "Creating $(DESTDIR)$(FONTDIR)"; \
129 mkdir -p "$(DESTDIR)$(FONTDIR)"; \
130 fi; \
131 cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
132 fi
133 cp -r ./css.tpl $(DESTDIR)$(sysconfdir);
134 -@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
135 cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
136 fi
137
138 uninstall: uninstall-po
139 rm -f $(DESTDIR)$(bindir)/sarg
140 rm -f $(DESTDIR)$(man1dir)/sarg.1
141
142 TAGS: $(SRCS)
143 etags $(SRCS)
144
145 clean: clean-po
146 rm -f sarg *.o core
147
148 mostlyclean: clean
149
150 distclean: clean
151 rm -f Makefile config.status config.cache config.log
152
153 realclean: distclean
154 rm -f TAGS
155
156 install-po:
157 $(MAKE) -C po install
158
159 uninstall-po:
160 $(MAKE) -C po uninstall
161
162 clean-po:
163 $(MAKE) -C po clean
164
165 update-po:
166 $(MAKE) -C po update-po
167
168 po-from-tp:
169 @echo "Fetching latest po files from translationprojetc.org"
170 rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po