summaryrefslogtreecommitdiffstats
path: root/contrib/ntp/Makefile.am
blob: ed9a546280d04f20dd4e61d7012c03cf96e23059 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
ACLOCAL_AMFLAGS = -I sntp/m4 -I sntp/libevent/m4 -I sntp/libopts/m4

NULL =

# moved sntp first to get libtool and libevent built.

SUBDIRS =		\
	sntp		\
	scripts		\
	include		\
	libntp		\
	libparse	\
	ntpd		\
	ntpdate		\
	ntpdc		\
	ntpq		\
	ntpsnmpd	\
	parseutil	\
	adjtimed	\
	clockstuff	\
	kernel		\
	util		\
	tests		\
	$(NULL)

DISTCHECK_CONFIGURE_FLAGS = -C --with-sntp --enable-local-libevent $(NTP_DCF)

EXTRA_DIST =			\
	$(srcdir)/COPYRIGHT	\
	ChangeLog		\
	CommitLog		\
	CommitLog-4.1.0		\
	NEWS			\
	NOTES.y2kfixes		\
	README.bk		\
	README.hackers		\
	README.leapsmear	\
	README.patches		\
	README.pullrequests	\
	README.refclocks	\
	README.versions		\
	TODO			\
	WHERE-TO-START		\
	bootstrap		\
	build			\
	config.h.in		\
	dot.emacs		\
	flock-build		\
	packageinfo.sh		\
	readme.y2kfixes		\
	results.y2kfixes	\
	\
	conf			\
	html			\
	lib/isc			\
	libjsmn			\
	ports			\
	\
	deps-ver		\
	\
	$(NULL)

CLEANFILES =
DISTCLEANFILES = .gcc-warning

# HMS: Keep .gcc-warning first, as that way it gets printed first.
BUILT_SOURCES =				\
	.gcc-warning			\
	libtool				\
	html/.datecheck			\
	$(srcdir)/COPYRIGHT		\
	$(srcdir)/.checkChangeLog	\
	$(NULL)

.gcc-warning:
	@echo "Compiling with GCC now generates lots of new warnings."
	@echo " "
	@echo "Don't be concerned. They're just warnings."
	@echo " "
	@echo "Don't send bug reports about the warnings, either."
	@echo " "
	@echo "Feel free to send patches that fix these warnings, though."
	@echo " "
	@sleep 1
	@touch $@

html/.datecheck: FRC.html
	cd $(srcdir)/html && \
	../scripts/build/checkHtmlFileDates

libtool: $(LIBTOOL_DEPS)
	./config.status --recheck

sntp/built-sources-only: FRC.sntp
	@cd sntp && $(MAKE) $(AM_MAKEFLAGS) built-sources-only

$(srcdir)/COPYRIGHT: $(srcdir)/html/copyright.html
	{ echo "This file is automatically generated from html/copyright.html" ; \
	  lynx -dump $(srcdir)/html/copyright.html ;} > COPYRIGHT.new \
	&& mv -f COPYRIGHT.new $(srcdir)/COPYRIGHT

COPYRIGHT-please: $(srcdir)/COPYRIGHT
	@: do-nothing action to prevent default \
	   This target is needed by sntp/Makefile.am on decrepit \
	   FreeBSD 6.x make which fails with "make COPYRIGHT" \
	   configured in $(srcdir) but "make ./COPYRIGHT" succeeds. \
	   Rather than determine our $(srcdir) from sntp/Makefile.am \
	   COPYRIGHT-please serves as a fixed target.

$(srcdir)/.checkChangeLog: $(srcdir)/ChangeLog $(srcdir)/scripts/build/checkChangeLog
	cd $(srcdir) && \
	./scripts/build/checkChangeLog

dist-hook:
	@find $(distdir) -type d -name SCCS -print | xargs rm -rf

install-data-local:
	@echo "Installing stand-alone HTML documentation"
	@( cd $(srcdir) && \
		for i in `find html -type d | grep -v SCCS` ; \
		do $(INSTALL) -d $(DESTDIR)$(htmldir)/$$i ; done )
	@( cd $(srcdir) && \
		for i in `find html -type f | grep -v SCCS` ; \
		do $(INSTALL_DATA) $$i $(DESTDIR)$(htmldir)/$$i ; done )

uninstall-local:
		rm -rf $(DESTDIR)$(htmldir)/html

CommitLog: FRC.CommitLog
	cd $(srcdir)					\
	&& $(PATH_TEST) -e CommitLog			\
		-a SCCS/s.ChangeSet -ot CommitLog	\
	|| scripts/build/genCommitLog

# HMS: The following seems to be a work-in-progress...

CVO=`$(srcdir)/sntp/libevent/build-aux/config.guess`

.buildcvo:
	echo "$(CVO)" > .buildcvo

.checkcvo: .buildcvo FRC.checkcvo
	@if [ "`cat .buildcvo`" != "$(CVO)" ];then	\
		echo "This directory was configured for `cat .buildcvo`"; \
		echo "but this machine is a $(CVO)";	\
		exit 1;	\
	fi

BHOST=`(hostname || uname -n)`

.buildhost:
	echo "$(BHOST)" > .buildhost

.checkhost: .buildhost FRC.checkhost
	@if [ "`cat .buildhost`" != "$(BHOST)" ];then	\
		echo "Built on `cat .buildhost` but this is $(BHOST)"; \
		echo " "; \
	fi

FRC.CommitLog FRC.checkcvo FRC.checkhost FRC.distwarn FRC.html FRC.sntp:
	@: do-nothing action prevents any default

# HMS: what was I trying to do with this?
#dot.emacs: FRC.distwarn
OpenPOWER on IntegriCloud