Sync usage with man page.
[netbsd-mini2440.git] / crypto / dist / heimdal / cf / Makefile.am.common
bloba5500db6902a9a151b898bd29d931b07dc7db3b6
1 # $Heimdal: Makefile.am.common 22488 2008-01-21 11:47:22Z lha $
2 # $NetBSD$
4 SUFFIXES = .et .h
6 AM_CPPFLAGS = -I$(top_builddir)/include $(INCLUDES_roken)
8 if do_roken_rename
9 ROKEN_RENAME = -DROKEN_RENAME
10 endif
12 AM_CFLAGS = $(WFLAGS)
14 CP      = cp
16 ## set build_HEADERZ to headers that should just be installed in build tree
18 buildinclude = $(top_builddir)/include
20 ## these aren't detected by automake
21 LIB_XauReadAuth         = @LIB_XauReadAuth@
22 LIB_crypt               = @LIB_crypt@
23 LIB_dbm_firstkey        = @LIB_dbm_firstkey@
24 LIB_dbopen              = @LIB_dbopen@
25 LIB_dlopen              = @LIB_dlopen@
26 LIB_dn_expand           = @LIB_dn_expand@
27 LIB_el_init             = @LIB_el_init@
28 LIB_getattr             = @LIB_getattr@
29 LIB_gethostbyname       = @LIB_gethostbyname@
30 LIB_getpwent_r          = @LIB_getpwent_r@
31 LIB_getpwnam_r          = @LIB_getpwnam_r@
32 LIB_getsockopt          = @LIB_getsockopt@
33 LIB_logout              = @LIB_logout@
34 LIB_logwtmp             = @LIB_logwtmp@
35 LIB_odm_initialize      = @LIB_odm_initialize@
36 LIB_openpty             = @LIB_openpty@
37 LIB_pidfile             = @LIB_pidfile@
38 LIB_res_search          = @LIB_res_search@
39 LIB_setpcred            = @LIB_setpcred@
40 LIB_setsockopt          = @LIB_setsockopt@
41 LIB_socket              = @LIB_socket@
42 LIB_syslog              = @LIB_syslog@
43 LIB_tgetent             = @LIB_tgetent@
44 LIB_com_err             = @LIB_com_err@
45 LIB_door_create         = @LIB_door_create@
47 HESIODLIB = @HESIODLIB@
48 HESIODINCLUDE = @HESIODINCLUDE@
49 INCLUDE_hesiod = @INCLUDE_hesiod@
50 LIB_hesiod = @LIB_hesiod@
52 INCLUDE_krb4 = @INCLUDE_krb4@
53 LIB_krb4 = @LIB_krb4@
55 INCLUDE_openldap = @INCLUDE_openldap@
56 LIB_openldap = @LIB_openldap@
58 INCLUDE_readline = @INCLUDE_readline@
59 LIB_readline = @LIB_readline@
61 LEXLIB = @LEXLIB@
63 install-suid-programs:
64         @foo='$(bin_SUIDS)'; \
65         for file in $$foo; do \
66         x=$(DESTDIR)$(bindir)/$$file; \
67         if chown 0:0 $$x && chmod u+s $$x; then :; else \
68         echo "*"; \
69         echo "* Failed to install $$x setuid root"; \
70         echo "*"; \
71         fi; done
73 install-exec-hook: install-suid-programs
75 install-build-headers:: $(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ) $(nobase_include_HEADERS)
76         @foo='$(include_HEADERS) $(dist_include_HEADERS) $(nodist_include_HEADERS) $(build_HEADERZ)'; \
77         for f in $$foo; do \
78                 f=`basename $$f`; \
79                 if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
80                 else file="$$f"; fi; \
81                 if cmp -s  $$file $(buildinclude)/$$f 2> /dev/null ; then \
82                 : ; else \
83                         echo " $(CP) $$file $(buildinclude)/$$f"; \
84                         $(CP) $$file $(buildinclude)/$$f; \
85                 fi ; \
86         done ; \
87         foo='$(nobase_include_HEADERS)'; \
88         for f in $$foo; do \
89                 if test -f "$(srcdir)/$$f"; then file="$(srcdir)/$$f"; \
90                 else file="$$f"; fi; \
91                 $(mkdir_p) $(buildinclude)/`dirname $$f` ; \
92                 if cmp -s  $$file $(buildinclude)/$$f 2> /dev/null ; then \
93                 : ; else \
94                         echo " $(CP) $$file $(buildinclude)/$$f"; \
95                         $(CP) $$file $(buildinclude)/$$f; \
96                 fi ; \
97         done
99 all-local: install-build-headers
101 check-local::
102         @if test '$(CHECK_LOCAL)' = "no-check-local"; then \
103           foo=''; elif test '$(CHECK_LOCAL)'; then \
104           foo='$(CHECK_LOCAL)'; else \
105           foo='$(PROGRAMS)'; fi; \
106           if test "$$foo"; then \
107           failed=0; all=0; \
108           for i in $$foo; do \
109             all=`expr $$all + 1`; \
110             if (./$$i --version && ./$$i --help) > /dev/null 2>&1; then \
111               echo "PASS: $$i"; \
112             else \
113               echo "FAIL: $$i"; \
114               failed=`expr $$failed + 1`; \
115             fi; \
116           done; \
117           if test "$$failed" -eq 0; then \
118             banner="All $$all tests passed"; \
119           else \
120             banner="$$failed of $$all tests failed"; \
121           fi; \
122           dashes=`echo "$$banner" | sed s/./=/g`; \
123           echo "$$dashes"; \
124           echo "$$banner"; \
125           echo "$$dashes"; \
126           test "$$failed" -eq 0 || exit 1; \
127         fi
129 SUFFIXES += .x .z
131 .x.c:
132         @cmp -s $< $@ 2> /dev/null || cp $< $@
134 SUFFIXES += .1 .3 .5 .8 .cat1 .cat3 .cat5 .cat8
136 NROFF_MAN = groff -mandoc -Tascii
137 #NROFF_MAN = nroff -man
138 .1.cat1:
139         $(NROFF_MAN) $< > $@
140 .3.cat3:
141         $(NROFF_MAN) $< > $@
142 .5.cat5:
143         $(NROFF_MAN) $< > $@
144 .8.cat8:
145         $(NROFF_MAN) $< > $@
147 ## MAINTAINERCLEANFILES += 
149 dist-cat1-mans:
150         @foo='$(man1_MANS)'; \
151         bar='$(man_MANS)'; \
152         for i in $$bar; do \
153         case $$i in \
154         *.1) foo="$$foo $$i";; \
155         esac; done ;\
156         for i in $$foo; do \
157                 x=`echo $$i | sed 's/\.[^.]*$$/.cat1/'`; \
158                 echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
159                 $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
160         done
162 dist-cat3-mans:
163         @foo='$(man3_MANS)'; \
164         bar='$(man_MANS)'; \
165         for i in $$bar; do \
166         case $$i in \
167         *.3) foo="$$foo $$i";; \
168         esac; done ;\
169         for i in $$foo; do \
170                 x=`echo $$i | sed 's/\.[^.]*$$/.cat3/'`; \
171                 echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
172                 $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
173         done
175 dist-cat5-mans:
176         @foo='$(man5_MANS)'; \
177         bar='$(man_MANS)'; \
178         for i in $$bar; do \
179         case $$i in \
180         *.5) foo="$$foo $$i";; \
181         esac; done ;\
182         for i in $$foo; do \
183                 x=`echo $$i | sed 's/\.[^.]*$$/.cat5/'`; \
184                 echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
185                 $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
186         done
188 dist-cat8-mans:
189         @foo='$(man8_MANS)'; \
190         bar='$(man_MANS)'; \
191         for i in $$bar; do \
192         case $$i in \
193         *.8) foo="$$foo $$i";; \
194         esac; done ;\
195         for i in $$foo; do \
196                 x=`echo $$i | sed 's/\.[^.]*$$/.cat8/'`; \
197                 echo "$(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x"; \
198                 $(NROFF_MAN) $(srcdir)/$$i > $(distdir)/$$x; \
199         done
201 dist-hook: dist-cat1-mans dist-cat3-mans dist-cat5-mans dist-cat8-mans
203 install-cat-mans:
204         $(SHELL) $(top_srcdir)/cf/install-catman.sh install "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
206 uninstall-cat-mans:
207         $(SHELL) $(top_srcdir)/cf/install-catman.sh uninstall "$(INSTALL_DATA)" "$(mkinstalldirs)" "$(srcdir)" "$(DESTDIR)$(mandir)" '$(CATMANEXT)' $(man_MANS) $(man1_MANS) $(man3_MANS) $(man5_MANS) $(man8_MANS)
209 install-data-hook: install-cat-mans
210 uninstall-hook: uninstall-cat-mans
213 .et.h:
214         $(COMPILE_ET) $<
215 .et.c:
216         $(COMPILE_ET) $<
218 LIB_kafs = $(top_builddir)/lib/kafs/libkafs.la $(AIX_EXTRA_KAFS)
220 if KRB5
221 LIB_krb5 = $(top_builddir)/lib/krb5/libkrb5.la \
222         $(top_builddir)/lib/asn1/libasn1.la
223 LIB_gssapi = $(top_builddir)/lib/gssapi/libgssapi.la
224 LIB_tsasl = $(top_builddir)/lib/tsasl/libtsasl.la
225 endif
227 if DCE
228 LIB_kdfs = $(top_builddir)/lib/kdfs/libkdfs.la
229 endif
232 # Useful target for debugging
235 check-valgrind:
236         tobjdir=`cd $(top_builddir) && pwd` ; \
237         tsrcdir=`cd $(top_srcdir) && pwd` ; \
238         env TESTS_ENVIRONMENT="$${tobjdir}/libtool --mode execute valgrind --leak-check=full --trace-children=yes --quiet -q --num-callers=30 --suppressions=$${tsrcdir}/cf/valgrind-suppressions" make check
241 # Target to please samba build farm, builds distfiles in-tree.
242 # Will break when automake changes...
245 distdir-in-tree: $(DISTFILES) $(INFO_DEPS)
246         list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
247           if test "$$subdir" != .; then \
248           (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) distdir-in-tree) ; \
249           fi ; \
250         done