sar.o: sar.c sa.h version.h common.h rd_stats.h rd_sensors.h
-sar: sar.o act_sar.o format_sar.o sa_common.o systest.o pr_stats.o librdstats_light.a libsyscom.a
+sar: sar.o act_sar.o format_sar.o sa_common.o pr_stats.o librdstats_light.a libsyscom.a
sadf.o: sadf.c sadf.h version.h sa.h common.h rd_stats.h rd_sensors.h
cifsiostat: cifsiostat.o librdstats_light.a libsyscom.a
+tests/ini/sa_common.o: tests/ini/sa_common.c tests/ini/iniversion.h tests/ini/sa.h tests/ini/common.h tests/ini/rd_stats.h tests/ini/rd_sensors.h tests/ini/ioconf.h tests/ini/inisysconfig.h
+
+tests/ini/act_sar.o: tests/ini/activity.c tests/ini/sa.h tests/ini/common.h tests/ini/rd_stats.h tests/ini/rd_sensors.h tests/ini/pr_stats.h
+ $(CC) -o $@ -c $(CFLAGS) -DSOURCE_SAR $(DFLAGS) $<
+
+tests/ini/rd_stats_light.o: tests/ini/rd_stats.c tests/ini/common.h tests/ini/rd_stats.h tests/ini/ioconf.h tests/ini/inisysconfig.h
+ $(CC) -o $@ -c $(CFLAGS) $(DFLAGS) $<
+
+tests/ini/count_light.o: tests/ini/count.c tests/ini/common.h tests/ini/rd_stats.h
+ $(CC) -o $@ -c $(CFLAGS) $(DFLAGS) $<
+
+tests/ini/libsyscom.a: tests/ini/common.o tests/ini/ioconf.o
+ $(AR) rvs $@ $?
+
+tests/ini/format_sar.o: tests/ini/format.c tests/ini/sa.h tests/ini/common.h tests/ini/rd_stats.h tests/ini/rd_sensors.h
+ $(CC) -o $@ -c $(CFLAGS) -DSOURCE_SAR $(DFLAGS) $<
+
+tests/ini/pr_stats.o: tests/ini/pr_stats.c tests/ini/sa.h tests/ini/common.h tests/ini/rd_stats.h tests/ini/rd_sensors.h tests/ini/ioconf.h tests/ini/inisysconfig.h tests/ini/pr_stats.h
+
+tests/ini/librdstats_light.a: tests/ini/rd_stats_light.o tests/ini/count_light.o
+ $(AR) rvs $@ $?
+
+tests/ini/inisar.o: tests/ini/inisar.c tests/ini/sa.h tests/ini/iniversion.h tests/ini/common.h tests/ini/rd_stats.h tests/ini/rd_sensors.h
+
+tests/ini/inisar: tests/ini/inisar.o tests/ini/act_sar.o tests/ini/format_sar.o tests/ini/sa_common.o tests/ini/pr_stats.o tests/ini/librdstats_light.a tests/ini/libsyscom.a
+
ifdef REQUIRE_NLS
locales: $(NLSGMO)
else
# Phony targets
.PHONY: clean distclean install install_base install_all uninstall \
- uninstall_base uninstall_all dist bdist xdist gitdist squeeze test simtest
+ uninstall_base uninstall_all dist bdist xdist gitdist squeeze simtest
install_man: man/sadc.8 man/sar.1 man/sadf.1 man/sa1.8 man/sa2.8 man/sysstat.5
ifeq ($(INSTALL_DOC),y)
TESTDIR="tests"
TESTRUN="/bin/sh"
TESTLIST:=$(shell ls $(TESTDIR) | egrep '^[0-9]+$$' | sort -n)
-RTESTLIST:=$(shell ls $(TESTDIR) | egrep '^rt' | egrep '[0-9]+$$' | sort -n)
+
+testcomp: tests/ini/inisar
unit:
@echo $(X) 2>&1
@cat $(TESTDIR)/$(X) | $(TESTRUN)
-test: all
- @$(foreach x, $(RTESTLIST), $(MAKE) X=$x unit || exit;)
-
-simtest: all
+simtest: all testcomp
@$(foreach x, $(TESTLIST), $(MAKE) X=$x unit || exit;)
+ rm -f tests/root
+ ln -s root1 tests/root
clean:
rm -f sadc sar sadf iostat tapestat mpstat pidstat cifsiostat *.o *.a core TAGS tests/*.tmp
rm -f nfsiostat* man/nfsiostat*
- rm -f tests/sa01 tests/19700101
+ rm -f tests/sa[012]*
+ rm -f tests/root
+ ln -s root1 tests/root
+ rm -f tests/ini/inisar
+ rm -f tests/ini/*.o tests/ini/*.a tests/ini/core
find nls -name "*.gmo" -exec rm -f {} \;
almost-distclean: clean nls/sysstat.pot
rm -f cron/sysstat-collect.service cron/sysstat-collect.timer cron/sysstat-summary.service cron/sysstat-summary.timer
rm -f cron/sysstat.cron.hourly cron/sysstat.crond.sample cron/sysstat.crond.sample.in
rm -f man/sa1.8 man/sa2.8 man/sadc.8 man/sadf.1 man/sar.1 man/iostat.1 man/sysstat.5
- rm -f tests/00300 tests/00310 tests/00320 tests/00400 tests/00410 tests/01130 tests/01230
- rm -f tests/rt00010 tests/rt00020
+ rm -f tests/variables
rm -f man/cifsiostat.1
rm -f *.log config.status
rm -rf autom4te.cache
rm -f configure
dist: almost-distclean
- cd .. && (tar --exclude=Makefile --exclude=.git --dereference -cvf - sysstat-$(VERSION) | gzip -v9 > sysstat-$(VERSION).tar.gz)
+ cd .. && (tar --exclude=Makefile --exclude=.git -cvf - sysstat-$(VERSION) | gzip -v9 > sysstat-$(VERSION).tar.gz)
bdist: almost-distclean
- cd .. && (tar --exclude=Makefile --exclude=.git --dereference -cvf - sysstat-$(VERSION) | bzip2 > sysstat-$(VERSION).tar.bz2)
+ cd .. && (tar --exclude=Makefile --exclude=.git -cvf - sysstat-$(VERSION) | bzip2 > sysstat-$(VERSION).tar.bz2)
xdist: almost-distclean
- cd .. && (tar --exclude=Makefile --exclude=.git --dereference -cvf - sysstat-$(VERSION) | xz > sysstat-$(VERSION).tar.xz)
+ cd .. && (tar --exclude=Makefile --exclude=.git -cvf - sysstat-$(VERSION) | xz > sysstat-$(VERSION).tar.xz)
gitdist: almost-distclean
- cd .. && (tar --exclude=Makefile --dereference -cvf - sysstat-$(VERSION) | bzip2 > sysstat-$(VERSION)-git.tar.bz2)
+ cd .. && (tar --exclude=Makefile -cvf - sysstat-$(VERSION) | bzip2 > sysstat-$(VERSION)-git.tar.bz2)
tags:
etags ./*.[hc]