diff options
Diffstat (limited to 'sntp/Makefile.am')
-rw-r--r-- | sntp/Makefile.am | 194 |
1 files changed, 155 insertions, 39 deletions
diff --git a/sntp/Makefile.am b/sntp/Makefile.am index 1bee65de1ef6..a19d77b27f6d 100644 --- a/sntp/Makefile.am +++ b/sntp/Makefile.am @@ -1,51 +1,104 @@ -# Makefile.am, by Harlan Stenn, from: -# Makefile for sntp -# N.M. Maclaren, October 2000. +# Makefile.am for JMK's SNTP, by Harlan Stenn -AUTOMAKE_OPTIONS = foreign -ACLOCAL_AMFLAGS= -I libopts/m4 +NULL = -AM_CPPFLAGS= $(LIBOPTS_CFLAGS) -LDADD= $(LIBOPTS_LDADD) +## LIBOPTS_CHECK_NOBUILD works with Automake 1.10 now +AUTOMAKE_OPTIONS = foreign 1.10 +ACLOCAL_AMFLAGS = -I ../m4 -I libopts/m4 -NULL= +AM_CPPFLAGS = $(LIBOPTS_CFLAGS) -I$(top_srcdir)/../include \ + -I$(top_srcdir)/../lib/isc/include \ + -I$(top_srcdir)/../lib/isc/nothreads/include \ + -I$(top_srcdir)/../lib/isc/unix/include -bindir= ${exec_prefix}/${BINSUBDIR} -bin_PROGRAMS= sntp -#run_ag= cd $(srcdir) && autogen --writable -L $(top_srcdir)/include -run_ag= cd $(srcdir) && autogen --writable +LDADD = $(LIBOPTS_LDADD) $(LIBM) ../libntp/libntp.a @LCRYPTO@ -SUBDIRS= +run_ag = cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \ + autogen -L ../include --writable + +if NTP_BINSUBDIR_IS_BIN +bin_PROGRAMS = sntp +else +sbin_PROGRAMS = sntp +endif + +CLEANFILES = check-COPYRIGHT-submake + +SUBDIRS = if NEED_LIBOPTS -SUBDIRS+= libopts +SUBDIRS += libopts endif -SUBDIRS+= . - -sntp_SOURCES = \ - header.h \ - internet.c \ - internet.h \ - kludges.h \ - main.c \ - sntp-opts.c \ - sntp-opts.h \ - socket.c \ - timing.c \ - unix.c \ + +sntp_SOURCES = \ + crypto.c \ + crypto.h \ + data_formats.h \ + header.h \ + kod_management.c \ + kod_management.h \ + log.c \ + log.h \ + main.c \ + main.h \ + networking.c \ + networking.h \ + sntp.c \ + sntp-opts.c \ + sntp-opts.h \ + utilities.c \ + utilities.h \ + $(NULL) + +EXTRA_DIST = \ + $(srcdir)/autogen-version.def \ + bincheck.mf \ + $(srcdir)/COPYRIGHT \ + deps-ver \ + depsver.mf \ + sntp-opts.def \ + sntp-opts.menu \ + sntp-opts.texi \ + sntp.1 \ + sntp.html \ + sntp.texi \ + $(srcdir)/version.def \ + $(srcdir)/version.m4 \ + $(srcdir)/version.texi \ $(NULL) -dist_man_MANS= sntp.1 +OLD_EXTRA_DIST= \ + autogen-version.def version.def version.m4 version.texi -EXTRA_DIST= bincheck.mf \ - COPYRIGHT \ - sntp-opts.def sntp.1 sntp-opts.texi sntp-opts.menu \ - autogen-version.def version.def -BUILT_SOURCES= check-autogen-version.def check-version.def \ - sntp-opts.c sntp-opts.h sntp.1 sntp-opts.texi sntp-opts.menu -man_MANS= sntp.1 +BUILT_SOURCES= \ + check-autogen-version.def \ + check-version.def \ + check-version.m4 \ + check-version.texi \ + $(srcdir)/COPYRIGHT \ + libtool \ + $(srcdir)/sntp-opts.c \ + $(srcdir)/sntp-opts.h \ + $(NULL) +man_MANS= $(srcdir)/sntp.1 + +# HMS: Real Soon Now... +#info_TEXINFOS= sntp.texi +#sntp_TEXINFOS= sntp-opts.texi + +noinst_DATA= \ + $(srcdir)/sntp.html \ + $(srcdir)/sntp-opts.texi \ + $(srcdir)/sntp-opts.menu \ + $(NULL) FRC: + @: do-nothing action to prevent default SCCS get + @: FRC "force" depends on nothing and is not a file, so is + @: always out-of-date causing targets which depend on it to + @: similarly always be outdated causing their rules to fire + @: each time they or a dependent is built. + check-autogen-version.def: FRC @cd $(srcdir) \ && test -r ../include/autogen-version.def \ @@ -55,6 +108,9 @@ check-autogen-version.def: FRC echo "Installing new sntp/autogen-version.def file"; \ fi ) +$(srcdir)/autogen-version.def: + $(MAKE) check-autogen-version.def + check-version.def: FRC @cd $(srcdir) \ && test -r ../include/version.def \ @@ -64,14 +120,74 @@ check-version.def: FRC echo "Installing new sntp/version.def file"; \ fi ) +$(srcdir)/version.def: + $(MAKE) check-version.def + +check-version.m4: FRC + @cd $(srcdir) \ + && test -r ../version.m4 \ + && ( if cmp -s ../version.m4 version.m4; \ + then : ; \ + else cp ../version.m4 version.m4; \ + echo "Installing new sntp/version.m4 file"; \ + fi ) + +$(srcdir)/version.m4: + $(MAKE) check-version.m4 + +check-version.texi: FRC + @cd $(srcdir) \ + && test -r ../include/version.texi \ + && ( if cmp -s ../include/version.texi version.texi; \ + then : ; \ + else cp ../include/version.texi version.texi; \ + echo "Installing new sntp/version.texi file"; \ + fi ) + +$(srcdir)/version.texi: + $(MAKE) check-version.texi + +$(srcdir)/../COPYRIGHT: + cd .. && $(MAKE) COPYRIGHT-please + +check-COPYRIGHT-submake: $(srcdir)/../COPYRIGHT + @cmp -s $(srcdir)/../COPYRIGHT $(srcdir)/COPYRIGHT \ + || { cp $(srcdir)/../COPYRIGHT $(srcdir) \ + && echo 'updated sntp/COPYRIGHT installed' ;} + @echo 'submake avoided if this file is newer than parent COPYRIGHT' > $@ + +check-COPYRIGHT: FRC + [ ! -r $(srcdir)/../COPYRIGHT ] \ + || [ check-COPYRIGHT-submake -nt $(srcdir)/../COPYRIGHT ] \ + || $(MAKE) check-COPYRIGHT-submake + +$(srcdir)/COPYRIGHT: check-COPYRIGHT + @: do-nothing action to prevent any default + $(srcdir)/sntp-opts.h: $(srcdir)/sntp-opts.c -$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(srcdir)/version.def + @: do-nothing action to avoid default SCCS get, .h built with .c + +$(srcdir)/sntp-opts.c: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def $(run_ag) sntp-opts.def -$(srcdir)/sntp.1: $(srcdir)/sntp-opts.def $(srcdir)/version.def +$(srcdir)/sntp.1: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def $(run_ag) -Tagman1.tpl -bsntp sntp-opts.def -$(srcdir)/sntp-opts.texi $(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.def $(srcdir)/version.def +$(srcdir)/sntp-opts.menu: $(srcdir)/sntp-opts.texi + @: do-nothing action to avoid default SCCS get, .menu built with .texi + +$(srcdir)/sntp-opts.texi: $(srcdir)/sntp-opts.def $(srcdir)/version.def $(srcdir)/../include/copyright.def $(run_ag) -Taginfo.tpl -DLEVEL=section sntp-opts.def + $(top_srcdir)/../scripts/check--help $@ + +$(srcdir)/sntp.html: $(srcdir)/sntp-opts.menu $(srcdir)/sntp-opts.texi $(srcdir)/sntp.texi $(srcdir)/version.texi + cd $(srcdir) && ( makeinfo --force --html --no-split -o sntp.html sntp.texi || true ) + +../libntp/libntp.a: + cd ../libntp && $(MAKE) libntp.a + +libtool: $(LIBTOOL_DEPS) + ./config.status --recheck -include bincheck.mf +include $(top_srcdir)/bincheck.mf +include $(top_srcdir)/depsver.mf |