4 datarootdir
=@datarootdir@
6 exec_prefix=@
exec_prefix@
7 PACKAGE_TARNAME
=@PACKAGE_TARNAME@
12 man1dir = $(mandir)/man1
13 sysconfdir
= @sysconfdir@
14 SARGPHPDIR
= @SARGPHPDIR@
17 IBINDIR
= -DBINDIR
=\"@
bindir@
\"
18 ISYSCONFDIR
= -DSYSCONFDIR
=\"@sysconfdir@
\"
19 ISARGPHPDIR
= -DSARGPHPDIR
=\"@SARGPHPDIR@
\"
20 IFONTDIR
= -DFONTDIR
=\"@FONTDIR@
\"
21 IIMAGEDIR
= -DIMAGEDIR
=\"@IMAGEDIR@
\"
22 ILOCALEDIR
= -DLOCALEDIR
=\"@localedir@
\"
26 DEFS
= $(IBINDIR
) $(ISYSCONFDIR
) $(IFONTDIR
) $(IIMAGEDIR
) $(ISARGPHPDIR
) $(ILOCALEDIR
) @DEFS@
31 XSL_MAN_STYLESHEET
=@XSL_MAN_STYLESHEET@
32 XSL_HTML_STYLESHEET
=@XSL_HTML_STYLESHEET@
34 INSTALL_PROGRAM
= $(INSTALL
)
36 SRCS
= util.c log.c report.c topuser.c email.c
sort.c html.c \
37 index.c getconf.c usage.c decomp.c ip2name.c ip2name_dns.c \
38 useragent.c exclude.c convlog.c totday.c repday.c datafile.c\
39 indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \
40 smartfilter.c denied.c authfail.c charset.c dichotomic.c \
41 redirector.c auth.c download.c grepday.c ip2name_exec.c \
42 dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
43 usertab.c userinfo.c longline.c url.c
47 DISTFILES
= $(SRCS
) ABOUT-NLS
50 .PHONY
: all install clean uninstall mostlyclean distclean update-po doc
$(SUBDIRS
)
55 $(CC
) -c
-I.
$(CPPFLAGS
) $(DEFS
) $(CFLAGS
) $<
57 *.o
: include/conf.h
include/info.h
include/defs.h
60 $(CC
) $(LDFLAGS
) $(OBJS
) -o
$@
$(LIBS
) $(LIBCRYPT
)
65 doc
: sarg
.1 sarg_manpage.html
67 sarg
.1: sarg_manpage.xml
68 echo
"Making manual page"
69 xmllint
--nonet
--valid
--noout
$<
70 xsltproc
--stringparam man.output.encoding latin1
--nonet
"$(XSL_MAN_STYLESHEET)" $<
73 sarg_manpage.html
: sarg_manpage.xml
74 echo
"Making html manual page"
75 xmllint
--nonet
--valid
--noout
$<
76 xsltproc
--stringparam use.id.
as.filename
1 --stringparam root.filename sarg_manpage
--nonet
"$(XSL_HTML_STYLESHEET)" $<
78 install: all install-po
79 -@if
test ! -d
$(DESTDIR
)$(bindir); then \
80 echo
"creating $(DESTDIR)$(bindir)"; \
81 mkdir
-p
$(DESTDIR
)$(bindir); \
83 -@if
test ! -d
$(DESTDIR
)$(man1dir); then \
84 echo
"creating $(DESTDIR)$(man1dir)"; \
85 mkdir
-p
$(DESTDIR
)$(man1dir); \
87 -@if
test ! -d
$(DESTDIR
)$(sysconfdir
); then \
88 echo
"creating $(DESTDIR)$(sysconfdir)"; \
89 mkdir
-p
$(DESTDIR
)$(sysconfdir
); \
91 -@if
test ! -d
$(DESTDIR
)$(IMAGEDIR
); then \
92 echo
"Creating $(DESTDIR)$(IMAGEDIR)"; \
93 mkdir
-p
$(DESTDIR
)$(IMAGEDIR
); \
95 $(INSTALL_PROGRAM
) sarg
$(DESTDIR
)$(bindir)/sarg
96 chmod
755 $(DESTDIR
)$(bindir)/sarg
97 $(INSTALL_PROGRAM
) sarg
.1 $(DESTDIR
)$(man1dir)/sarg
.1
98 chmod
755 $(DESTDIR
)$(man1dir)/sarg
.1
99 @if
test ! -f
$(DESTDIR
)$(sysconfdir
)/sarg.conf
; then \
100 echo
"cp $(DESTDIR)$(sysconfdir)/sarg.conf"; \
101 cp sarg.conf
$(DESTDIR
)$(sysconfdir
)/sarg.conf
; \
103 cp sarg.conf
$(DESTDIR
)$(sysconfdir
)/sarg.conf.default
; \
105 cp .
/exclude_codes
$(DESTDIR
)$(sysconfdir
);
106 cp .
/user_limit_block
$(DESTDIR
)$(sysconfdir
);
107 cp
-r .
/images
/* $(DESTDIR
)$(IMAGEDIR
);
108 -@if
test -n
"$(FONTDIR)" ; then \
109 if
test ! -d
"$(DESTDIR)$(FONTDIR)" ; then \
110 echo
"Creating $(DESTDIR)$(FONTDIR)"; \
111 mkdir
-p
"$(DESTDIR)$(FONTDIR)"; \
113 cp
-r .
/fonts
/* "$(DESTDIR)$(FONTDIR)"; \
115 cp
-r .
/css.tpl
$(DESTDIR
)$(sysconfdir
);
116 -@if
test -n
"$(SARGPHPDIR)" -a
-d
"$(DESTDIR)$(SARGPHPDIR)"; then \
117 cp
-r .
/sarg-php
$(DESTDIR
)$(SARGPHPDIR
); \
120 uninstall: uninstall-po
121 rm -f
$(DESTDIR
)$(bindir)/sarg
122 rm -f
$(DESTDIR
)$(man1dir)/sarg
.1
133 rm -f Makefile config.status config.cache config.log
139 cd po
; $(MAKE
) install
142 cd po
; $(MAKE
) uninstall
145 cd po
; $(MAKE
) clean
148 cd po
; $(MAKE
) update-po
151 @echo
"Fetching latest po files from translationprojetc.org"
152 rsync
-Lrtvz
-u translationproject.org
::tp
/latest
/sarg
/ po