4 datarootdir
=@datarootdir@
6 exec_prefix=@
exec_prefix@
7 PACKAGE_TARNAME
=@PACKAGE_TARNAME@
12 SYSCONFDIR
= @sysconfdir@
13 SARGPHPDIR
= @SARGPHPDIR@
16 IBINDIR
= -DBINDIR
=\"@
bindir@
\"
17 ISYSCONFDIR
= -DSYSCONFDIR
=\"@sysconfdir@
\"
18 ISARGPHPDIR
= -DSARGPHPDIR
=\"@SARGPHPDIR@
\"
19 IFONTDIR
= -DFONTDIR
=\"@FONTDIR@
\"
20 IIMAGEDIR
= -DIMAGEDIR
=\"@IMAGEDIR@
\"
21 ILOCALEDIR
= -DLOCALEDIR
=\"@localedir@
\"
25 DEFS
= $(IBINDIR
) $(ISYSCONFDIR
) $(IFONTDIR
) $(IIMAGEDIR
) $(ISARGPHPDIR
) $(ILOCALEDIR
) @DEFS@
31 INSTALL_PROGRAM
= $(INSTALL
)
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
42 OBJS
= $(patsubst %.c
,%.o
,$(SRCS
))
44 DISTFILES
= $(SRCS
) ABOUT-NLS
47 .PHONY
: all install clean uninstall mostlyclean distclean update-po doc
$(SUBDIRS
)
52 $(CC
) -c
-I.
$(CPPFLAGS
) $(DEFS
) $(CFLAGS
) $<
54 *.o
: include/conf.h
include/info.h
include/defs.h
57 $(CC
) $(LDFLAGS
) $(OBJS
) -o
$@
$(LIBS
) $(LIBCRYPT
)
62 doc
: sarg
.1 sarg_manpage.html
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
$<
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
$<
75 install: all install-po
76 -@if
test ! -d
$(DESTDIR
)$(BINDIR
); then \
77 echo
"creating $(DESTDIR)$(BINDIR)"; \
78 mkdir
-p
$(DESTDIR
)$(BINDIR
); \
80 -@if
test ! -d
$(DESTDIR
)$(MANDIR
); then \
81 echo
"creating $(DESTDIR)$(MANDIR)"; \
82 mkdir
-p
$(DESTDIR
)$(MANDIR
); \
84 -@if
test ! -d
$(DESTDIR
)$(SYSCONFDIR
); then \
85 echo
"creating $(DESTDIR)$(SYSCONFDIR)"; \
86 mkdir
-p
$(DESTDIR
)$(SYSCONFDIR
); \
88 -@if
test ! -d
$(DESTDIR
)$(IMAGEDIR
); then \
89 echo
"Creating $(DESTDIR)$(IMAGEDIR)"; \
90 mkdir
-p
$(DESTDIR
)$(IMAGEDIR
); \
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
; \
100 cp sarg.conf
$(DESTDIR
)$(SYSCONFDIR
)/sarg.conf.default
; \
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)"; \
110 cp
-r .
/fonts
/* "$(DESTDIR)$(FONTDIR)"; \
112 cp
-r .
/css.tpl
$(DESTDIR
)$(SYSCONFDIR
);
113 -@if
test -n
"$(SARGPHPDIR)" -a
-d
"$(DESTDIR)$(SARGPHPDIR)"; then \
114 cp
-r .
/sarg-php
$(DESTDIR
)$(SARGPHPDIR
); \
117 uninstall: uninstall-po
118 rm -f
$(DESTDIR
)$(BINDIR
)/sarg
119 rm -f
$(DESTDIR
)$(MANDIR
)/sarg
.1
130 rm -f Makefile config.status config.cache config.log
136 $(MAKE
) -C po
install
139 $(MAKE
) -C po
uninstall
145 $(MAKE
) -C po update-po
148 @echo
"Fetching latest po files from translationprojetc.org"
149 rsync
-Lrtvz
-u translationproject.org
::tp
/latest
/sarg
/ po