datarootdir=@datarootdir@
datadir=@datadir@
exec_prefix=@exec_prefix@
+localedir = $(datadir)/locale
PACKAGE_TARNAME=@PACKAGE_TARNAME@
docdir = @docdir@
CC = @CC@
MANDIR = @mandir@
SYSCONFDIR = @sysconfdir@
SARGPHPDIR = @SARGPHPDIR@
-LANGDIR = @LANGDIR@
FONTDIR = @FONTDIR@
IMAGEDIR = @IMAGEDIR@
-LOCALEDIR = $(datadir)/locale
IBINDIR = -DBINDIR=\"@bindir@\"
ISYSCONFDIR = -DSYSCONFDIR=\"@sysconfdir@\"
ISARGPHPDIR = -DSARGPHPDIR=\"@SARGPHPDIR@\"
-ILANGDIR = -DLANGDIR=\"@LANGDIR@\"
IFONTDIR = -DFONTDIR=\"@FONTDIR@\"
IIMAGEDIR = -DIMAGEDIR=\"@IMAGEDIR@\"
ILOCALEDIR = -DLOCALEDIR=\"$(localedir)\"
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
LDFLAGS = @LDFLAGS@
-DEFS = $(IBINDIR) $(ISYSCONFDIR) $(ILANGDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
+DEFS = $(IBINDIR) $(ISYSCONFDIR) $(IFONTDIR) $(IIMAGEDIR) $(ISARGPHPDIR) $(ILOCALEDIR) @DEFS@
LIBS = @LIBS@
SRCDIR = .
VPATH = .
DISTFILES = $(SRCS) ABOUT-NLS
SUBDIRS = po
-.PHONY: install clean uninstall mostlyclean distclean $(SUBDIRS)
+.PHONY: all install clean uninstall mostlyclean distclean update-po $(SUBDIRS)
all: sarg
$(SUBDIRS):
$(MAKE) -C $@
-install: all po
+install: all install-po
-@if test ! -d $(DESTDIR)$(BINDIR); then \
echo "creating $(DESTDIR)$(BINDIR)"; \
mkdir -p $(DESTDIR)$(BINDIR); \
echo "creating $(DESTDIR)$(SYSCONFDIR)"; \
mkdir -p $(DESTDIR)$(SYSCONFDIR); \
fi
- -@if test ! -d $(DESTDIR)$(LANGDIR); then \
- echo "Creating $(DESTDIR)$(LANGDIR)"; \
- mkdir -p $(DESTDIR)$(LANGDIR); \
- fi
-@if test ! -d $(DESTDIR)$(IMAGEDIR); then \
echo "Creating $(DESTDIR)$(IMAGEDIR)"; \
mkdir -p $(DESTDIR)$(IMAGEDIR); \
else \
cp sarg.conf $(DESTDIR)$(SYSCONFDIR)/sarg.conf.default; \
fi
- cp -r ./languages/* $(DESTDIR)$(LANGDIR);
cp ./exclude_codes $(DESTDIR)$(SYSCONFDIR);
cp ./user_limit_block $(DESTDIR)$(SYSCONFDIR);
cp -r ./images/* $(DESTDIR)$(IMAGEDIR);
cp -r ./sarg-php $(DESTDIR)$(SARGPHPDIR); \
fi
-uninstall: po
+uninstall: uninstall-po
rm -f $(DESTDIR)$(BINDIR)/sarg
rm -f $(DESTDIR)$(MANDIR)/sarg.1
TAGS: $(SRCS)
etags $(SRCS)
-clean: po
+clean: clean-po
rm -f sarg *.o core
mostlyclean: clean
realclean: distclean
rm -f TAGS
+install-po:
+ $(MAKE) -C po install
+
+uninstall-po:
+ $(MAKE) -C po uninstall
+
+clean-po:
+ $(MAKE) -C po clean
+
update-po:
$(MAKE) -C po update-po
AC_SUBST(SARGPHPDIR)
fi
-dnl Select languages dir
-AC_ARG_ENABLE(languagedir,
-[ --enable-languagedir=languagedir
- Select languagedir as the directory with the translations of sarg ],
-[
- if test "$enableval"; then
- LANGDIR=$enableval
- fi
-],[LANGDIR="${datarootdir}/sarg/languages"])
-if test "x$prefix" == "xNONE" ; then
- tempfullpath=`prefix=$ac_default_prefix ; eval "echo $LANGDIR"`
-else
- tempfullpath=`eval "echo $LANGDIR"`
-fi
-echo "using $tempfullpath as the directory of the translations"
-AC_SUBST(LANGDIR)
-
dnl Select fonts dir
AC_ARG_ENABLE(fontdir,
[ --enable-fontdir=fontdir