xref: /freebsd/contrib/ntp/Makefile.am (revision b9cbd68d1cbbb21eade18182a797d5fa7d0dc110)
1ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4
2
3NULL =
4
5# moved sntp first to get libtool and libevent built.
6
7SUBDIRS =		\
8	scripts		\
9	include		\
10	libntp		\
11	sntp		\
12	libparse	\
13	ntpd		\
14	ntpdate		\
15	ntpdc		\
16	ntpq		\
17	ntpsnmpd	\
18	parseutil	\
19	adjtimed	\
20	clockstuff	\
21	kernel		\
22	util		\
23	tests		\
24	$(NULL)
25
26DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp --enable-local-libevent $(NTP_DCF)
27
28EXTRA_DIST =			\
29	$(srcdir)/COPYRIGHT	\
30	ChangeLog		\
31	CommitLog		\
32	CommitLog-4.1.0		\
33	NEWS			\
34	NOTES.y2kfixes		\
35	README.bk		\
36	README.hackers		\
37	README.leapsmear	\
38	README.patches		\
39	README.pullrequests	\
40	README.refclocks	\
41	README.versions		\
42	TODO			\
43	WHERE-TO-START		\
44	bootstrap		\
45	build			\
46	config.h.in		\
47	dot.emacs		\
48	flock-build		\
49	packageinfo.sh		\
50	readme.y2kfixes		\
51	results.y2kfixes	\
52	\
53	conf			\
54	html			\
55	lib/isc			\
56	libjsmn			\
57	ports			\
58	\
59	deps-ver		\
60	\
61	$(NULL)
62
63CLEANFILES =
64DISTCLEANFILES = .gcc-warning
65
66# HMS: Keep .gcc-warning first, as that way it gets printed first.
67BUILT_SOURCES =				\
68	.gcc-warning			\
69	libtool				\
70	html/.datecheck			\
71	$(srcdir)/COPYRIGHT		\
72	$(srcdir)/.checkChangeLog	\
73	$(NULL)
74
75.gcc-warning:
76	@echo "Compiling with GCC now generates lots of new warnings."
77	@echo " "
78	@echo "Don't be concerned. They're just warnings."
79	@echo " "
80	@echo "Don't send bug reports about the warnings, either."
81	@echo " "
82	@echo "Feel free to send patches that fix these warnings, though."
83	@echo " "
84	@sleep 1
85	@touch $@
86
87html/.datecheck: FRC.html
88	cd $(srcdir)/html && \
89	../scripts/build/checkHtmlFileDates
90
91libtool: $(LIBTOOL_DEPS)
92	./config.status --recheck
93
94sntp/built-sources-only: FRC.sntp
95	@cd sntp && $(MAKE) $(AM_MAKEFLAGS) built-sources-only
96
97$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
98	{ echo "This file is automatically generated from html/copyright.html" ; \
99	  lynx -dump $(srcdir)/html/copyright.html ;} > COPYRIGHT.new \
100	&& mv -f COPYRIGHT.new $(srcdir)/COPYRIGHT
101
102COPYRIGHT-please: $(srcdir)/COPYRIGHT
103	@: do-nothing action to prevent default \
104	   This target is needed by sntp/Makefile.am on decrepit \
105	   FreeBSD 6.x make which fails with "make COPYRIGHT" \
106	   configured in $(srcdir) but "make ./COPYRIGHT" succeeds. \
107	   Rather than determine our $(srcdir) from sntp/Makefile.am \
108	   COPYRIGHT-please serves as a fixed target.
109
110$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/build/checkChangeLog
111	cd $(srcdir) && \
112	./scripts/build/checkChangeLog
113
114dist-hook:
115	@find $(distdir) -type d -name SCCS -print | xargs rm -rf
116
117install-data-local:
118	@echo "Installing stand-alone HTML documentation"
119	@( cd $(srcdir) && \
120		for i in `find html -type d | grep -v SCCS` ; \
121		do $(INSTALL) -d $(DESTDIR)$(htmldir)/$$i ; done )
122	@( cd $(srcdir) && \
123		for i in `find html -type f | grep -v SCCS` ; \
124		do $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; done )
125
126uninstall-local:
127		rm -rf $(DESTDIR)$(htmldir)/html
128
129CommitLog: FRC.CommitLog
130	cd $(srcdir)					\
131	&& $(PATH_TEST) -e CommitLog			\
132		-a SCCS/s.ChangeSet -ot CommitLog	\
133	|| scripts/build/genCommitLog
134
135# HMS: The following seems to be a work-in-progress...
136
137CVO=`$(srcdir)/sntp/libevent/build-aux/config.guess`
138
139.buildcvo:
140	echo "$(CVO)" > .buildcvo
141
142.checkcvo: .buildcvo FRC.checkcvo
143	@if [ "`cat .buildcvo`" != "$(CVO)" ];then	\
144		echo "This directory was configured for `cat .buildcvo`"; \
145		echo "but this machine is a $(CVO)";	\
146		exit 1;	\
147	fi
148
149BHOST=`(hostname || uname -n)`
150
151.buildhost:
152	echo "$(BHOST)" > .buildhost
153
154.checkhost: .buildhost FRC.checkhost
155	@if [ "`cat .buildhost`" != "$(BHOST)" ];then	\
156		echo "Built on `cat .buildhost` but this is $(BHOST)"; \
157		echo " "; \
158	fi
159
160FRC.CommitLog FRC.checkcvo FRC.checkhost FRC.distwarn FRC.html FRC.sntp:
161	@: do-nothing action prevents any default
162
163# HMS: what was I trying to do with this?
164#dot.emacs: FRC.distwarn
165