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