summaryrefslogtreecommitdiffstats
path: root/third_party/heimdal/cf/Makefile.am.common
blob: 90921fe46b961278f9e645ce034d35ca883aae06 (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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# $Id$

SUFFIXES = .et .h .pc.in .pc

DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include

AM_CPPFLAGS = $(INCLUDES_roken)

if do_roken_rename
ROKEN_RENAME = -DROKEN_RENAME
endif

AM_CFLAGS = $(WFLAGS)

CLANG_FORMAT_STYLE = '{BasedOnStyle: Mozilla, AlwaysBreakAfterReturnType: TopLevelDefinitions, IndentWidth: 4, SortIncludes: false}'

CP	= cp

## set build_HEADERZ to headers that should just be installed in build tree

buildinclude = $(top_builddir)/include

## these aren't detected by automake
LIB_XauReadAuth		= @LIB_XauReadAuth@
LIB_crypt		= @LIB_crypt@
LIB_dbm_firstkey	= @LIB_dbm_firstkey@
LIB_dbopen		= @LIB_dbopen@
LIB_dlopen		= @LIB_dlopen@
LIB_dn_expand		= @LIB_dn_expand@
LIB_el_init		= @LIB_el_init@
LIB_getattr		= @LIB_getattr@
LIB_gethostbyname	= @LIB_gethostbyname@
LIB_getpwent_r		= @LIB_getpwent_r@
LIB_getpwnam_r		= @LIB_getpwnam_r@
LIB_getsockopt		= @LIB_getsockopt@
LIB_odm_initialize	= @LIB_odm_initialize@
LIB_openpty		= @LIB_openpty@
LIB_pidfile		= @LIB_pidfile@
LIB_res_search		= @LIB_res_search@
LIB_setpcred		= @LIB_setpcred@
LIB_setsockopt		= @LIB_setsockopt@
LIB_socket		= @LIB_socket@
LIB_syslog		= @LIB_syslog@
LIB_tgetent		= @LIB_tgetent@
LIB_com_err		= @LIB_com_err@
LIB_door_create		= @LIB_door_create@

LIB_openssl_crypto      = @LIB_openssl_crypto@
INCLUDE_openssl_crypto  = @INCLUDE_openssl_crypto@

INCLUDE_krb4 = @INCLUDE_krb4@
LIB_krb4 = @LIB_krb4@

INCLUDE_openldap = @INCLUDE_openldap@
LIB_openldap = @LIB_openldap@

INCLUDE_readline = @INCLUDE_readline@
LIB_readline = @LIB_readline@

LEXLIB = @LEXLIB@

libexec_heimdaldir = $(libexecdir)/heimdal

install-suid-programs:
	@foo='$(bin_SUIDS)'; \
	for file in $$foo; do \
		x=$(DESTDIR)$(bindir)/$$file; \
		if chown 0:0 $$x && chmod u+s $$x; then :; else \
			echo "*"; \
			echo "* Failed to install $$x setuid root"; \
			echo "*"; \
		fi; \
	done

install-exec-local: install-suid-programs

codesign-all:
	@if [ X"$$CODE_SIGN_IDENTITY" != X ] ; then \
		foo='$(bin_PROGRAMS) $(sbin_PROGRAMS) $(libexec_PROGRAMS)' ; \
		for file in $$foo ; do \
			echo "CODESIGN $$file" ; \
			codesign -f -s "$$CODE_SIGN_IDENTITY" $$file || exit 1 ; \
		done ; \
	fi
	


all-local: codesign-all

install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS) $(noinst_HEADERS)
	@foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(noinst_HEADERS)'; \
	for f in $$foo; do \
		f=`basename $$f`; \
		if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
		else file="$$f"; fi; \
		if cmp -s  $$file $(buildinclude)/$$f 2> /dev/null ; then \
		: ; else \
			echo " $(CP) $$file $(buildinclude)/$$f"; \
			$(CP) $$file $(buildinclude)/$$f || true; \
		fi ; \
	done ; \
	foo='$(nobase_include_HEADERS)'; \
	for f in $$foo; do \
		if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
		else file="$$f"; fi; \
		$(mkdir_p) $(buildinclude)/`dirname $$f` ; \
		if cmp -s  $$file $(buildinclude)/$$f 2> /dev/null ; then \
		: ; else \
			echo " $(CP) $$file $(buildinclude)/$$f"; \
			$(CP) $$file $(buildinclude)/$$f; \
		fi ; \
	done

all-local: install-build-headers

