]> git.ipfire.org Git - thirdparty/sarg.git/blob - Makefile.in
Proper include dependencies in Makefile
[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 charset.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 \
46 readlog_squid.c readlog_sarg.c readlog_extlog.c readlog_common.c
47
48 *.o: include/conf.h include/info.h include/defs.h
49
50 authfail.o: include/readlog.h
51 denied.o: include/readlog.h
52 download.o: include/readlog.h
53 filelist.o: include/stringbuffer.h
54 log.o: include/readlog.h
55 readlog.o: include/readlog.h
56 readlog_common.o: include/readlog.h
57 readlog_extlog.o: include/readlog.h
58 readlog_sarg.o: include/readlog.h
59 readlog_squid.o: include/readlog.h
60 stringbuffer.o: include/stringbuffer.h
61 userinfo.o: include/stringbuffer.h
62
63 OBJS = $(SRCS:.c=.o)
64
65 DISTFILES = $(SRCS) ABOUT-NLS
66
67 SUBDIRS = po
68 .PHONY: all install clean uninstall mostlyclean distclean update-po doc $(SUBDIRS)
69
70 all: sarg
71
72 .c.o:
73 $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
74
75 sarg: $(OBJS)
76 $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
77
78 $(SUBDIRS):
79 $(MAKE) -C $@
80
81 doc: sarg.1 sarg_manpage.html
82
83 sarg.1: sarg_manpage.xml
84 echo "Making manual page"
85 xmllint --nonet --valid --noout $<
86 xsltproc --stringparam man.output.encoding latin1 --nonet "$(XSL_MAN_STYLESHEET)" $<
87 # docbook2man.pl $<
88
89 sarg_manpage.html: sarg_manpage.xml
90 echo "Making html manual page"
91 xmllint --nonet --valid --noout $<
92 xsltproc --stringparam use.id.as.filename 1 --stringparam root.filename sarg_manpage --nonet "$(XSL_HTML_STYLESHEET)" $<
93
94 install: all install-po
95 -@if test ! -d $(DESTDIR)$(bindir); then \
96 echo "creating $(DESTDIR)$(bindir)"; \
97 mkdir -p $(DESTDIR)$(bindir); \
98 fi
99 -@if test ! -d $(DESTDIR)$(man1dir); then \
100 echo "creating $(DESTDIR)$(man1dir)"; \
101 mkdir -p $(DESTDIR)$(man1dir); \
102 fi
103 -@if test ! -d $(DESTDIR)$(sysconfdir); then \
104 echo "creating $(DESTDIR)$(sysconfdir)"; \
105 mkdir -p $(DESTDIR)$(sysconfdir); \
106 fi
107 -@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
108 echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
109 mkdir -p $(DESTDIR)$(IMAGEDIR); \
110 fi
111 $(INSTALL_PROGRAM) sarg$(EXEEXT) $(DESTDIR)$(bindir)/sarg$(EXEEXT);
112 chmod 755 $(DESTDIR)$(bindir)/sarg$(EXEEXT);
113 $(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(man1dir)/sarg.1
114 chmod 755 $(DESTDIR)$(man1dir)/sarg.1
115 @if test ! -f $(DESTDIR)$(sysconfdir)/sarg.conf; then \
116 echo "cp $(DESTDIR)$(sysconfdir)/sarg.conf"; \
117 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf; \
118 else \
119 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf.default; \
120 fi
121 cp ./exclude_codes $(DESTDIR)$(sysconfdir);
122 cp ./user_limit_block $(DESTDIR)$(sysconfdir);
123 cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
124 -@if test -n "$(FONTDIR)" ; then \
125 if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
126 echo "Creating $(DESTDIR)$(FONTDIR)"; \
127 mkdir -p "$(DESTDIR)$(FONTDIR)"; \
128 fi; \
129 cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
130 fi
131 cp -r ./css.tpl $(DESTDIR)$(sysconfdir);
132 -@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
133 cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
134 fi
135
136 uninstall: uninstall-po
137 rm -f $(DESTDIR)$(bindir)/sarg
138 rm -f $(DESTDIR)$(man1dir)/sarg.1
139
140 TAGS: $(SRCS)
141 etags $(SRCS)
142
143 clean: clean-po
144 rm -f sarg *.o core
145
146 mostlyclean: clean
147
148 distclean: clean
149 rm -f Makefile config.status config.cache config.log
150
151 realclean: distclean
152 rm -f TAGS
153
154 install-po:
155 $(MAKE) -C po install
156
157 uninstall-po:
158 $(MAKE) -C po uninstall
159
160 clean-po:
161 $(MAKE) -C po clean
162
163 update-po:
164 $(MAKE) -C po update-po
165
166 po-from-tp:
167 @echo "Fetching latest po files from translationprojetc.org"
168 rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po