xref: /freebsd/contrib/ntp/Makefile.am (revision 2008043f386721d58158e37e0d7e50df8095942d)
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	libjsmn			\
56	ports			\
57	\
58	deps-ver		\
59	\
60	$(NULL)
61
62CLEANFILES =
63DISTCLEANFILES = .gcc-warning
64
65# HMS: Keep .gcc-warning first, as that way it gets printed first.
66BUILT_SOURCES =				\
67	.gcc-warning			\
68	libtool				\
69	html/.datecheck			\
70	$(srcdir)/COPYRIGHT		\
71	$(srcdir)/.checkChangeLog	\
72	$(NULL)
73
74.gcc-warning:
75	@echo "Compiling with GCC now generates lots of new warnings."
76	@echo " "
77	@echo "Don't be concerned. They're just warnings."
78	@echo " "
79	@echo "Don't send bug reports about the warnings, either."
80	@echo " "
81	@echo "Feel free to send patches that fix these warnings, though."
82	@echo " "
83	@sleep 1
84	@touch $@
85
86html/.datecheck: FRC.html
87	cd $(srcdir)/html && \
88	../scripts/build/checkHtmlFileDates
89
90libtool: $(LIBTOOL_DEPS)
91	./config.status --recheck
92
93sntp/built-sources-only: FRC.sntp
94	@cd sntp && $(MAKE) $(AM_MAKEFLAGS) built-sources-only
95
96$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
97	{ echo "This file is automatically generated from html/copyright.html" ; \
98	  lynx -dump $(srcdir)/html/copyright.html ;} > COPYRIGHT.new \
99	&& mv -f COPYRIGHT.new $(srcdir)/COPYRIGHT
100
101COPYRIGHT-please: $(srcdir)/COPYRIGHT
102	@: do-nothing action to prevent default \
103	   This target is needed by sntp/Makefile.am on decrepit \
104	   FreeBSD 6.x make which fails with "make COPYRIGHT" \
105	   configured in $(srcdir) but "make ./COPYRIGHT" succeeds. \
106	   Rather than determine our $(srcdir) from sntp/Makefile.am \
107	   COPYRIGHT-please serves as a fixed target.
108
109$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/build/checkChangeLog
110	cd $(srcdir) && \
111	./scripts/build/checkChangeLog
112
113dist-hook:
114	@find $(distdir) -type d -name SCCS -print | xargs rm -rf
115
116install-data-local:
117	@echo "Installing stand-alone HTML documentation"
118	@( cd $(srcdir) && \
119		for i in `find html -type d | grep -v SCCS` ; \
120		do $(INSTALL) -d $(DESTDIR)$(htmldir)/$$i ; done )
121	@( cd $(srcdir) && \
122		for i in `find html -type f | grep -v SCCS` ; \
123		do $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; done )
124
125uninstall-local:
126		rm -rf $(DESTDIR)$(htmldir)/html
127
128CommitLog: FRC.CommitLog
129	cd $(srcdir)					\
130	&& $(PATH_TEST) -e CommitLog			\
131		-a SCCS/s.ChangeSet -ot CommitLog	\
132	|| scripts/build/genCommitLog
133
134# HMS: The following seems to be a work-in-progress...
135
136CVO=`$(srcdir)/sntp/libevent/build-aux/config.guess`
137
138.buildcvo:
139	echo "$(CVO)" > .buildcvo
140
141.checkcvo: .buildcvo FRC.checkcvo
142	@if [ "`cat .buildcvo`" != "$(CVO)" ];then	\
143		echo "This directory was configured for `cat .buildcvo`"; \
144		echo "but this machine is a $(CVO)";	\
145		exit 1;	\
146	fi
147
148BHOST=`(hostname || uname -n)`
149
150.buildhost:
151	echo "$(BHOST)" > .buildhost
152
153.checkhost: .buildhost FRC.checkhost
154	@if [ "`cat .buildhost`" != "$(BHOST)" ];then	\
155		echo "Built on `cat .buildhost` but this is $(BHOST)"; \
156		echo " "; \
157	fi
158
159FRC.CommitLog FRC.checkcvo FRC.checkhost FRC.distwarn FRC.html FRC.sntp:
160	@: do-nothing action prevents any default
161
162# HMS: what was I trying to do with this?
163#dot.emacs: FRC.distwarn
164