summaryrefslogtreecommitdiffstats
path: root/ax25rtd/Makefile.am
blob: babb6dfe60479ec5297337a970b386fc2a0ac608 (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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90

etcfiles = ax25rtd.conf
varfiles = ax25_route ip_route

man_MANS = ax25rtd.8 ax25rtctl.8 ax25rtd.conf.5
CLEANFILES = ax25rtd.8 ax25rtd.8.tmp					\
	     ax25rtctl.8 ax25rtctl.8.tmp				\
	     ax25rtd.conf.5 ax25rtd.conf.5.tmp

ax25rtd.8: ax25rtd.man
	name_ax25rtd=$$(echo ax25rtd | sed -e '$(transform)')		\
	name_Ax25rtd=$$(echo $$name_ax25rtd | sed -r 's@^(.)@\U\1\E@') && \
	name_AX25RTD=$$(echo $$name_ax25rtd | sed -r 's@^(.*)@\U\1\E@') && \
	name_ax25rtctl=$$(echo ax25rtctl | sed -e '$(transform)') &&	\
	name_Ax25rtctl=$$(echo $$name_ax25rtctl | sed -r 's@^(.)@\U\1\E@') && \
	name_AX25RTCTL=$$(echo $$name_ax25rtctl | sed -r 's@^(.*)@\U\1\E@') && \
	sed -e "s/@@@ax25rtd@@@/$$name_ax25rtd/g"			\
	    -e "s/@@@Ax25rtd@@@/$$name_Ax25rtd/g"			\
	    -e "s/@@@AX25RTD@@@/$$name_AX25RTD/g"			\
	    -e "s/@@@ax25rtctl@@@/$$name_ax25rtctl/g"			\
	    -e "s/@@@Ax25rtctl@@@/$$name_Ax25rtctl/g"			\
	    -e "s/@@@AX25RTCTL@@@/$$name_AX25RTCTL/g"			\
	    $(srcdir)/ax25rtd.man > ax25rtd.8.tmp &&			\
	mv ax25rtd.8.tmp ax25rtd.8;

ax25rtctl.8: ax25rtctl.man
	name_ax25rtd=$$(echo ax25rtd | sed -e '$(transform)')		\
	name_Ax25rtd=$$(echo $$name_ax25rtd | sed -r 's@^(.)@\U\1\E@') && \
	name_AX25RTD=$$(echo $$name_ax25rtd | sed -r 's@^(.*)@\U\1\E@') && \
	name_ax25rtctl=$$(echo ax25rtctl | sed -e '$(transform)') &&	\
	name_Ax25rtctl=$$(echo $$name_ax25rtctl | sed -r 's@^(.)@\U\1\E@') && \
	name_AX25RTCTL=$$(echo $$name_ax25rtctl | sed -r 's@^(.*)@\U\1\E@') && \
	sed -e "s/@@@ax25rtd@@@/$$name_ax25rtd/g"			\
	    -e "s/@@@Ax25rtd@@@/$$name_Ax25rtd/g"			\
	    -e "s/@@@AX25RTD@@@/$$name_AX25RTD/g"			\
	    -e "s/@@@ax25rtctl@@@/$$name_ax25rtctl/g"			\
	    -e "s/@@@Ax25rtctl@@@/$$name_Ax25rtctl/g"			\
	    -e "s/@@@AX25RTCTL@@@/$$name_AX25RTCTL/g"			\
	    $(srcdir)/ax25rtctl.man > ax25rtctl.8.tmp &&		\
	mv ax25rtctl.8.tmp ax25rtctl.8;

ax25rtd.conf.5: ax25rtd.conf.man
	name_ax25rtd=$$(echo ax25rtd | sed -e '$(transform)')		\
	name_Ax25rtd=$$(echo $$name_ax25rtd | sed -r 's@^(.)@\U\1\E@') && \
	name_AX25RTD=$$(echo $$name_ax25rtd | sed -r 's@^(.*)@\U\1\E@') && \
	name_ax25rtctl=$$(echo ax25rtctl | sed -e '$(transform)') &&	\
	name_Ax25rtctl=$$(echo $$name_ax25rtctl | sed -r 's@^(.)@\U\1\E@') && \
	name_AX25RTCTL=$$(echo $$name_ax25rtctl | sed -r 's@^(.*)@\U\1\E@') && \
	sed -e "s/@@@ax25rtd@@@/$$name_ax25rtd/g"			\
	    -e "s/@@@Ax25rtd@@@/$$name_Ax25rtd/g"			\
	    -e "s/@@@AX25RTD@@@/$$name_AX25RTD/g"			\
	    -e "s/@@@ax25rtctl@@@/$$name_ax25rtctl/g"			\
	    -e "s/@@@Ax25rtctl@@@/$$name_Ax25rtctl/g"			\
	    -e "s/@@@AX25RTCTL@@@/$$name_AX25RTCTL/g"			\
	    $(srcdir)/ax25rtd.conf.man > ax25rtd.conf.5.tmp &&		\
	mv ax25rtd.conf.5.tmp ax25rtd.conf.5;

installconf:
	$(mkinstalldirs) $(DESTDIR)$(AX25_SYSCONFDIR)
	@list='$(etcfiles)'; for p in $$list; do \
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p"; \
	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_SYSCONFDIR)/$$p; \
	done
	$(mkinstalldirs) $(DESTDIR)$(AX25_LOCALSTATEDIR)/ax25rtd
	@list='$(varfiles)'; for p in $$list; do \
	  echo " $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_LOCALSTATEDIR)/ax25rtd/$$p"; \
	  $(INSTALL_DATA) $$p $(DESTDIR)$(AX25_LOCALSTATEDIR)/ax25rtd/$$p; \
	done

sbin_PROGRAMS = ax25rtd ax25rtctl

LDADD = $(AX25_LIB)

EXTRA_DIST = $(etcfiles) ax25rtd.man ax25rtctl.man ax25rtd.conf.man $(doc_DATA)

doc_DATA= TODO.ax25rtd README.ax25rtd

ax25rtd_SOURCES =	\
	ax25rtd.c	\
	ax25rtd.h	\
	cache_ctl.c	\
	cache_dump.c	\
	config.c	\
	listener.c

AX25_SYSCONFDIR=$(sysconfdir)/ax25
AX25_LOCALSTATEDIR=$(localstatedir)/ax25

AM_CPPFLAGS = -DAX25_SYSCONFDIR=\""$(AX25_SYSCONFDIR)"\" \
	      -DAX25_LOCALSTATEDIR=\""$(AX25_LOCALSTATEDIR)"\"