]> git.ipfire.org Git - thirdparty/sarg.git/blob - Makefile.in
Check the release date when archiving the project
[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@ -lm
28 SRCDIR = .
29 VPATH = .
30 INSTALL = cp
31 XSL_MAN_STYLESHEET=@XSL_MAN_STYLESHEET@
32 XSL_HTML_STYLESHEET=@XSL_HTML_STYLESHEET@
33
34 INSTALL_PROGRAM = $(INSTALL)
35
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
44
45 OBJS = $(SRCS:.c=.o)
46
47 DISTFILES = $(SRCS) ABOUT-NLS
48
49 SUBDIRS = po
50 .PHONY: all install clean uninstall mostlyclean distclean update-po doc $(SUBDIRS)
51
52 all: sarg
53
54 .c.o:
55 $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
56
57 *.o: include/conf.h include/info.h include/defs.h
58
59 sarg: $(OBJS)
60 $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
61
62 $(SUBDIRS):
63 $(MAKE) -C $@
64
65 doc: sarg.1 sarg_manpage.html
66
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)" $<
71 # docbook2man.pl $<
72
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)" $<
77
78 install: all install-po
79 -@if test ! -d $(DESTDIR)$(bindir); then \
80 echo "creating $(DESTDIR)$(bindir)"; \
81 mkdir -p $(DESTDIR)$(bindir); \
82 fi
83 -@if test ! -d $(DESTDIR)$(man1dir); then \
84 echo "creating $(DESTDIR)$(man1dir)"; \
85 mkdir -p $(DESTDIR)$(man1dir); \
86 fi
87 -@if test ! -d $(DESTDIR)$(sysconfdir); then \
88 echo "creating $(DESTDIR)$(sysconfdir)"; \
89 mkdir -p $(DESTDIR)$(sysconfdir); \
90 fi
91 -@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
92 echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
93 mkdir -p $(DESTDIR)$(IMAGEDIR); \
94 fi
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; \
102 else \
103 cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf.default; \
104 fi
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)"; \
112 fi; \
113 cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
114 fi
115 cp -r ./css.tpl $(DESTDIR)$(sysconfdir);
116 -@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
117 cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
118 fi
119
120 uninstall: uninstall-po
121 rm -f $(DESTDIR)$(bindir)/sarg
122 rm -f $(DESTDIR)$(man1dir)/sarg.1
123
124 TAGS: $(SRCS)
125 etags $(SRCS)
126
127 clean: clean-po
128 rm -f sarg *.o core
129
130 mostlyclean: clean
131
132 distclean: clean
133 rm -f Makefile config.status config.cache config.log
134
135 realclean: distclean
136 rm -f TAGS
137
138 install-po:
139 cd po ; $(MAKE) install
140
141 uninstall-po:
142 cd po ; $(MAKE) uninstall
143
144 clean-po:
145 cd po ; $(MAKE) clean
146
147 update-po:
148 cd po ; $(MAKE) update-po
149
150 po-from-tp:
151 @echo "Fetching latest po files from translationprojetc.org"
152 rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po