]> git.ipfire.org Git - thirdparty/sarg.git/blame - Makefile.in
Generate the manpage from a docbook document
[thirdparty/sarg.git] / Makefile.in
CommitLineData
25697a35
GS
1# Makefile.in for sarg
2
2357ef77
FM
3prefix=@prefix@
4datarootdir=@datarootdir@
5datadir=@datadir@
6exec_prefix=@exec_prefix@
7PACKAGE_TARNAME=@PACKAGE_TARNAME@
c0ec9cc7
FM
8docdir = @docdir@
9CC = @CC@
10BINDIR = @bindir@
11MANDIR = @mandir@
12SYSCONFDIR = @sysconfdir@
13SARGPHPDIR = @SARGPHPDIR@
c0ec9cc7
FM
14FONTDIR = @FONTDIR@
15IMAGEDIR = @IMAGEDIR@
c0ec9cc7
FM
16IBINDIR = -DBINDIR=\"@bindir@\"
17ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\"
18ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\"
c0ec9cc7
FM
19IFONTDIR = -DFONTDIR=\"@FONTDIR@\"
20IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\"
d49c75f3 21ILOCALEDIR = -DLOCALEDIR=\"@localedir@\"
c0ec9cc7
FM
22CFLAGS = @CFLAGS@
23CPPFLAGS = @CPPFLAGS@
24LDFLAGS = @LDFLAGS@
308a21d4 25DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
c0ec9cc7
FM
26LIBS = @LIBS@
27SRCDIR = .
28VPATH = .
29INSTALL = cp
25697a35
GS
30
31INSTALL_PROGRAM = $(INSTALL)
32
33SRCS = 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 \
556e73cc 37 smartfilter.c denied.c authfail.c charset.c \
25697a35 38 squidguard_log.c squidguard_report.c auth.c download.c grepday.c \
f2ec8c75 39 dansguardian_log.c dansguardian_report.c realtime.c btree_cache.c \
4ca814cc 40 usertab.c userinfo.c longline.c
f2ec8c75 41
556e73cc 42OBJS = $(patsubst %.c,%.o,$(SRCS))
25697a35 43
3becf85c
FM
44DISTFILES = $(SRCS) ABOUT-NLS
45
46SUBDIRS = po
84a17075 47.PHONY: all install clean uninstall mostlyclean distclean update-po doc $(SUBDIRS)
25697a35 48
84a17075 49all: sarg sarg.1
25697a35
GS
50
51.c.o:
c0ec9cc7 52 $(CC) -c -I. $(CPPFLAGS) $(DEFS) $(CFLAGS) $<
25697a35 53
d6dabf47
FM
54*.o: include/conf.h include/info.h include/defs.h
55
25697a35 56sarg: $(OBJS)
1b42c442 57 $(CC) $(LDFLAGS) $(OBJS) -o $@ $(LIBS) $(LIBCRYPT)
25697a35 58
3becf85c
FM
59$(SUBDIRS):
60 $(MAKE) -C $@
61
84a17075
FM
62doc: sarg.1 sarg_manpage.html
63
64sarg.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 $<
68# docbook2man.pl $<
69
70sarg_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 $<
74
308a21d4 75install: all install-po
f251e023
FM
76 -@if test ! -d $(DESTDIR)$(BINDIR); then \
77 echo "creating $(DESTDIR)$(BINDIR)"; \
78 mkdir -p $(DESTDIR)$(BINDIR); \
25697a35 79 fi
f251e023
FM
80 -@if test ! -d $(DESTDIR)$(MANDIR); then \
81 echo "creating $(DESTDIR)$(MANDIR)"; \
82 mkdir -p $(DESTDIR)$(MANDIR); \
25697a35 83 fi
f251e023
FM
84 -@if test ! -d $(DESTDIR)$(SYSCONFDIR); then \
85 echo "creating $(DESTDIR)$(SYSCONFDIR)"; \
86 mkdir -p $(DESTDIR)$(SYSCONFDIR); \
25697a35 87 fi
f251e023
FM
88 -@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
89 echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
90 mkdir -p $(DESTDIR)$(IMAGEDIR); \
25697a35 91 fi
f251e023
FM
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; \
25697a35 99 else \
f251e023 100 cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf.default; \
25697a35 101 fi
f251e023
FM
102 cp ./exclude_codes $(DESTDIR)$(SYSCONFDIR);
103 cp ./user_limit_block $(DESTDIR)$(SYSCONFDIR);
104 cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
3becf85c
FM
105 -@if test -n "$(FONTDIR)" ; then \
106 if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
107 echo "Creating $(DESTDIR)$(FONTDIR)"; \
108 mkdir -p "$(DESTDIR)$(FONTDIR)"; \
109 fi; \
110 cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
111 fi
f251e023 112 cp -r ./css.tpl $(DESTDIR)$(SYSCONFDIR);
7bbc1de4 113 -@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
3becf85c 114 cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
25697a35
GS
115 fi
116
308a21d4 117uninstall: uninstall-po
f251e023
FM
118 rm -f $(DESTDIR)$(BINDIR)/sarg
119 rm -f $(DESTDIR)$(MANDIR)/sarg.1
25697a35
GS
120
121TAGS: $(SRCS)
122 etags $(SRCS)
123
308a21d4 124clean: clean-po
25697a35
GS
125 rm -f sarg *.o core
126
127mostlyclean: clean
128
129distclean: clean
130 rm -f Makefile config.status config.cache config.log
131
132realclean: distclean
133 rm -f TAGS
134
308a21d4
FM
135install-po:
136 $(MAKE) -C po install
137
138uninstall-po:
139 $(MAKE) -C po uninstall
140
141clean-po:
142 $(MAKE) -C po clean
143
f2ec8c75
FM
144update-po:
145 $(MAKE) -C po update-po
cea51ad6
FM
146
147po-from-tp:
148 @echo "Fetching latest po files from translationprojetc.org"
149 rsync -Lrtvz -u translationproject.org::tp/latest/sarg/ po