added module to handle log
[ppastats.git] / src / Makefile.am
index 4b42165..03bb962 100644 (file)
@@ -5,11 +5,15 @@ AM_CPPFLAGS = -Wall -std=gnu99 -Werror\
 
 LIBS += $(CURL_LIBS) $(JSON_LIBS)
 
+DEFS = -DPACKAGE_DATA_DIR=\"$(pkgdatadir)\" -DLOCALEDIR=\"$(localedir)\" @DEFS@
+
 bin_PROGRAMS = ppastats
 ppastats_SOURCES = \
        cache.h cache.c\
        html.h html.c\
+       io.h io.c\
        list.h list.c\
+       log.h log.c\
        lp.h lp.c\
        lp_json.h lp_json.c\
        lp_ws.h lp_ws.c\
@@ -19,6 +23,7 @@ ppastats_SOURCES = \
 dist_man_MANS = ppastats.1
 
 ppastats.1: main.c $(top_srcdir)/configure.ac
-       $(MAKE) $(AM_MAKEFLAGS) ppastats$(EXEEXT)
-       help2man -N --name="PPA Statistics command line tool" --output=ppastats.1 ./ppastats$(EXEEXT)
-
+       if ! test -z "$(HELP2MAN)"; then \
+        $(MAKE) $(AM_MAKEFLAGS) ppastats$(EXEEXT); \
+        help2man -N --name="PPA Statistics command line tool" --output=ppastats.1 ./ppastats$(EXEEXT); \
+       fi;