PACKAGE_TARNAME=@PACKAGE_TARNAME@
docdir = @docdir@
CC = @CC@
-BINDIR = @bindir@
-MANDIR = @mandir@
-MAN1DIR = $(MANDIR)/man1
-SYSCONFDIR = @sysconfdir@
+bindir = @bindir@
+mandir = @mandir@
+man1dir = $(mandir)/man1
+sysconfdir = @sysconfdir@
SARGPHPDIR = @SARGPHPDIR@
FONTDIR = @FONTDIR@
IMAGEDIR = @IMAGEDIR@
xsltproc --stringparam use.id.as.filename 1 --stringparam root.filename sarg_manpage --nonet /usr/share/sgml/docbook/xsl-stylesheets/html/onechunk.xsl $<
install: all install-po
- -@if test ! -d $(DESTDIR)$(BINDIR); then \
- echo "creating $(DESTDIR)$(BINDIR)"; \
- mkdir -p $(DESTDIR)$(BINDIR); \
+ -@if test ! -d $(DESTDIR)$(bindir); then \
+ echo "creating $(DESTDIR)$(bindir)"; \
+ mkdir -p $(DESTDIR)$(bindir); \
fi
- -@if test ! -d $(DESTDIR)$(MAN1DIR); then \
- echo "creating $(DESTDIR)$(MAN1DIR)"; \
- mkdir -p $(DESTDIR)$(MAN1DIR); \
+ -@if test ! -d $(DESTDIR)$(man1dir); then \
+ echo "creating $(DESTDIR)$(man1dir)"; \
+ mkdir -p $(DESTDIR)$(man1dir); \
fi
- -@if test ! -d $(DESTDIR)$(SYSCONFDIR); then \
- echo "creating $(DESTDIR)$(SYSCONFDIR)"; \
- mkdir -p $(DESTDIR)$(SYSCONFDIR); \
+ -@if test ! -d $(DESTDIR)$(sysconfdir); then \
+ echo "creating $(DESTDIR)$(sysconfdir)"; \
+ mkdir -p $(DESTDIR)$(sysconfdir); \
fi
-@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
mkdir -p $(DESTDIR)$(IMAGEDIR); \
fi
- $(INSTALL_PROGRAM) sarg $(DESTDIR)$(BINDIR)/sarg
- chmod 755 $(DESTDIR)$(BINDIR)/sarg
- $(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(MAN1DIR)/sarg.1
- chmod 755 $(DESTDIR)$(MAN1DIR)/sarg.1
- @if test ! -f $(DESTDIR)$(SYSCONFDIR)/sarg.conf; then \
- echo "cp $(DESTDIR)$(SYSCONFDIR)/sarg.conf"; \
- cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf; \
+ $(INSTALL_PROGRAM) sarg $(DESTDIR)$(bindir)/sarg
+ chmod 755 $(DESTDIR)$(bindir)/sarg
+ $(INSTALL_PROGRAM) sarg.1 $(DESTDIR)$(man1dir)/sarg.1
+ chmod 755 $(DESTDIR)$(man1dir)/sarg.1
+ @if test ! -f $(DESTDIR)$(sysconfdir)/sarg.conf; then \
+ echo "cp $(DESTDIR)$(sysconfdir)/sarg.conf"; \
+ cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf; \
else \
- cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf.default; \
+ cp sarg.conf $(DESTDIR)$(sysconfdir)/sarg.conf.default; \
fi
- cp ./exclude_codes $(DESTDIR)$(SYSCONFDIR);
- cp ./user_limit_block $(DESTDIR)$(SYSCONFDIR);
+ cp ./exclude_codes $(DESTDIR)$(sysconfdir);
+ cp ./user_limit_block $(DESTDIR)$(sysconfdir);
cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
-@if test -n "$(FONTDIR)" ; then \
if test ! -d "$(DESTDIR)$(FONTDIR)" ; then \
fi; \
cp -r ./fonts/* "$(DESTDIR)$(FONTDIR)"; \
fi
- cp -r ./css.tpl $(DESTDIR)$(SYSCONFDIR);
+ cp -r ./css.tpl $(DESTDIR)$(sysconfdir);
-@if test -n "$(SARGPHPDIR)" -a -d "$(DESTDIR)$(SARGPHPDIR)"; then \
cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
fi
uninstall: uninstall-po
- rm -f $(DESTDIR)$(BINDIR)/sarg
- rm -f $(DESTDIR)$(MAN1DIR)/sarg.1
+ rm -f $(DESTDIR)$(bindir)/sarg
+ rm -f $(DESTDIR)$(man1dir)/sarg.1
TAGS: $(SRCS)
etags $(SRCS)