incdir=${PWD}/include
-#for f in ${prog_opt_files}
-#do
-# ( cd $(dirname ${f})
-# echo "Running autogen on $f..."
-# autogen -L${incdir} $(basename ${f}) )
-#done
+for f in ${prog_opt_files}
+do
+ ( cd $(dirname ${f})
+ echo "Running autogen on $f..."
+ autogen -L${incdir} $(basename ${f})
+ ) || exit 1
+done
-(cd sntp && ${AUTORECONF} -i -v)
++cp bincheck.mf sntp/
+
${AUTORECONF} -i -v
+
+# HMS: 20060618: Now that we use separate copies of libopts
+# we should only need the previous line.
+#
+## HMS: 20060615: the next line seems to be needed to make sure
+## we get the correct srcdir path in sntp/libopts/Makefile.in
+#rm -rf sntp/autom4te.cache
+#
+#(cd sntp && ${AUTORECONF} -f -i -v)
# Makefile for sntp
# N.M. Maclaren, October 2000.
- # Take a look at README for the various preprocessor symbols, but they are
- # extremely unlikely to be needed on newer systems. You may prefer to change
- # LOCKNAME and SAVENAME to use /var/run (or even /tmp) rather than /etc. Note
- # that not all of the following system settings have been tested recently.
-
AUTOMAKE_OPTIONS = foreign
+ACLOCAL_AMFLAGS= -I libopts/m4
+
+AM_CPPFLAGS= $(LIBOPTS_CFLAGS)
+LDADD= $(LIBOPTS_LDADD)
- # Compiling this sort of ANSI C under SunOS 4.1 is a mug's game, because Sun's
- # Unix headers make GNU C vomit even in compatibility mode, but the following
- # will compile main.c and unix.c. At least two people have got it to work.
- # CC = gcc -ansi
- # CFLAGS = -O -DNONBLOCK_BROKEN
- # LDFLAGS =
- # LIBS = -lm
-
- # The following settings can be used under Linux. While adjtime is present,
- # it is completely broken (i.e. it will work only if xntp is running), so it
- # is a good idea to add -DADJTIME_MISSING.
- # CC = cc -DADJTIME_MISSING
- # CFLAGS = -O
- # LDFLAGS =
- # LIBS = -lm
-
NULL=
+ EXTRA_DIST= bincheck.mf
+
bindir= ${exec_prefix}/${BINSUBDIR}
- bin_PROGRAMS = sntp
+ bin_PROGRAMS= sntp
+run_ag= cd $(srcdir) && autogen -L $(top_srcdir)/include
+
+SUBDIRS=
+if NEED_LIBOPTS
+SUBDIRS+= libopts
+endif
+SUBDIRS+= .
sntp_SOURCES = \
header.h \
dist_man_MANS= sntp.1
- include ../bincheck.mf
+EXTRA_DIST= sntp-opts.def sntp.1 sntp-opts.texi sntp-opts.menu
+BUILT_SOURCES= sntp-opts.c sntp-opts.h sntp.1 sntp-opts.texi sntp-opts.menu
+man_MANS= sntp.1
+
+$(srcdir)/sntp-opts.h: sntp-opts.c
+$(srcdir)/sntp-opts.c: sntp-opts.def
+ $(run_ag) sntp-opts.def
+
+$(srcdir)/sntp.1: sntp-opts.def
+ $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def
+
+$(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: sntp-opts.def
+ $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def
+
+ include bincheck.mf