summaryrefslogtreecommitdiff
path: root/tests/daemon/GNUmakefile
blob: 6a4dba7b7bbadcb11c33d6fa6e7b3efda577bef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
TOPDIR = ../..

SUBDIRS =

INCLUDE_LIBS = \
	$(TOPDIR)/src/libwolf.a

INCLUDE_DIRS = -I$(TOPDIR)/include/wolf -I.

TEST_BINS = \
	testd$(EXE)

TEST_OBJS = \
	testd_cmdline.o

-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 --include-getopt --conf-parser -i $<
testd_cmdline.c : testd.ggo
	gengetopt --file-name testd_cmdline --include-getopt --conf-parser -i $<

testd_cmdline.o : testd_cmdline.c testd_cmdline.h
	$(CC) -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

local_test:
	@fakeroot ./testd -d -c ./testd.conf && \
		sleep 3 && \
		ls -altr /tmp/testd* && \
		cat /tmp/testd.pid
	-@ps -alef | grep testd | grep -v grep
	@sleep 1
	@pkill testd
	-@ls -altr /tmp/testd.pid
	@cat /tmp/testd.log
	-@rm -f /tmp/testd.log