xref: /freebsd/contrib/ntp/Makefile.am (revision d37ea99837e6ad50837fd9fe1771ddf1c3ba6002)
1#AUTOMAKE_OPTIONS = util/ansi2knr foreign dist-tarZ no-dependencies
2AUTOMAKE_OPTIONS = util/ansi2knr foreign
3
4SUBDIRS = \
5	scripts \
6	include \
7	ElectricFence	\
8	librsaref	\
9	libntp	\
10	libparse	\
11	ntpd	\
12	ntpdate	\
13	ntpdc	\
14	ntpq	\
15	ntptrace	\
16	parseutil	\
17	adjtimed	\
18	clockstuff	\
19	kernel	\
20	util
21
22EXTRA_DIST = \
23	COPYRIGHT \
24	ChangeLog \
25	ChangeLog-4.1.0 \
26	NEWS \
27	NOTES.y2kfixes \
28	README.bk \
29	README.cvs \
30	README.des \
31	README.hackers \
32	README.refclocks \
33	README.rsa \
34	README.versions \
35	TODO \
36	WHERE-TO-START \
37	acconfig.h \
38	build \
39	config.guess \
40	config.h.in \
41	config.sub \
42	dot.emacs \
43	excludes \
44	flock-build \
45	install-sh \
46	ntp_update \
47	readme.y2kfixes \
48	results.y2kfixes \
49	conf \
50	html \
51	ports \
52	version
53
54DISTCLEANFILES = .warning
55
56#ETAGS_ARGS = $(srcdir)/Makefile.am $(srcdir)/configure.in
57ETAGS_ARGS = Makefile.am configure.in acconfig.h
58
59# HMS: make ports be the last directory...
60# DIST_HOOK_DIRS = conf html scripts ports
61
62# HMS: Keep .warning first, as that way it gets printed first.
63BUILT_SOURCES = .warning $(srcdir)/COPYRIGHT $(srcdir)/version
64
65$(srcdir)/COPYRIGHT: html/copyright.htm
66	( echo "This file is automatically generated from html/copyright.htm" ; lynx -dump $(srcdir)/html/copyright.htm ) > $(srcdir)/COPYRIGHT.new && mv $(srcdir)/COPYRIGHT.new $(srcdir)/COPYRIGHT
67
68# HMS: The next bit is still suboptimal.  If bk is present but this NTP
69# repo is not a bk repo, we'll get an error message from the prs command.
70# Unfortunately, I haven't found the necessary magic to redirect this error
71# output to /dev/null under ancient/unique shells like the one Ultrix uses.
72# We'll also get an error of srcdir or version is unwritable.
73$(srcdir)/version: FRC.version
74	-(bk version) >/dev/null 2>&1 && \
75	    cd $(srcdir) && \
76            x=`bk -R prs -hr+ -nd:I: ChangeSet` && \
77	    case "$$x" in '') ;; *) echo $$x > version ;; esac
78
79dist-hook:
80	@find $(distdir) -type d -name CVS -print | xargs rm -rf
81	@find $(distdir) -type d -name SCCS -print | xargs rm -rf
82	@for i in `find $(distdir)/ports/winnt -type f -name '*.ds*' -print`; \
83	   do chmod u+w $$i ; unix2dos $$i $$i; done
84
85.warning:
86	@echo "Compiling with GCC now generates lots of new warnings."
87	@echo " "
88	@echo "Don't be concerned. They're just warnings."
89	@echo " "
90	@echo "Don't send bug reports about the warnings, either."
91	@echo " "
92	@echo "Feel free to send patches that fix these warnings, though."
93	@echo " "
94	@sleep 1
95	@touch .warning
96
97# HMS: The following seems to be a work-in-progress...
98
99CVO=`$(srcdir)/config.guess`
100
101.buildcvo:
102	echo "$(CVO)" > .buildcvo
103
104.checkcvo: .buildcvo FRC.checkcvo
105	@if [ "`cat .buildcvo`" != "$(CVO)" ];then	\
106		echo "This directory was configured for `cat .buildcvo`"; \
107		echo "but this machine is a $(CVO)";	\
108		exit 1;	\
109	fi
110
111BHOST=`(hostname || uname -n)`
112
113.buildhost:
114	echo "$(BHOST)" > .buildhost
115
116.checkhost: .buildhost FRC.checkhost
117	@if [ "`cat .buildhost`" != "$(BHOST)" ];then	\
118		echo "Built on `cat .buildhost` but this is $(BHOST)"; \
119		echo " "; \
120	fi
121
122FRC.distwarn FRC.checkcvo FRC.checkhost FRC.version:
123
124# HMS: what was I trying to do with this?
125#dot.emacs: FRC.distwarn
126