blob: 2971c088f061ac794d1df25e9b3dbe48016dd58e (
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
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 <stdio.h>/#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 <stdio.h>/#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
|