aboutsummaryrefslogtreecommitdiff
path: root/ntpsnmpd/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'ntpsnmpd/Makefile.am')
-rw-r--r--ntpsnmpd/Makefile.am125
1 files changed, 94 insertions, 31 deletions
diff --git a/ntpsnmpd/Makefile.am b/ntpsnmpd/Makefile.am
index 168de2787310..11ecf1b0dcc9 100644
--- a/ntpsnmpd/Makefile.am
+++ b/ntpsnmpd/Makefile.am
@@ -1,38 +1,72 @@
NULL=
-AUTOMAKE_OPTIONS=
-if NTP_BINSUBDIR_IS_BIN
-bin_PROGRAMS= @MAKE_NTPSNMPD@
-else
-sbin_PROGRAMS= @MAKE_NTPSNMPD@
-endif
+bin_PROGRAMS= $(NTPSNMPD_DB)
+libexec_PROGRAMS= $(NTPSNMPD_DL)
+sbin_PROGRAMS= $(NTPSNMPD_DS)
EXTRA_PROGRAMS= ntpsnmpd
ntpsnmpd_SOURCES= netsnmp_daemonize.c ntpsnmpd.c ntpSnmpSubagentObject.c \
ntpsnmpd-opts.c ntpsnmpd-opts.h ntpSnmpSubagentObject.h \
ntp_snmp.h
# HMS: we probably want a version.o file here, too.
-LDADD= ../ntpq/libntpq.a ../libntp/libntp.a @LCRYPTO@ @SNMP_LIBS@ \
- $(LIBOPTS_LDADD)
-AM_CPPFLAGS= -I$(top_srcdir)/ntpq -I$(top_srcdir)/include \
- -I$(top_srcdir)/lib/isc/include \
- -I$(top_srcdir)/lib/isc/nothreads/include \
- -I$(top_srcdir)/lib/isc/unix/include \
- $(LIBOPTS_CFLAGS) @SNMP_CPPFLAGS@
-
-AM_CFLAGS= @SNMP_CFLAGS@
-EXTRA_DIST= ntpsnmpd-opts.def ntpsnmpd.1 ntpsnmpd-opts.texi \
- ntpsnmpd-opts.menu ntpv4-mib.mib
+LDADD = ../ntpq/libntpq.a ../libntp/libntp.a
+LDADD += $(SNMP_LIBS) $(LDADD_LIBNTP) $(LIBM)
+LDADD += $(PTHREAD_LIBS) $(LDADD_NTP) $(LIBOPTS_LDADD)
+
+AM_CFLAGS = $(SNMP_CFLAGS) $(CFLAGS_NTP)
+
+AM_CPPFLAGS = -I$(top_srcdir)/ntpq
+AM_CPPFLAGS += $(NTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(SNMP_CPPFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
+EXTRA_DIST= \
+ invoke-ntpsnmpd.menu \
+ invoke-ntpsnmpd.texi \
+ ntpsnmpd-opts.def \
+ ntpsnmpd.1ntpsnmpdman \
+ ntpsnmpd.1ntpsnmpdmdoc \
+ ntpsnmpd.man.in \
+ ntpsnmpd.mdoc.in \
+ ntpsnmpd.html \
+ ntpsnmpd.texi \
+ ntpv4-mib.mib \
+ $(NULL)
+
BUILT_SOURCES= ntpsnmpd-opts.c ntpsnmpd-opts.h
CLEANFILES=
-noinst_DATA= $(srcdir)/ntpsnmpd-opts.texi $(srcdir)/ntpsnmpd-opts.menu
-man_MANS= $(srcdir)/ntpsnmpd.1
-run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" \
- autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+DISTCLEANFILES= config.log $(man_MANS)
+
+html_DATA= \
+ $(srcdir)/ntpsnmpd.html \
+ $(NULL)
+
+noinst_DATA= \
+ $(srcdir)/invoke-ntpsnmpd.menu \
+ $(srcdir)/invoke-ntpsnmpd.texi \
+ $(srcdir)/ntpsnmpd.man.in \
+ $(srcdir)/ntpsnmpd.mdoc.in \
+ $(NULL)
+
+install-data-local: install-html
+
+man1_MANS=
+man8_MANS=
+man_MANS= ntpsnmpd.$(NTPSNMPD_MS)
+
+run_ag= cd $(srcdir) && env PATH="$(abs_builddir):$(PATH)" AUTOGEN_DNE_DATE=-D \
+ autogen -L ../sntp/include -L ../sntp/ag-tpl --writable
+std_def_list = \
+ $(top_srcdir)/sntp/include/debug-opt.def \
+ $(top_srcdir)/sntp/include/autogen-version.def \
+ $(top_srcdir)/sntp/include/copyright.def \
+ $(top_srcdir)/sntp/include/homerc.def \
+ $(top_srcdir)/sntp/include/ntp.lic \
+ $(top_srcdir)/sntp/include/version.def \
+ $(NULL)
$(srcdir)/ntpsnmpd-opts.h: $(srcdir)/ntpsnmpd-opts.c
@: do-nothing action to avoid default SCCS get, .h built with .c
@@ -40,15 +74,44 @@ $(srcdir)/ntpsnmpd-opts.h: $(srcdir)/ntpsnmpd-opts.c
$(srcdir)/ntpsnmpd-opts.c: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
$(run_ag) ntpsnmpd-opts.def
-$(srcdir)/ntpsnmpd.1: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpsnmpd ntpsnmpd-opts.def
+###
-$(srcdir)/ntpsnmpd-opts.menu: $(srcdir)/ntpsnmpd-opts.texi
+$(srcdir)/ntpsnmpd.1ntpsnmpdman: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsnmpdman -Tagman-cmd.tpl ntpsnmpd-opts.def
+
+$(srcdir)/ntpsnmpd.man.in: $(srcdir)/ntpsnmpd.1ntpsnmpdman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdman > $(srcdir)/ntpsnmpd.man.in+
+ mv $(srcdir)/ntpsnmpd.man.in+ $(srcdir)/ntpsnmpd.man.in
+
+###
+
+$(srcdir)/ntpsnmpd.1ntpsnmpdmdoc: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpsnmpdmdoc -Tagmdoc-cmd.tpl ntpsnmpd-opts.def
+
+$(srcdir)/ntpsnmpd.mdoc.in: $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpsnmpd.1ntpsnmpdmdoc > $(srcdir)/ntpsnmpd.mdoc.in+
+ mv $(srcdir)/ntpsnmpd.mdoc.in+ $(srcdir)/ntpsnmpd.mdoc.in
+
+###
+
+ntpsnmpd.$(NTPSNMPD_MS): $(srcdir)/ntpsnmpd.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpsnmpd.$(NTPSNMPD_MS)+:$(srcdir)/ntpsnmpd.$(MANTAGFMT).in
+ mv ntpsnmpd.$(NTPSNMPD_MS)+ ntpsnmpd.$(NTPSNMPD_MS)
+
+###
+
+$(srcdir)/invoke-ntpsnmpd.menu: $(srcdir)/invoke-ntpsnmpd.texi
@: do-nothing action to avoid default SCCS get, .menu built with .texi
-$(srcdir)/ntpsnmpd-opts.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpsnmpd-opts.def
- $(top_srcdir)/scripts/check--help $@
+$(srcdir)/invoke-ntpsnmpd.texi: $(srcdir)/ntpsnmpd-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpsnmpd-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(srcdir)/ntpsnmpd.html: $(srcdir)/ntpsnmpd.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -o ntpsnmpd.html ntpsnmpd.texi || true )
include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/check-libopts.mf
include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf