"Fossies" - the Fresh Open Source Software Archive

Member "vnstat-2.9/Makefile.am" (3 Jan 2022, 5981 Bytes) of package /linux/misc/vnstat-2.9.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile.am": 2.8_vs_2.9.

    1 SUBDIRS = .
    2 AM_CFLAGS = @CFLAG_EXTRAS@
    3 
    4 dist_man_MANS = man/vnstat.1 man/vnstat.conf.5 man/vnstatd.8 man/vnstati.1
    5 
    6 EXTRA_DIST = cfg examples UPGRADE CHANGES FAQ INSTALL_BSD UNINSTALL
    7 
    8 bin_PROGRAMS = vnstat
    9 sbin_PROGRAMS = vnstatd
   10 if HAVE_LIBGD
   11 bin_PROGRAMS += vnstati
   12 endif
   13 vnstati_LDADD = @IMAGELIBS@
   14 
   15 vnstat_SOURCES = src/vnstat.c \
   16   src/vnstat_func.c src/vnstat_func.h \
   17   src/ifinfo.c src/ifinfo.h \
   18   src/iflist.c src/iflist.h \
   19   src/dbsql.c src/dbsql.h \
   20   src/dbxml.c src/dbxml.h \
   21   src/dbjson.c src/dbjson.h \
   22   src/dbshow.c src/dbshow.h \
   23   src/common.c src/common.h \
   24   src/misc.c src/misc.h \
   25   src/cfg.c src/cfg.h \
   26   src/cfgoutput.c src/cfgoutput.h \
   27   src/ibw.c src/ibw.h \
   28   src/fs.c src/fs.h \
   29   src/id.c src/id.h \
   30   src/traffic.c src/traffic.h
   31 
   32 vnstatd_SOURCES = src/vnstatd.c src/vnstatd.h \
   33   src/ifinfo.c src/ifinfo.h \
   34   src/iflist.c src/iflist.h \
   35   src/dbsql.c src/dbsql.h \
   36   src/dbaccess.c src/dbaccess.h \
   37   src/datacache.c src/datacache.h \
   38   src/common.c src/common.h \
   39   src/misc.c src/misc.h \
   40   src/cfg.c src/cfg.h \
   41   src/ibw.c src/ibw.h \
   42   src/fs.c src/fs.h \
   43   src/id.c src/id.h \
   44   src/daemon.c src/daemon.h
   45 
   46 vnstati_SOURCES = src/vnstati.c src/vnstati.h \
   47   src/iflist.c src/iflist.h \
   48   src/image.c src/image.h \
   49   src/image_support.c src/image_support.h \
   50   src/dbsql.c src/dbsql.h \
   51   src/common.c src/common.h \
   52   src/misc.c src/misc.h \
   53   src/fs.c src/fs.h \
   54   src/id.c src/id.h \
   55   src/cfg.c src/cfg.h
   56 
   57 if HAVE_CHECK
   58 TESTS = check_vnstat
   59 check_PROGRAMS = check_vnstat
   60 check_vnstat_CFLAGS = @CFLAG_EXTRAS@ @CHECK_CFLAGS@ \
   61   -DPROCNETDEV=\"testdir/proc/dev\" \
   62   -DSYSCLASSNET=\"testdir/sysclassnet\" \
   63   -DCFGFILE=\"tests/vnstat.conf\" \
   64   -DCHECK_VNSTAT \
   65   -I$(top_srcdir)/src
   66 check_vnstat_LDADD = @CHECK_LIBS@
   67 EXTRA_check_vnstat_DEPENDENCIES = tests/vnstat.conf
   68 
   69 check_vnstat_SOURCES = tests/vnstat_tests.c tests/vnstat_tests.h \
   70   tests/common_tests.c tests/common_tests.h \
   71   tests/database_tests.c tests/database_tests.h \
   72   tests/dbsql_tests.c tests/dbsql_tests.h \
   73   tests/datacache_tests.c tests/datacache_tests.h \
   74   tests/config_tests.c tests/config_tests.h \
   75   tests/ifinfo_tests.c tests/ifinfo_tests.h \
   76   tests/misc_tests.c tests/misc_tests.h \
   77   tests/fs_tests.c tests/fs_tests.h \
   78   tests/id_tests.c tests/id_tests.h \
   79   tests/iflist_tests.c tests/iflist_tests.h \
   80   tests/cli_tests.c tests/cli_tests.h \
   81   tests/parseargs_tests.c tests/parseargs_tests.h \
   82   tests/daemon_tests.c tests/daemon_tests.h
   83 
   84 check_vnstat_SOURCES += src/cfg.c src/cfg.h \
   85   src/cfgoutput.c src/cfgoutput.h \
   86   src/common.c src/common.h \
   87   src/daemon.c src/daemon.h \
   88   src/dbsql.c src/dbsql.h \
   89   src/dbaccess.c src/dbaccess.h \
   90   src/datacache.c src/datacache.h \
   91   src/dbshow.c src/dbshow.h \
   92   src/dbjson.c src/dbjson.h \
   93   src/dbxml.c src/dbxml.h \
   94   src/ibw.c src/ibw.h \
   95   src/ifinfo.c src/ifinfo.h \
   96   src/iflist.c src/iflist.h \
   97   src/misc.c src/misc.h \
   98   src/fs.c src/fs.h \
   99   src/id.c src/id.h \
  100   src/vnstat_func.c src/vnstat_func.h \
  101   src/traffic.c src/traffic.h
  102 
  103 if HAVE_LIBGD
  104 check_vnstat_CFLAGS += -DHAVE_IMAGE
  105 check_vnstat_LDADD += @IMAGELIBS@
  106 check_vnstat_SOURCES += tests/image_tests.c tests/image_tests.h \
  107   src/image.c src/image.h \
  108   src/image_support.c src/image_support.h
  109 endif
  110 endif
  111 
  112 INSTALL:
  113 	cp -a INSTALL.md INSTALL
  114 
  115 INSTALL_BSD:
  116 	cp -a INSTALL_BSD.md INSTALL_BSD
  117 
  118 UPGRADE:
  119 	cp -a UPGRADE.md UPGRADE
  120 
  121 UNINSTALL:
  122 	cp -a UNINSTALL.md UNINSTALL
  123 
  124 setdebug:
  125 	CFLAGS='-Wall -Wextra -g' ./configure
  126 
  127 profile:
  128 	CFLAGS='-Wall -Wextra -g -fprofile-arcs -ftest-coverage' LDLIBS='-fprofile-arcs -ftest-coverage' ./configure
  129 	make check
  130 	lcov -c -d $(PWD) -o coverage.lcov
  131 	genhtml coverage.lcov --num-spaces 4 -p $(PWD) -o coverage
  132 
  133 myclean: maintainer-clean
  134 
  135 mancheck:
  136 	@echo "Testing man pages for errors and warnings"
  137 	@for m in $(dist_man_MANS); do \
  138 	echo " * $$m"; \
  139 	LC_ALL=en_US.UTF-8 MANROFFSEQ='' MANWIDTH=80 man --warnings -E UTF-8 -l -Tutf8 -Z $(srcdir)/$$m >/dev/null; \
  140 	done
  141 
  142 release: distcheck
  143 	tar zxf $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
  144 	rm -f $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
  145 	fakeroot tar zcf $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz $(PACKAGE_NAME)-$(PACKAGE_VERSION)
  146 	rm -fr $(PACKAGE_NAME)-$(PACKAGE_VERSION)
  147 	ls -l $(PACKAGE_NAME)-$(PACKAGE_VERSION).tar.gz
  148 
  149 install-data-hook: install-exec
  150 	if [ -f $(DESTDIR)$(man1dir)/vnstatd.1 ]; then rm -f $(DESTDIR)$(man1dir)/vnstatd.1; fi
  151 	$(MKDIR_P) $(DESTDIR)$(sysconfdir)
  152 if IS_CROSSCOMPILED
  153 	if [ ! -f $(DESTDIR)$(sysconfdir)/vnstat.conf ]; \
  154 	then cp -fv $(srcdir)/cfg/vnstat.conf $(DESTDIR)$(sysconfdir)/vnstat.conf; \
  155 	fi
  156 else
  157 	$(DESTDIR)$(bindir)/vnstat$(EXEEXT) --showconfig >vnstat.conf.new
  158 	if [ -f $(DESTDIR)$(sysconfdir)/vnstat.conf ]; \
  159 	then cp -fv $(DESTDIR)$(sysconfdir)/vnstat.conf vnstat.conf.old; \
  160 	fi
  161 	cp -fv vnstat.conf.new $(DESTDIR)$(sysconfdir)/vnstat.conf
  162 endif
  163 	@echo
  164 	@echo "============================================================================"
  165 	@echo "  Note: No service file has been installed for starting the daemon"
  166 	@echo "        automatically. Such setup will need to be created manually"
  167 	@echo "        depending on the used environment. See the included documentation."
  168 	@echo "============================================================================"
  169 	@echo
  170 
  171 uninstall-hook:
  172 	-rm -f $(DESTDIR)$(sysconfdir)/vnstat.conf
  173 	-rmdir $(DESTDIR)$(sysconfdir)
  174 	@echo
  175 	@echo "=================================================================="
  176 	@echo "  Note: The database directory has been left untouched."
  177 	@echo "        It will need to be removed manually if no longer needed."
  178 	@echo "=================================================================="
  179 	@echo
  180 
  181 clean-local:
  182 	-rm -fr coverage *.lcov *.gz test*.log test*.xml src/*.gc* tests/*.gc* tests/*.conf *.old *.new *check.png INSTALL INSTALL_BSD UPGRADE UNINSTALL
  183 
  184 check-local: check-TESTS
  185 	tail -n 2 test.log
  186 
  187 tests/vnstat.conf: $(top_srcdir)/cfg/vnstat.conf
  188 	sed 's/^;//g' $(top_srcdir)/cfg/vnstat.conf >$@
  189 	echo "MaxBWethnone 8" >>$@