xref: /netbsd-src/external/bsd/ntp/dist/Makefile.am (revision 46f5119e40af2e51998f686b2fdcc76b5488f7f3)
1#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
2AUTOMAKE_OPTIONS = foreign 1.10
3ACLOCAL_AMFLAGS= -I m4 -I libopts/m4
4
5NULL=
6
7SUBDIRS=
8SUBDIRS+= 		\
9	scripts 	\
10	include 	\
11	ElectricFence	\
12	$(NULL)
13if NEED_LIBOPTS
14SUBDIRS+= libopts
15endif
16SUBDIRS+= 		\
17	@ARLIB_DIR@ 	\
18	libntp		\
19	libparse	\
20	ntpd		\
21	ntpdate		\
22	ntpdc		\
23	ntpq		\
24	ntpsnmpd	\
25	parseutil	\
26	adjtimed	\
27	clockstuff	\
28	kernel		\
29	sntp		\
30	util		\
31	$(NULL)
32
33DIST_SUBDIRS=		\
34	scripts		\
35	include		\
36	ElectricFence	\
37	arlib		\
38	libntp		\
39	libopts		\
40	libparse	\
41	ntpd		\
42	ntpdate		\
43	ntpdc		\
44	ntpq		\
45	ntpsnmpd	\
46	parseutil	\
47	adjtimed	\
48	clockstuff	\
49	kernel		\
50	sntp		\
51	util		\
52	$(NULL)
53
54DISTCHECK_CONFIGURE_FLAGS=	-C --with-arlib --enable-local-libopts
55
56EXTRA_DIST =			\
57	COPYRIGHT		\
58	ChangeLog		\
59	CommitLog		\
60	CommitLog-4.1.0		\
61	NEWS			\
62	NOTES.y2kfixes		\
63	README.bk		\
64	README.hackers		\
65	README.patches		\
66	README.refclocks	\
67	README.versions		\
68	TODO			\
69	WHERE-TO-START		\
70	bootstrap		\
71	build			\
72	config.guess		\
73	config.h.in		\
74	config.sub		\
75	dot.emacs		\
76	excludes		\
77	flock-build		\
78	install-sh		\
79	packageinfo.sh		\
80	readme.y2kfixes		\
81	results.y2kfixes	\
82	\
83	conf			\
84	html			\
85	lib/isc			\
86	ports			\
87	\
88	bincheck.mf		\
89	depsver.mf		\
90	deps-ver		\
91	version			\
92	version.m4		\
93	\
94	$(NULL)
95
96CLEANFILES =
97DISTCLEANFILES = .gcc-warning
98
99ETAGS_ARGS = Makefile.am configure.ac
100
101# HMS: make ports be the last directory...
102# DIST_HOOK_DIRS = conf html scripts ports
103
104# HMS: Keep .gcc-warning first, as that way it gets printed first.
105BUILT_SOURCES =				\
106	.gcc-warning			\
107	libtool				\
108	$(srcdir)/COPYRIGHT		\
109	$(srcdir)/version		\
110	$(srcdir)/version.m4		\
111	$(srcdir)/include/version.def	\
112	$(srcdir)/include/version.texi	\
113	$(NULL)
114
115$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
116	( echo "This file is automatically generated from html/copyright.html" ; lynx -dump $(srcdir)/html/copyright.html ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
117
118# HMS: The next bit is still suboptimal.  If bk is present but this NTP
119# repo is not a bk repo, we'll get an error message from the prs command.
120# Unfortunately, I haven't found the necessary magic to redirect this error
121# output to /dev/null under ancient/unique shells like the one Ultrix uses.
122# We'll also get an error if srcdir or version is unwritable.
123$(srcdir)/version: FRC.version
124	-(bk version) >/dev/null 2>&1 && \
125	    cd $(srcdir) && \
126	    x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
127	    y=`cat version 2>/dev/null` || true && \
128	    case "$$x" in ''|$$y) ;; *) echo $$x > version ;; esac
129
130$(srcdir)/version.m4: $(srcdir)/packageinfo.sh
131	cd $(srcdir) && \
132	./scripts/genver version.m4
133
134$(srcdir)/include/version.def: $(srcdir)/packageinfo.sh
135	cd $(srcdir) && \
136	./scripts/genver include/version.def
137
138$(srcdir)/include/version.texi: $(srcdir)/packageinfo.sh
139	cd $(srcdir) && \
140	./scripts/genver include/version.texi
141
142libtool: $(LIBTOOL_DEPS)
143	./config.status --recheck
144
145dist-hook:
146	@find $(distdir) -type d -name SCCS -print | xargs rm -rf
147	@chmod u+w $(distdir)/ports/winnt
148
149.gcc-warning:
150	@echo "Compiling with GCC now generates lots of new warnings."
151	@echo " "
152	@echo "Don't be concerned. They're just warnings."
153	@echo " "
154	@echo "Don't send bug reports about the warnings, either."
155	@echo " "
156	@echo "Feel free to send patches that fix these warnings, though."
157	@echo " "
158	@sleep 1
159	@touch $@
160
161CommitLog: FRC.CommitLog
162	cd $(srcdir)					\
163	&& /bin/test -e CommitLog			\
164		-a SCCS/s.ChangeSet -ot CommitLog	\
165	|| scripts/genCommitLog
166
167# HMS: The following seems to be a work-in-progress...
168
169CVO=`$(srcdir)/config.guess`
170
171.buildcvo:
172	echo "$(CVO)" > .buildcvo
173
174.checkcvo: .buildcvo FRC.checkcvo
175	@if [ "`cat .buildcvo`" != "$(CVO)" ];then	\
176		echo "This directory was configured for `cat .buildcvo`"; \
177		echo "but this machine is a $(CVO)";	\
178		exit 1;	\
179	fi
180
181BHOST=`(hostname || uname -n)`
182
183.buildhost:
184	echo "$(BHOST)" > .buildhost
185
186.checkhost: .buildhost FRC.checkhost
187	@if [ "`cat .buildhost`" != "$(BHOST)" ];then	\
188		echo "Built on `cat .buildhost` but this is $(BHOST)"; \
189		echo " "; \
190	fi
191
192FRC.CommitLog FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
193
194# HMS: what was I trying to do with this?
195#dot.emacs: FRC.distwarn
196