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@
32 INSTALL_PROGRAM
= $(INSTALL
)
34 SRCS
= util.c log.c report.c topuser.c email.c
sort.c html.c \
35 index.c getconf.c usage.c decomp.c ip2name.c \
36 useragent.c exclude.c convlog.c totday.c repday.c datafile.c\
37 indexonly.c splitlog.c lastlog.c topsites.c siteuser.c css.c \
38 smartfilter.c denied.c authfail.c charset.c \
39 squidguard_log.c squidguard_report.c auth.c download.c grepday.c \
40 dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
41 usertab.c userinfo.c longline.c
43 OBJS
= $(patsubst %.c
,%.o
,$(SRCS
))
45 DISTFILES
= $(SRCS
) ABOUT-NLS
48 .PHONY
: all install clean uninstall mostlyclean distclean update-po doc
$(SUBDIRS
)
53 $(CC
) -c
-I.
$(CPPFLAGS
) $(DEFS
) $(CFLAGS
) $<
55 *.o
: include/conf.h
include/info.h
include/defs.h
58 $(CC
) $(LDFLAGS
) $(OBJS
) -o
$@
$(LIBS
) $(LIBCRYPT
)
63 doc
: sarg
.1 sarg_manpage.html
65 sarg
.1: sarg_manpage.xml
66 echo
"Making manual page"
67 xmllint
--nonet
--valid
--noout
$<
68 xsltproc
--stringparam man.output.encoding latin1
--nonet
/usr
/share
/sgml
/docbook
/xsl-stylesheets
/manpages
/docbook.xsl
$<
71 sarg_manpage.html
: sarg_manpage.xml
72 echo
"Making html manual page"
73 xmllint
--nonet
--valid
--noout
$<
74 xsltproc
--stringparam use.id.
as.filename
1 --stringparam root.filename sarg_manpage
--nonet
/usr
/share
/sgml
/docbook
/xsl-stylesheets
/html
/onechunk.xsl
$<
76 install: all install-po
77 -@if
test ! -d
$(DESTDIR
)$(bindir); then \
78 echo
"creating $(DESTDIR)$(bindir)"; \
79 mkdir
-p
$(DESTDIR
)$(bindir); \
81 -@if
test ! -d
$(DESTDIR
)$(man1dir); then \
82 echo
"creating $(DESTDIR)$(man1dir)"; \
83 mkdir
-p
$(DESTDIR
)$(man1dir); \
85 -@if
test ! -d
$(DESTDIR
)$(sysconfdir
); then \
86 echo
"creating $(DESTDIR)$(sysconfdir)"; \
87 mkdir
-p
$(DESTDIR
)$(sysconfdir
); \
89 -@if
test ! -d
$(DESTDIR
)$(IMAGEDIR
); then \
90 echo
"Creating $(DESTDIR)$(IMAGEDIR)"; \
91 mkdir
-p
$(DESTDIR
)$(IMAGEDIR
); \
93 $(INSTALL_PROGRAM
) sarg
$(DESTDIR
)$(bindir)/sarg
94 chmod
755 $(DESTDIR
)$(bindir)/sarg
95 $(INSTALL_PROGRAM
) sarg
.1 $(DESTDIR
)$(man1dir)/sarg
.1
96 chmod
755 $(DESTDIR
)$(man1dir)/sarg
.1
97 @if
test ! -f
$(DESTDIR
)$(sysconfdir
)/sarg.conf
; then \
98 echo
"cp $(DESTDIR)$(sysconfdir)/sarg.conf"; \
99 cp sarg.conf
$(DESTDIR
)$(sysconfdir
)/sarg.conf
; \
101 cp sarg.conf
$(DESTDIR
)$(sysconfdir
)/sarg.conf.default
; \
103 cp .
/exclude_codes
$(DESTDIR
)$(sysconfdir
);
104 cp .
/user_limit_block
$(DESTDIR
)$(sysconfdir
);
105 cp
-r .
/images
/* $(DESTDIR
)$(IMAGEDIR
);
106 -@if
test -n
"$(FONTDIR)" ; then \
107 if
test ! -d
"$(DESTDIR)$(FONTDIR)" ; then \
108 echo
"Creating $(DESTDIR)$(FONTDIR)"; \
109 mkdir
-p
"$(DESTDIR)$(FONTDIR)"; \
111 cp
-r .
/fonts
/* "$(DESTDIR)$(FONTDIR)"; \
113 cp
-r .
/css.tpl
$(DESTDIR
)$(sysconfdir
);
114 -@if
test -n
"$(SARGPHPDIR)" -a
-d
"$(DESTDIR)$(SARGPHPDIR)"; then \
115 cp
-r .
/sarg-php
$(DESTDIR
)$(SARGPHPDIR
); \
118 uninstall: uninstall-po
119 rm -f
$(DESTDIR
)$(bindir)/sarg
120 rm -f
$(DESTDIR
)$(man1dir)/sarg
.1
131 rm -f Makefile config.status config.cache config.log
137 $(MAKE
) -C po
install
140 $(MAKE
) -C po
uninstall
146 $(MAKE
) -C po update-po
149 @echo
"Fetching latest po files from translationprojetc.org"
150 rsync
-Lrtvz
-u translationproject.org
::tp
/latest
/sarg
/ po