check-local::
	@if test '$(CHECK_LOCAL)' = "no-check-local"; then \
	  foo=''; elif test '$(CHECK_LOCAL)'; then \
	  foo='$(CHECK_LOCAL)'; else \
	  foo='$(PROGRAMS)'; fi; \
	  if test "$$foo"; then \
	  failed=0; all=0; \
	  for i in $$foo; do \
	    all=`expr $$all + 1`; \
	    if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
	      echo "PASS: $$i"; \
	    else \
	      echo "FAIL: $$i"; \
	      failed=`expr $$failed + 1`; \
	    fi; \
	  done; \
	  if test "$$failed" -eq 0; then \
	    banner="All $$all tests passed"; \
	  else \
	    banner="$$failed of $$all tests failed"; \
	  fi; \
	  dashes=`echo "$$banner" | sed s/./=/g`; \
	  echo "$$dashes"; \
	  echo "$$banner"; \
	  echo "$$dashes"; \
	  test "$$failed" -eq 0 || exit 1; \
	fi

SUFFIXES += .x .z

SUFFIXES += .1 .3 .5 .7 .8 .cat1 .cat3 .cat5 .cat7 .cat8

NROFF_MAN = groff -mandoc -Tascii
#NROFF_MAN = nroff -man
.1.cat1:
	$(NROFF_MAN) $< > $@
.3.cat3:
	$(NROFF_MAN) $< > $@
.5.cat5:
	$(NROFF_MAN) $< > $@
.7.cat7:
	$(NROFF_MAN) $< > $@
.8.cat8:
	$(NROFF_MAN) $< > $@

## MAINTAINERCLEANFILES += 

dist-cat1-mans:
	@foo='$(man1_MANS)'; \
	bar='$(man_MANS)'; \
	for i in $$bar; do \
	case $$i in \
	*.1) foo="$$foo $$i";; \
	esac; done ;\
	for i in $$foo; do \
		x=`echo $$i | sed 's/\.[^.]*$$/.cat1/'`; \
		echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
		$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
	done

dist-cat3-mans:
	@foo='$(man3_MANS)'; \
	bar='$(man_MANS)'; \
	for i in $$bar; do \
	case $$i in \
	*.3) foo="$$foo $$i";; \
	esac; done ;\
	for i in $$foo; do \
		x=`echo $$i | sed 's/\.[^.]*$$/.cat3/'`; \
		echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
		$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
	done

dist-cat5-mans:
	@foo='$(man5_MANS)'; \
	bar='$(man_MANS)'; \
	for i in $$bar; do \
	case $$i in \
	*.5) foo="$$foo $$i";; \
	esac; done ;\
	for i in $$foo; do \
		x=`echo $$i | sed 's/\.[^.]*$$/.cat5/'`; \
		echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
		$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
	done

dist-cat7-mans:
	@foo='$(man7_MANS)'; \
	bar='$(man_MANS)'; \
	for i in $$bar; do \
	case $$i in \
	*.7) foo="$$foo $$i";; \
	esac; done ;\
	for i in $$foo; do \
		x=`echo $$i | sed 's/\.[^.]*$$/.cat7/'`; \
		echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
		$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
	done

dist-cat8-mans:
	@foo='$(man8_MANS)'; \
	bar='$(man_MANS)'; \
	for i in $$bar; do \
	case $$i in \
	*.8) foo="$$foo $$i";; \
	esac; done ;\
	for i in $$foo; do \
		x=`echo $$i | sed 's/\.[^.]*$$/.cat8/'`; \
		echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
		$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
	done

dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-cat7-mans dist-cat8-mans

install-cat-mans:
	$(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man7_MANS) $(man8_MANS)

uninstall-cat-mans:
	$(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man7_MANS) $(man8_MANS)

install-data-hook: install-cat-mans
uninstall-hook: uninstall-cat-mans


.et.h:
	$(COMPILE_ET) $<
.et.c:
	$(COMPILE_ET) $<

if NO_AFS
LIB_kafs =
else
LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
endif

if KRB5
LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \
	$(top_builddir)/lib/asn1/libasn1.la
LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
endif

LIB_heimbase = $(top_builddir)/lib/base/libheimbase.la

if DCE
LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
endif

#
# Useful target for debugging
#

check-valgrind:
	tobjdir=`cd $(top_builddir) && pwd` ; \
	tsrcdir=`cd $(top_srcdir) && pwd` ; \
	env TESTS_ENVIRONMENT="$${tsrcdir}/cf/maybe-valgrind.sh -s $${tsrcdir} -o $${tobjdir}" make check

#
# Target to please samba build farm, builds distfiles in-tree.
# Will break when automake changes...
#

distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
	list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
	  if test "$$subdir" != .; then \
	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
	  fi ; \
	done


#silent-rules

heim_verbose = $(heim_verbose_$(V))
heim_verbose_ = $(heim_verbose_$(AM_DEFAULT_VERBOSITY))
heim_verbose_0 = @echo "  GEN    "$@;

if ENABLE_GCOV
AM_CFLAGS += --coverage --no-inline
AM_LDFLAGS = -lgcov
endif