]> granicus.if.org Git - sysstat/blobdiff - Makefile.in
sar/sadc: Add stable identifier support for disks statistics
[sysstat] / Makefile.in
index 60e4e0115de63b5b1799f6dec456b15fe967f3eb..300a83e9d38c73e45550d4b8736685a14a04bc6a 100644 (file)
@@ -186,6 +186,8 @@ common_sadc.o: common.c version.h common.h
 
 common.o: common.c version.h common.h
 
+systest.o: systest.c systest.h
+
 sa_common_sadc.o: sa_common.c version.h sa.h common.h rd_stats.h rd_sensors.h ioconf.h sysconfig.h
        $(CC) -o $@ -c $(CFLAGS) -DSOURCE_SADC $(DFLAGS) $<
 
@@ -247,7 +249,7 @@ sa_conv.o: sa_conv.c version.h sadf.h sa.h common.h rd_stats.h rd_sensors.h sa_c
 
 # Explicit rules needed to prevent possible file corruption
 # when using parallel execution.
-libsyscom.a: common.o ioconf.o
+libsyscom.a: common.o ioconf.o systest.o
        $(AR) rvs $@ $?
 
 # Ditto
@@ -265,7 +267,7 @@ sadc.o: sadc.c sa.h version.h common.h rd_stats.h rd_sensors.h
 
 sadc: LFLAGS += $(LFSENSORS)
 
-sadc: sadc.o act_sadc.o sa_wrap.o sa_common_sadc.o common_sadc.o librdstats.a librdsensors.a
+sadc: sadc.o act_sadc.o sa_wrap.o sa_common_sadc.o common_sadc.o systest.o librdstats.a librdsensors.a
 
 sar.o: sar.c sa.h version.h common.h rd_stats.h rd_sensors.h
 
@@ -297,6 +299,32 @@ cifsiostat.o: cifsiostat.c cifsiostat.h count.h rd_stats.h version.h common.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
@@ -308,7 +336,7 @@ nls/sysstat.pot: $(wildcard *.c)
 
 # Phony targets
 .PHONY: clean distclean install install_base install_all uninstall \
-       uninstall_base uninstall_all dist bdist xdist gitdist squeeze test
+       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)
@@ -597,16 +625,25 @@ TESTDIR="tests"
 TESTRUN="/bin/sh"
 TESTLIST:=$(shell ls $(TESTDIR) | egrep '^[0-9]+$$' | sort -n)
 
+testcomp: tests/ini/inisar
+
 unit:
        @echo $(X) 2>&1
        @cat $(TESTDIR)/$(X) | $(TESTRUN)
 
-test: 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/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
@@ -615,7 +652,7 @@ 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/0230 tests/0231 tests/0232 tests/0240 tests/0250
+       rm -f tests/variables
        rm -f man/cifsiostat.1
        rm -f *.log config.status
        rm -rf autom4te.cache
@@ -629,16 +666,16 @@ maintainer-clean: distclean
        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]