Patrick Welche <prlw1@cam.ac.uk>
[netbsd-mini2440.git] / external / bsd / ntp / dist / sntp / Makefile.am
blob9575f41b30034f8e717c5914c1eeb0d03f0be563
1 # Makefile.am for JMK's SNTP, by Harlan Stenn
3 NULL=
5 AUTOMAKE_OPTIONS = foreign 1.10
6 ACLOCAL_AMFLAGS= -I ../m4 -I libopts/m4
8 AM_CPPFLAGS= $(LIBOPTS_CFLAGS) -I$(top_srcdir)/../include \
9         -I$(top_srcdir)/../lib/isc/include \
10         -I$(top_srcdir)/../lib/isc/nothreads/include \
11         -I$(top_srcdir)/../lib/isc/unix/include
13 LDADD=  $(LIBOPTS_LDADD) -lm ../libntp/libntp.a
15 run_ag= cd $(srcdir) &&                         \
16         env PATH="$(abs_builddir):$(PATH)"      \
17         autogen -L ../include --writable
19 bindir= ${exec_prefix}/${BINSUBDIR}
20 bin_PROGRAMS=   sntp
21 CLEANFILES=     libopts-subdir
23 SUBDIRS=
24 if NEED_LIBOPTS
25 SUBDIRS+= libopts
26 endif
27 SUBDIRS+= .
29 sntp_SOURCES =          \
30         crypto.c        \
31         crypto.h        \
32         data_formats.h  \
33         header.h        \
34         kod_management.c \
35         kod_management.h \
36         log.c           \
37         log.h           \
38         main.c          \
39         networking.c    \
40         networking.h    \
41         sntp-opts.c     \
42         sntp-opts.h     \
43         utilities.c     \
44         utilities.h     \
45         $(NULL)
47 # it's in EXTRA_DIST
48 #dist_man_MANS= sntp.1
50 EXTRA_DIST=                             \
51                 autogen-version.def     \
52                 bincheck.mf             \
53                 COPYRIGHT               \
54                 deps-ver                \
55                 depsver.mf              \
56                 sntp-opts.def           \
57                 sntp-opts.menu          \
58                 sntp-opts.texi          \
59                 sntp.1                  \
60                 sntp.html               \
61                 sntp.texi               \
62                 version.def             \
63                 version.m4              \
64                 version.texi            \
65                 $(NULL)
67 OLD_EXTRA_DIST=         \
68                 autogen-version.def version.def version.m4 version.texi
70 BUILT_SOURCES=                                          \
71                 check-autogen-version.def               \
72                 check-version.def check-version.m4      \
73                 check-version.texi                      \
74                 libtool                                 \
75                 sntp-opts.c                             \
76                 sntp-opts.h                             \
77                 sntp-opts.menu                          \
78                 sntp-opts.texi                          \
79                 sntp.1                                  \
80                 sntp.html                               \
81                 $(NULL)
83 man_MANS=       sntp.1
85 FRC:
86 check-autogen-version.def: FRC
87         @cd $(srcdir)                                                   \
88         && test -r ../include/autogen-version.def                       \
89         && ( if cmp -s ../include/autogen-version.def autogen-version.def; \
90            then : ;                                                     \
91            else cp ../include/autogen-version.def autogen-version.def;   \
92                 echo "Installing new sntp/autogen-version.def file";    \
93            fi )
95 check-version.def: FRC
96         @cd $(srcdir)                                   \
97         && test -r ../include/version.def               \
98         && ( if cmp -s ../include/version.def version.def;      \
99            then : ;                                             \
100            else cp ../include/version.def version.def;          \
101                 echo "Installing new sntp/version.def file";    \
102            fi )
104 check-version.m4: FRC
105         @cd $(srcdir)                                   \
106         && test -r ../version.m4                        \
107         && ( if cmp -s ../version.m4 version.m4;        \
108            then : ;                                     \
109            else cp ../version.m4 version.m4;            \
110                 echo "Installing new sntp/version.m4 file";     \
111            fi )
113 check-version.texi: FRC
114         @cd $(srcdir)                                   \
115         && test -r ../include/version.texi                      \
116         && ( if cmp -s ../include/version.texi version.texi;    \
117            then : ;                                     \
118            else cp ../include/version.texi version.texi;        \
119                 echo "Installing new sntp/version.texi file";   \
120            fi )
122 $(srcdir)/../COPYRIGHT:
123         cd .. && $(MAKE) COPYRIGHT
125 $(srcdir)/COPYRIGHT: $(srcdir)/../COPYRIGHT
126         cat $(srcdir)/../COPYRIGHT > $@
128 $(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c
129         @: do-nothing action to avoid default SCCS get, .h built with .c
130         
131 $(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
132         $(run_ag) sntp-opts.def
134 $(srcdir)/sntp.1: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
135         $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def
137 $(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.def $(srcdir)/../include/version.def
138         $(MAKE) libopts-subdir sntp     # aginfo.tpl runs binary to extract --help usage text
139         $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def
141 libopts-subdir: $(LIBOPTS_LDADD)
142         touch $@        # LIBOPTS_LDADD is ./libopts/libopts.la if NEED_LIBOPTS
144 libopts/libopts.la:
145         ( cd libopts && $(MAKE) libopts.la )
147 $(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir)/sntp.texi $(srcdir)/version.texi
148         cd $(srcdir) && makeinfo --force --html --no-split -o sntp.html sntp.texi
150 ../libntp/libntp.a:
151         cd ../libntp && $(MAKE)
153 libtool: $(LIBTOOL_DEPS)
154         ./config.status --recheck
156 include $(top_srcdir)/bincheck.mf
157 include $(top_srcdir)/depsver.mf