summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/ntpdc/Makefile.am
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2015-07-15 19:21:26 +0000
committerdelphij <delphij@FreeBSD.org>2015-07-15 19:21:26 +0000
commit2a25cee78ab1d37e7d2bc40ae675646974d99f56 (patch)
treeb0302ac4be59e104f4e1e54014561a1389397192 /contrib/ntp/ntpdc/Makefile.am
parenta0741a75537b2e0514472ac3b28afc55a7846c30 (diff)
downloadFreeBSD-src-2a25cee78ab1d37e7d2bc40ae675646974d99f56.zip
FreeBSD-src-2a25cee78ab1d37e7d2bc40ae675646974d99f56.tar.gz
MFC r280849,280915-280916,281015-281016,282097,282408,282415,283542,
284864,285169-285170,285435: ntp 4.2.8p3. Relnotes: yes Approved by: re (?)
Diffstat (limited to 'contrib/ntp/ntpdc/Makefile.am')
-rw-r--r--contrib/ntp/ntpdc/Makefile.am155
1 files changed, 120 insertions, 35 deletions
diff --git a/contrib/ntp/ntpdc/Makefile.am b/contrib/ntp/ntpdc/Makefile.am
index 858c523..a61dab9 100644
--- a/contrib/ntp/ntpdc/Makefile.am
+++ b/contrib/ntp/ntpdc/Makefile.am
@@ -1,40 +1,122 @@
-AUTOMAKE_OPTIONS= ../util/ansi2knr
+NULL=
-bindir= ${exec_prefix}/${BINSUBDIR}
-bin_PROGRAMS= ntpdc
-EXTRA_PROGRAMS= ntpdc-layout
+bin_PROGRAMS= $(NTPDC_DB)
+libexec_PROGRAMS= $(NTPDC_DL)
+sbin_PROGRAMS= $(NTPDC_DS)
+
+EXTRA_PROGRAMS= ntpdc ntpdc-layout
EXTRA_DATA= check-layout
-BUILT_SOURCES= @MAKE_CHECK_LAYOUT@
-AM_CPPFLAGS= -I$(top_srcdir)/include $(LIBOPTS_CFLAGS)
+BUILT_SOURCES= @MAKE_CHECK_LAYOUT@ ntpdc-opts.c ntpdc-opts.h
+
+AM_CFLAGS = $(CFLAGS_NTP)
+
+AM_CPPFLAGS = $(NTP_INCS)
+AM_CPPFLAGS += $(LIBOPTS_CFLAGS)
+AM_CPPFLAGS += $(CPPFLAGS_NTP)
+
+AM_LDFLAGS = $(LDFLAGS_NTP)
+
# LDADD might need RESLIB and ADJLIB
-ntpdc_LDADD= version.o @READLINE_LIBS@ $(LIBOPTS_LDADD) ../libntp/libntp.a
+ntpdc_LDADD = version.o $(LIBOPTS_LDADD)
+ntpdc_LDADD += ../libntp/libntp.a $(LDADD_LIBNTP) $(LIBM)
+ntpdc_LDADD += $(PTHREAD_LIBS) $(EDITLINE_LIBS)
+ntpdc_LDADD += $(LDADD_NTP)
# ntpdc-layout doesn't need any additional libraries at all
ntpdc_layout_LDADD=
-DISTCLEANFILES= .version version.c
+
+DISTCLEANFILES= .version version.c config.log $(man_MANS)
CLEANFILES= check-layout layout.here nl.c ntpdc-layout
noinst_HEADERS= ntpdc.h
ETAGS_ARGS= Makefile.am
-EXTRA_DIST= nl_in.c nl.pl layout.std \
- ntpdc-opts.def ntpdc.1 ntpdc-opts.texi ntpdc-opts.menu
-BUILT_SOURCES+= ntpdc-opts.c ntpdc-opts.h ntpdc.1 ntpdc-opts.texi \
- ntpdc-opts.menu
-man_MANS= ntpdc.1
-run_ag= cd $(srcdir) && autogen -L ../include --writable
-std_def_list= $(top_srcdir)/include/debug-opt.def \
- $(top_srcdir)/include/autogen-version.def \
- $(top_srcdir)/include/copyright.def \
- $(top_srcdir)/include/homerc.def \
- $(top_srcdir)/include/version.def
+EXTRA_DIST= \
+ invoke-ntpdc.menu \
+ invoke-ntpdc.texi \
+ layout.std \
+ nl_in.c \
+ nl.pl \
+ ntpdc-opts.def \
+ ntpdc.1ntpdcman \
+ ntpdc.1ntpdcmdoc \
+ ntpdc.man.in \
+ ntpdc.mdoc.in \
+ ntpdc.html \
+ ntpdc.texi \
+ $(NULL)
+
+man1_MANS=
+man8_MANS=
+man_MANS= ntpdc.$(NTPDC_MS)
+
+## HMS: Real Soon Now...
+##info_TEXINFOS= ntpdc.texi
+##ntpdc_TEXINFOS= ntpdc-opts.texi
+
+html_DATA= \
+ $(srcdir)/ntpdc.html \
+ $(NULL)
+
+noinst_DATA= \
+ $(srcdir)/invoke-ntpdc.menu \
+ $(srcdir)/invoke-ntpdc.texi \
+ $(srcdir)/ntpdc.man.in \
+ $(srcdir)/ntpdc.mdoc.in \
+ $(NULL)
+
+install-data-local: install-html
+
+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)/ntpdc-opts.h: $(srcdir)/ntpdc-opts.c
+ @: do-nothing action to avoid default SCCS get, .h built with .c
+
$(srcdir)/ntpdc-opts.c: $(srcdir)/ntpdc-opts.def $(std_def_list)
$(run_ag) ntpdc-opts.def
-$(srcdir)/ntpdc.1: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Tagman1.tpl -bntpdc ntpdc-opts.def
+###
+
+$(srcdir)/ntpdc.1ntpdcman: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdcman -Tagman-cmd.tpl ntpdc-opts.def
+
+$(srcdir)/ntpdc.man.in: $(srcdir)/ntpdc.1ntpdcman $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcman > $(srcdir)/ntpdc.man.in+
+ mv $(srcdir)/ntpdc.man.in+ $(srcdir)/ntpdc.man.in
+
+###
+
+$(srcdir)/ntpdc.1ntpdcmdoc: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -DMAN_SECTION=1ntpdcmdoc -Tagmdoc-cmd.tpl ntpdc-opts.def
+
+$(srcdir)/ntpdc.mdoc.in: $(srcdir)/ntpdc.1ntpdcmdoc $(top_srcdir)/sntp/scripts/mansec2subst.sed
+ sed -f $(top_srcdir)/sntp/scripts/mansec2subst.sed $(srcdir)/ntpdc.1ntpdcmdoc > $(srcdir)/ntpdc.mdoc.in+
+ mv $(srcdir)/ntpdc.mdoc.in+ $(srcdir)/ntpdc.mdoc.in
-$(srcdir)/ntpdc-opts.texi $(srcdir)/ntpdc-opts.menu: $(srcdir)/ntpdc-opts.def $(std_def_list)
- $(run_ag) -Taginfo.tpl -DLEVEL=section ntpdc-opts.def
+###
+
+ntpdc.$(NTPDC_MS): $(srcdir)/ntpdc.$(MANTAGFMT).in $(top_builddir)/config.status
+ $(top_builddir)/config.status --file=ntpdc.$(NTPDC_MS)+:$(srcdir)/ntpdc.$(MANTAGFMT).in
+ mv ntpdc.$(NTPDC_MS)+ ntpdc.$(NTPDC_MS)
+
+###
+
+$(srcdir)/invoke-ntpdc.menu: $(srcdir)/invoke-ntpdc.texi
+ @: do-nothing action to avoid default SCCS get, .menu built with .texi
+
+$(srcdir)/invoke-ntpdc.texi: $(srcdir)/ntpdc-opts.def $(std_def_list)
+ $(run_ag) -Tagtexi-cmd.tpl -DLEVEL=section ntpdc-opts.def
+ $(top_srcdir)/scripts/build/check--help $@
+
+$(srcdir)/ntpdc.html: $(srcdir)/invoke-ntpdc.menu $(srcdir)/invoke-ntpdc.texi $(srcdir)/ntpdc.texi $(top_srcdir)/sntp/include/version.texi
+ cd $(srcdir) && ( makeinfo --force --html --no-split -I ../sntp -o ntpdc.html ntpdc.texi || true )
ntpdc_SOURCES = ntpdc.c ntpdc_ops.c ntpdc-opts.c ntpdc-opts.h
@@ -43,24 +125,27 @@ ntpdc-layout.o: nl.c
layout.here: ntpdc-layout
./ntpdc-layout > $@
-check-layout: ntpdc-layout layout.std layout.here
+check-layout: ntpdc-layout $(srcdir)/layout.std layout.here
cmp $(srcdir)/layout.std layout.here && echo stamp > $@
-$(PROGRAMS): $(LDADD)
-
-../libntp/libntp.a:
- cd ../libntp && $(MAKE)
+$(PROGRAMS): version.o
-$(top_srcdir)/version :
- cd $(top_srcdir) && $(MAKE) version
+$(top_srcdir)/sntp/scm-rev:
+ cd ../sntp && $(MAKE) $(AM_MAKEFLAGS) check-scm-rev
-version.o: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/version
- env CSET=`cat $(top_srcdir)/version` $(top_builddir)/scripts/mkver ntpdc
- $(COMPILE) -c version.c
+version.c: $(ntpdc_OBJECTS) ../libntp/libntp.a Makefile $(top_srcdir)/sntp/scm-rev
+ env CSET=`cat $(top_srcdir)/sntp/scm-rev` $(top_builddir)/scripts/build/mkver ntpdc
+
+version.o: version.c
+ env CCACHE_DISABLE=1 $(COMPILE) -c version.c -o version.o
# I ran nl_in.c (attached, to be installed into ntpdc) through
# $(CC) -E nl_in.c | nl.pl > nl.c
-nl.c: nl_in.c nl.pl Makefile.am
+nl.c: nl_in.c nl.pl Makefile.am ../config.h ../include/ntp_request.h ntpdc.h
$(CC) -E $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(srcdir)/nl_in.c | ./nl.pl > nl.c
-include ../bincheck.mf
+include $(top_srcdir)/bincheck.mf
+include $(top_srcdir)/check-libopts.mf
+include $(top_srcdir)/sntp/check-libntp.mf
+include $(top_srcdir)/depsver.mf
+include $(top_srcdir)/includes.mf
OpenPOWER on IntegriCloud