TOPDIR = ../.. SUBDIRS = INCLUDE_LIBS = \ $(TOPDIR)/src/libwolf.a INCLUDE_DIRS = -I$(TOPDIR)/include/wolf -I. TEST_BINS = \ testd$(EXE) TEST_OBJS = \ testd_cmdline.o CATALOG_NAME = testd GETTEXT_LANGUAGES = de GETTEXT_FILES = $(TEST_OBJS:.o=.c) $(TEST_BINS:$(EXE)=.c) GETTEXT_TRIGGERS = _ gettext_noop gettext -include $(TOPDIR)/makefiles/gmake/sub.mk # ABa: currently a special rule for cmdline.c as gengetopt is not # completly fixed yet testd_cmdline.h : testd.ggo gengetopt --file-name testd_cmdline --conf-parser $(GENGETOPT_INCLUDE_GETOPT) -i $< && \ sed 's/#include /#include "port\/stdio.h"/g' < $@ > _tmp && mv _tmp $@ testd_cmdline.c : testd.ggo gengetopt --file-name testd_cmdline --conf-parser $(GENGETOPT_INCLUDE_GETOPT) -i $< && \ sed 's/#include /#include "port\/stdio.h"/g' < $@ > _tmp && mv _tmp $@ testd_cmdline.o : testd_cmdline.c testd_cmdline.h $(CC) $(INCLUDE_DIRS) -c -o $@ $< testd: $(TOPDIR)/src/libwolf.a testd_cmdline.o local_all: local_clean: -@rm -f testd_cmdline.o local_distclean: -@rm -f testd_cmdline.c testd_cmdline.h # for testing, ps with all processes with as many information as possible ifeq "$(PLATFORM)" "FREEBSD" PS_ALL = ps aux else ifeq "$(PLATFORM)" "OPENBSD" PS_ALL = ps aux else ifeq "$(PLATFORM)" "NETBSD" PS_ALL = ps aux else PS_ALL = ps -alef endif endif endif local_test: @fakeroot ./testd -d -c ./testd.conf && \ sleep 3 && \ ls -altr /tmp/testd* && \ cat /tmp/testd.pid -@$(PS_ALL) | grep testd | grep -v grep @sleep 1 @pkill testd -@ls -altr /tmp/testd.pid @cat /tmp/testd.log -@rm -f /tmp/testd.log