* Makefile.in: Add $(datadir) to INSTALLMKDIRS for util/et
[krb5.git] / src / Makefile.in
1 datadir=@datadir@
2
3 thisconfigdir=.
4 myfulldir=.
5 mydir=.
6 MY_SUBDIRS=util include lib @krb524@ kdc kadmin slave clients appl tests \
7         config-files gen-manpages
8 BUILDTOP=$(REL)$(C)
9 LOCALINCLUDES = -I$(srcdir) 
10
11 SRCS =  
12 HDRS = 
13
14 DISTFILES = $(SRCS) $(HDRS) COPYING COPYING.LIB ChangeLog Makefile.in
15
16 all-unix::
17
18 all-mac::
19
20 all-windows:: maybe-awk Makefile-windows
21         @echo Making in util
22         cd util
23         $(MAKE) -$(MFLAGS)
24         @echo Making in include
25         cd ..\include
26         $(MAKE) -$(MFLAGS) 
27         @echo Making in lib
28         cd ..\lib
29         $(MAKE) -$(MFLAGS) 
30         @echo Making in windows
31         cd ..\windows
32         $(MAKE) -$(MFLAGS) 
33         @echo Making in clients
34         cd ..\clients
35         $(MAKE) -$(MFLAGS)
36         @echo Making in appl\gss-sample
37         cd ..\appl\gss-sample
38         $(MAKE) -$(MFLAGS)
39         cd ..\..
40
41 world::
42         date
43         make $(MFLAGS) all
44         date
45
46 INSTALLMKDIRS = $(KRB5ROOT) $(KRB5MANROOT) $(KRB5OTHERMKDIRS) \
47                 $(ADMIN_BINDIR) $(SERVER_BINDIR) $(CLIENT_BINDIR) \
48                 $(ADMIN_MANDIR) $(SERVER_MANDIR) $(CLIENT_MANDIR) \
49                 $(FILE_MANDIR) $(KRB5_LIBDIR) $(KRB5_INCDIR) \
50                 $(KRB5_INCSUBDIRS) $(datadir)
51
52 install-recurse: install-mkdirs
53
54 install-mkdirs:
55         @for i in $(INSTALLMKDIRS); do \
56                 $(srcdir)/config/mkinstalldirs $(DESTDIR)$$i; \
57         done
58
59 # install::
60 #       $(MAKE) $(MFLAGS) install.man
61
62 TAGS: $(SRCS)
63         etags $(SRCS)
64
65 clean-:: clean-windows
66 clean-mac:: clean-unix
67 clean-unix::
68         $(RM) *.o core
69
70 mostlyclean: clean
71
72 # This doesn't work; if you think you need it, you should use a
73 # separate build directory.
74
75 # distclean: clean
76 #       rm -f Makefile config.status
77
78 # realclean: distclean
79 #       rm -f TAGS
80
81 dist: $(DISTFILES)
82         echo cpio-`sed -e '/version_string/!d' \
83         -e 's/[^0-9.]*\([0-9.]*\).*/\1/' -e q version.c` > .fname
84         rm -rf `cat .fname`
85         mkdir `cat .fname`
86         -ln $(DISTFILES) `cat .fname`
87         for file in $(DISTFILES); do \
88           test -r `cat .fname`/$$file || cp -p $$file `cat .fname`; \
89         done
90         tar chzf `cat .fname`.tar.gz `cat .fname`
91         rm -rf `cat .fname` .fname
92
93 GZIPPROG= gzip -9v
94 PKGDIR=`pwd`/pkgdir
95 pkgdir:
96         if test ! -d $(PKGDIR); then mkdir $(PKGDIR); else true; fi
97 tgz-bin: pkgdir
98         rm -rf $(PKGDIR)/install cns5-bin.tgz
99         mkdir $(PKGDIR)/install
100         $(MAKE) install DESTDIR=$(PKGDIR)/install
101         (cd $(PKGDIR)/install && tar cf - usr/cygnus) | $(GZIPPROG) > cns5-bin.tgz
102         rm -rf $(PKGDIR)/install
103
104 # Macintosh build process...
105
106 # Build all things for the Mac build, which need to be built on
107 # Unix first.
108 unixmac:
109         (cd lib/krb5/error_tables; make -f Makefile.in unixmac)
110         (cd lib/gssapi/generic; make -f Makefile.in unixmac)
111
112
113 # Microsoft Windows build process...
114 #
115
116 config-windows:: Makefile-windows
117 #       @echo Making in include
118 #       cd include
119 #       $(MAKE) -$(MFLAGS)
120 #       cd ..
121
122 #
123 # We need outpre-dir explicitly in here because we may
124 # try to build wconfig on a config-windows.
125 #
126 ##DOS##$(WCONFIG_EXE): outpre-dir wconfig.c
127 ##DOS## $(CC) -Fe$@ -Fo$*.obj wconfig.c
128
129 ##DOS##MKFDEP=$(WCONFIG_EXE) config\win-pre.in config\win-post.in
130
131 WINMAKEFILES=Makefile \
132         appl\gss-sample\Makefile \
133         clients\Makefile clients\kdestroy\Makefile \
134         clients\kinit\Makefile clients\klist\Makefile \
135         clients\kpasswd\Makefile clients\kvno\Makefile \
136         include\Makefile include\krb5\Makefile \
137         krb524\Makefile \
138         lib\Makefile lib\crypto\Makefile \
139         lib\crypto\crc32\Makefile lib\crypto\des\Makefile \
140         lib\crypto\dk\Makefile lib\crypto\enc_provider\Makefile \
141         lib\crypto\hash_provider\Makefile \
142         lib\crypto\keyhash_provider\Makefile \
143         lib\crypto\raw\Makefile lib\crypto\old\Makefile \
144         lib\crypto\sha1\Makefile \
145         lib\crypto\md4\Makefile lib\crypto\md5\Makefile \
146         lib\des425\Makefile \
147         lib\gssapi\Makefile lib\gssapi\generic\Makefile \
148         lib\gssapi\krb5\Makefile lib\gssapi\mechglue\Makefile \
149         lib\krb4\Makefile lib\krb5\Makefile \
150         lib\krb5\asn.1\Makefile lib\krb5\ccache\Makefile \
151         lib\krb5\ccache\ccapi\Makefile \
152         lib\krb5\error_tables\Makefile \
153         lib\krb5\keytab\Makefile \
154         lib\krb5\keytab\file\Makefile \
155         lib\krb5\keytab\srvtab\Makefile \
156         lib\krb5\krb\Makefile \
157         lib\krb5\os\Makefile lib\krb5\posix\Makefile \
158         lib\krb5\rcache\Makefile \
159         util\Makefile \
160         util\et\Makefile util\profile\Makefile \
161         util\windows\Makefile \
162         windows\Makefile windows\lib\Makefile \
163         windows\cns\Makefile windows\gina\Makefile \
164         windows\gss\Makefile windows\ms2mit\Makefile \
165         windows\wintel\Makefile
166
167 ##DOS##Makefile-windows:: $(MKFDEP) $(WINMAKEFILES)
168
169 ##DOS##Makefile: Makefile.in $(MKFDEP)
170 ##DOS## $(WCONFIG) config < $@.in > $@
171 ##DOS##appl\gss-sample\Makefile: appl\gss-sample\Makefile.in $(MKFDEP)
172 ##DOS## $(WCONFIG) config < $@.in > $@
173 ##DOS##clients\Makefile: clients\Makefile.in $(MKFDEP)
174 ##DOS## $(WCONFIG) config < $@.in > $@
175 ##DOS##clients\kdestroy\Makefile: clients\kdestroy\Makefile.in $(MKFDEP)
176 ##DOS## $(WCONFIG) config < $@.in > $@
177 ##DOS##clients\kinit\Makefile: clients\kinit\Makefile.in $(MKFDEP)
178 ##DOS## $(WCONFIG) config < $@.in > $@
179 ##DOS##clients\klist\Makefile: clients\klist\Makefile.in $(MKFDEP)
180 ##DOS## $(WCONFIG) config < $@.in > $@
181 ##DOS##clients\kpasswd\Makefile: clients\kpasswd\Makefile.in $(MKFDEP)
182 ##DOS## $(WCONFIG) config < $@.in > $@
183 ##DOS##clients\kvno\Makefile: clients\kvno\Makefile.in $(MKFDEP)
184 ##DOS## $(WCONFIG) config < $@.in > $@
185 ##DOS##include\Makefile: include\Makefile.in $(MKFDEP)
186 ##DOS## $(WCONFIG) config < $@.in > $@
187 ##DOS##include\krb5\Makefile: include\krb5\Makefile.in $(MKFDEP)
188 ##DOS## $(WCONFIG) config < $@.in > $@
189 ##DOS##krb524\Makefile: krb524\Makefile.in $(MKFDEP)
190 ##DOS## $(WCONFIG) config < $@.in > $@
191 ##DOS##lib\Makefile: lib\Makefile.in $(MKFDEP)
192 ##DOS## $(WCONFIG) config < $@.in > $@
193 ##DOS##lib\crypto\Makefile: lib\crypto\Makefile.in $(MKFDEP)
194 ##DOS## $(WCONFIG) config < $@.in > $@
195 ##DOS##lib\crypto\crc32\Makefile: lib\crypto\crc32\Makefile.in $(MKFDEP)
196 ##DOS## $(WCONFIG) config < $@.in > $@
197 ##DOS##lib\crypto\des\Makefile: lib\crypto\des\Makefile.in $(MKFDEP)
198 ##DOS## $(WCONFIG) config < $@.in > $@
199 ##DOS##lib\crypto\dk\Makefile: lib\crypto\dk\Makefile.in $(MKFDEP)
200 ##DOS## $(WCONFIG) config < $@.in > $@
201 ##DOS##lib\crypto\enc_provider\Makefile: lib\crypto\enc_provider\Makefile.in $(MKFDEP)
202 ##DOS## $(WCONFIG) config < $@.in > $@
203 ##DOS##lib\crypto\hash_provider\Makefile: lib\crypto\hash_provider\Makefile.in $(MKFDEP)
204 ##DOS## $(WCONFIG) config < $@.in > $@
205 ##DOS##lib\crypto\keyhash_provider\Makefile: lib\crypto\keyhash_provider\Makefile.in $(MKFDEP)
206 ##DOS## $(WCONFIG) config < $@.in > $@
207 ##DOS##lib\crypto\sha1\Makefile: lib\crypto\sha1\Makefile.in $(MKFDEP)
208 ##DOS## $(WCONFIG) config < $@.in > $@
209 ##DOS##lib\crypto\md4\Makefile: lib\crypto\md4\Makefile.in $(MKFDEP)
210 ##DOS## $(WCONFIG) config < $@.in > $@
211 ##DOS##lib\crypto\md5\Makefile: lib\crypto\md5\Makefile.in $(MKFDEP)
212 ##DOS## $(WCONFIG) config < $@.in > $@
213 ##DOS##lib\crypto\old\Makefile: lib\crypto\old\Makefile.in $(MKFDEP)
214 ##DOS## $(WCONFIG) config < $@.in > $@
215 ##DOS##lib\crypto\raw\Makefile: lib\crypto\raw\Makefile.in $(MKFDEP)
216 ##DOS## $(WCONFIG) config < $@.in > $@
217 ##DOS##lib\des425\Makefile: lib\des425\Makefile.in $(MKFDEP)
218 ##DOS## $(WCONFIG) config < $@.in > $@
219 ##DOS##lib\gssapi\Makefile: lib\gssapi\Makefile.in $(MKFDEP)
220 ##DOS## $(WCONFIG) config < $@.in > $@
221 ##DOS##lib\gssapi\generic\Makefile: lib\gssapi\generic\Makefile.in $(MKFDEP)
222 ##DOS## $(WCONFIG) config < $@.in > $@
223 ##DOS##lib\gssapi\mechglue\Makefile: lib\gssapi\mechglue\Makefile.in $(MKFDEP)
224 ##DOS## $(WCONFIG) config < $@.in > $@
225 ##DOS##lib\gssapi\krb5\Makefile: lib\gssapi\krb5\Makefile.in $(MKFDEP)
226 ##DOS## $(WCONFIG) config < $@.in > $@
227 ##DOS##lib\krb4\Makefile: lib\krb4\Makefile.in $(MKFDEP)
228 ##DOS## $(WCONFIG) config < $@.in > $@
229 ##DOS##lib\krb5\Makefile: lib\krb5\Makefile.in $(MKFDEP)
230 ##DOS## $(WCONFIG) config < $@.in > $@
231 ##DOS##lib\krb5\asn.1\Makefile: lib\krb5\asn.1\Makefile.in $(MKFDEP)
232 ##DOS## $(WCONFIG) config < $@.in > $@
233 ##DOS##lib\krb5\ccache\Makefile: lib\krb5\ccache\Makefile.in $(MKFDEP)
234 ##DOS## $(WCONFIG) config < $@.in > $@
235 ##DOS##lib\krb5\ccache\ccapi\Makefile: lib\krb5\ccache\ccapi\Makefile.in $(MKFDEP)
236 ##DOS## $(WCONFIG) config < $@.in > $@
237 ##DOS##lib\krb5\error_tables\Makefile: lib\krb5\error_tables\Makefile.in $(MKFDEP)
238 ##DOS## $(WCONFIG) config < $@.in > $@
239 ##DOS##lib\krb5\keytab\Makefile: $$@.in $(MKFDEP)
240 ##DOS## $(WCONFIG) config < $@.in > $@
241 ##DOS##lib\krb5\keytab\file\Makefile: $$@.in $(MKFDEP)
242 ##DOS## $(WCONFIG) config < $@.in > $@
243 ##DOS##lib\krb5\keytab\srvtab\Makefile: $$@.in $(MKFDEP)
244 ##DOS## $(WCONFIG) config < $@.in > $@
245 ##DOS##lib\krb5\krb\Makefile: lib\krb5\krb\Makefile.in $(MKFDEP)
246 ##DOS## $(WCONFIG) config < $@.in > $@
247 ##DOS##lib\krb5\os\Makefile: lib\krb5\os\Makefile.in $(MKFDEP)
248 ##DOS## $(WCONFIG) config < $@.in > $@
249 ##DOS##lib\krb5\posix\Makefile: lib\krb5\posix\Makefile.in $(MKFDEP)
250 ##DOS## $(WCONFIG) config < $@.in > $@
251 ##DOS##lib\krb5\rcache\Makefile: lib\krb5\rcache\Makefile.in $(MKFDEP)
252 ##DOS## $(WCONFIG) config < $@.in > $@
253 ##DOS##util\Makefile: util\Makefile.in $(MKFDEP)
254 ##DOS## $(WCONFIG) config < $@.in > $@
255 ##DOS##util\et\Makefile: util\et\Makefile.in $(MKFDEP)
256 ##DOS## $(WCONFIG) config < $@.in > $@
257 ##DOS##util\profile\Makefile: util\profile\Makefile.in $(MKFDEP)
258 ##DOS## $(WCONFIG) config < $@.in > $@
259 ##DOS##util\windows\Makefile: util\windows\Makefile.in $(MKFDEP)
260 ##DOS## $(WCONFIG) config < $@.in > $@
261 ##DOS##windows\Makefile: windows\Makefile.in $(MKFDEP)
262 ##DOS## $(WCONFIG) config < $@.in > $@
263 ##DOS##windows\lib\Makefile: windows\lib\Makefile.in $(MKFDEP)
264 ##DOS## $(WCONFIG) config < $@.in > $@
265 ##DOS##windows\cns\Makefile: windows\cns\Makefile.in $(MKFDEP)
266 ##DOS## $(WCONFIG) config < $@.in > $@
267 ##DOS##windows\gina\Makefile: windows\gina\Makefile.in $(MKFDEP)
268 ##DOS## $(WCONFIG) config < $@.in > $@
269 ##DOS##windows\gss\Makefile: windows\gss\Makefile.in $(MKFDEP)
270 ##DOS## $(WCONFIG) config < $@.in > $@
271 ##DOS##windows\ms2mit\Makefile: windows\ms2mit\Makefile.in $(MKFDEP)
272 ##DOS## $(WCONFIG) config < $@.in > $@
273 ##DOS##windows\wintel\Makefile: windows\wintel\Makefile.in $(MKFDEP)
274 ##DOS## $(WCONFIG) config < $@.in > $@
275
276 clean-windows:: Makefile-windows
277         @echo Making clean in util
278         cd util
279         $(MAKE) -$(MFLAGS) clean
280         @echo Making clean in include
281         cd ..\include
282         $(MAKE) -$(MFLAGS) clean
283         @echo Making clean in lib
284         cd ..\lib
285         $(MAKE) -$(MFLAGS) clean
286         @echo Making clean in windows
287         cd ..\windows
288         $(MAKE) -$(MFLAGS) clean
289         @echo Making clean in clients
290         cd ..\clients
291         $(MAKE) -$(MFLAGS) clean
292         @echo Making in appl\gss-sample
293         cd ..\appl\gss-sample
294         $(MAKE) -$(MFLAGS) clean
295         cd ..\..
296         @echo Making clean in root
297
298 #
299 # Renames DOS 8.3 filenames back to their proper, longer names.
300 #
301 ren2long:
302         -sh config/ren2long
303
304 #
305 # Builds the file that distributes Kerberos sources for DOS and 
306 # Macintosh sites from the source tree on Unix.
307 #
308 ZIP=zip
309 FILES= ./* \
310         clients/* clients/kdestroy/* clients/kinit/* clients/klist/* \
311         clients/kpasswd/* \
312         config/* include/* include/kerberosIV/* \
313         include/krb5/* include/krb5/stock/* include/sys/* krb524/* lib/* \
314         lib/crypto/* lib/crypto/crc32/* lib/crypto/des/* lib/crypto/dk/* \
315         lib/crypto/enc_provider/* lib/crypto/hash_provider/* \
316         lib/crypto/keyhash_provider/* lib/crypto/old/* lib/crypto/raw/* \
317         lib/crypto/sha1/* lib/crypto/md4/* lib/crypto/md5/* \
318         lib/des425/* lib/gssapi/* lib/gssapi/generic/* lib/gssapi/krb5/* \
319         lib/gssapi/mechglue/* lib/krb4/* \
320         lib/krb5/* lib/krb5/asn.1/* lib/krb5/krb/* \
321         lib/krb5/ccache/* lib/krb5/ccache/ccapi/* \
322         lib/krb5/error_tables/* \
323         lib/krb5/keytab/* lib/krb5/keytab/file/* lib/krb5/keytab/srvtab/* \
324         lib/krb5/os/* lib/krb5/posix/* lib/krb5/rcache/* \
325         util/* util/et/* util/profile/*
326
327 WINFILES= util/windows/* windows/* windows/lib/* windows/cns/* \
328         windows/wintel/* windows/gss/* windows/gina/* windows/ms2mit/*
329
330 MACFILES= mac/* mac/libraries/* config/* include/* \
331         include/krb5/* include/krb5/stock/* include/sys/* \
332         ./patchlevel.h
333
334 WINBINARYFILES= windows/*/*.ico windows/*/*.doc windows/*/*.hlp \
335         windows/*/*.hpj windows/lib/*.lib
336
337 #
338 # Part of building the PC release has to be done on Unix. This includes
339 # anything the requires awk.
340 #
341 AWK = gawk
342 AH  = util/et/et_h.awk
343 AC  = util/et/et_c.awk
344 INC = include/
345 ET  = lib/krb5/error_tables/
346 GG  = lib/gssapi/generic/
347 GK  = lib/gssapi/krb5/
348 PR  = util/profile/
349
350 ETOUT = \
351         krb524\krb524_err.h krb524\krb524_err.c \
352         $(INC)asn1_err.h $(ET)asn1_err.c \
353         $(INC)kdb5_err.h $(ET)kdb5_err.c \
354         $(INC)krb5_err.h $(ET)krb5_err.c \
355         $(INC)kv5m_err.h $(ET)kv5m_err.c \
356         $(INC)adm_err.h $(ET)adm_err.c \
357         $(INC)/kerberosIV/krb_err.h lib/krb4/krb_err.c \
358         $(PR)prof_err.h $(PR)prof_err.c \
359         $(GG)gssapi_err_generic.h $(GG)gssapi_err_generic.c \
360         $(GK)gssapi_err_krb5.h $(GK)gssapi_err_krb5.c
361
362 HOUT =  $(INC)krb5.h $(GG)gssapi.h $(PR)profile.h
363
364 CLEANUP= Makefile $(ETOUT) $(HOUT) \
365         include/profile.h include/krb5/osconf.h \
366         winfile.list macfile.list
367
368
369 kerbsrc.win: kerbsrc.zip
370
371 winfile.list:
372         echo $(FILES) $(WINFILES) | tr ' ' \\012 | \
373                 sed -f config/winexclude.sed > winfile.list
374
375 MAC_SUBDIRS = lib util
376 macfile.list:
377         /bin/sh mac/macfiles.sh $(MAC_SUBDIRS) > macfile.list
378         find $(MACFILES) -prune -type f -print | \
379                 sed -f config/winexclude.sed >> macfile.list
380
381 dos-Makefile:
382         cat config/win-pre.in Makefile.in config/win-post.in | \
383                 sed -e "s/^##DOS##//" -e "s/^##DOS//" > Makefile.tmp
384         mv Makefile.tmp Makefile
385
386 prep-windows: dos-Makefile awk-windows-mac
387
388 krbsrc83.zip: krbsrc83-is-obsolete
389
390 krbsrc83-is-obsolete:
391         @echo "Win16 and krbsrc83.zip are no longer supported."
392         @echo "We don't support building under 8.3 restricted filesystems"
393         @echo "anymore.  You can still build for Win32 on filesystems"
394         @echo "without 8.3 restrictions using kerbsrc.zip"
395         @echo " "
396
397 kerbsrc.zip: dos-Makefile awk-windows-mac winfile.list
398         rm -f kerbsrc.zip
399         $(ZIP) -@Dl kerbsrc.zip < winfile.list
400         $(ZIP) -D kerbsrc.zip $(WINBINARYFILES)
401         rm -f $(CLEANUP)
402
403 kerbsrc-nt.zip: kerbsrc-nt-is-obsolete
404
405 kerbsrc-nt-is-obsolete:
406         @echo "kerbsrc-nt.zip is now obsolete.  Just use and build kerbsrc.zip"
407         @echo "We don't support building under 8.3 restricted filesystems"
408         @echo "anymore, so what was kerbsrc-nt.zip is now kerbsrc.zip."
409         @echo " "
410
411 Macfile: macfile.list 
412         rm -f Macfile
413         sed -e 's|/|:|g' -e 's/^/:/' -e '/:.:/d' -e '/:mac:/d' macfile.list > macfile.maclist
414         grep '\.c$$' macfile.maclist > macsrcsgss
415         grep -v ':gssapi:' macsrcsgss > macsrcsk5
416         echo SRCS = `cat macsrcsgss` >> Macfile
417         echo SRCDIRS = `sed -n -e 's/\(.*:\)[^:]*\.c$$/ \1/p' macfile.maclist | sort -u` >> Macfile
418         echo GSSOBJS68K = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
419                 -e 's/^/:bin:68K:/' macsrcsgss` >> Macfile
420         echo GSSOBJS68KCFM = `sed -e 's/$$/.CFM68.o/' -e 's/.*://' \
421                 -e 's/^/:bin:CFM-68K:/' macsrcsgss` >> Macfile
422         echo GSSOBJSPPC = `sed -e 's/$$/.PPC.o/' -e 's/.*://' \
423                 -e 's/^/:bin:PPC:/' macsrcsgss` >> Macfile
424         echo K5OBJS68K = `sed -e 's/$$/.68K.o/' -e 's/.*://' \
425                 -e 's/^/:bin:68K:/' macsrcsk5` >> Macfile
426         echo K5OBJS68KCFM = `sed -e 's/$$/.CFM68.o/' -e 's/.*://' \
427                 -e 's/^/:bin:CFM-68K:/' macsrcsk5` >> Macfile
428         echo K5OBJSPPC = `sed -e 's/$$/.PPC.o/' -e 's/.*://' \
429                 -e 's/^/:bin:PPC:/' macsrcsk5` >> Macfile
430         echo INCLUDES = `sed -n -e 's/\(.*:\)[^:]*\.h$$/-i \1/p' macfile.maclist | sort -u` >> Macfile
431         echo "" >> Macfile
432         tr '@/:\\' '\245:\304\266'< mac/Makefile.tmpl >> Macfile
433
434 mac-bin-dirs:
435         rm -rf bin
436         mkdir bin bin/68K bin/CFM-68K bin/PPC
437         sh mac/mkbindirs.sh bin/68K $(MAC_SUBDIRS)
438         sh mac/mkbindirs.sh bin/CFM-68K $(MAC_SUBDIRS)
439         sh mac/mkbindirs.sh bin/PPC $(MAC_SUBDIRS)
440
441 kerbsrc.mac.tar: awk-windows-mac macfile.list mac-bin-dirs Macfile
442         cp mac/libraries/autoconf.h include/autoconf.h
443         mv Macfile Makefile
444         tar cvf kerbsrc.mac.tar Makefile include/autoconf.h bin \
445                 `cat macfile.list`
446         rm -f $(CLEANUP)
447         rm -rf bin
448         rm -f include/autoconf.h Makefile macsrc* macfile.maclist
449
450 krb524/krb524_err.h: $(AH) krb524/krb524_err.et
451         $(AWK) -f $(AH) outfile=$@ krb524/krb524_err.et
452 krb524/krb524_err.c: $(AC) krb524/krb524_err.et
453         $(AWK) -f $(AC) outfile=$@ krb524/krb524_err.et
454
455 $(INC)asn1_err.h: $(AH) $(ET)asn1_err.et
456         $(AWK) -f $(AH) outfile=$@ $(ET)asn1_err.et
457 $(INC)kdb5_err.h: $(AH) $(ET)kdb5_err.et
458         $(AWK) -f $(AH) outfile=$@ $(ET)kdb5_err.et
459 $(INC)krb5_err.h: $(AH) $(ET)krb5_err.et
460         $(AWK) -f $(AH) outfile=$@ $(ET)krb5_err.et
461 $(INC)kv5m_err.h: $(AH) $(ET)kv5m_err.et
462         $(AWK) -f $(AH) outfile=$@ $(ET)kv5m_err.et
463 $(INC)adm_err.h: $(AH) $(ET)adm_err.et
464         $(AWK) -f $(AH) outfile=$@ $(ET)adm_err.et
465 $(INC)/kerberosIV/krb_err.h: $(AH) lib/krb4/krb_err.et
466         $(AWK) -f $(AH) outfile=$@ lib/krb4/krb_err.et
467 $(PR)prof_err.h: $(AH) $(PR)prof_err.et
468         $(AWK) -f $(AH) outfile=$@ $(PR)prof_err.et
469 $(GG)gssapi_err_generic.h: $(AH) $(GG)gssapi_err_generic.et
470         $(AWK) -f $(AH) outfile=$@ $(GG)gssapi_err_generic.et
471 $(GK)gssapi_err_krb5.h: $(AH) $(GK)gssapi_err_krb5.et
472         $(AWK) -f $(AH) outfile=$@ $(GK)gssapi_err_krb5.et
473
474 $(ET)asn1_err.c: $(AC) $(ET)asn1_err.et
475         $(AWK) -f $(AC) outfile=$@ $(ET)asn1_err.et
476 $(ET)kdb5_err.c: $(AC) $(ET)kdb5_err.et
477         $(AWK) -f $(AC) outfile=$@ $(ET)kdb5_err.et
478 $(ET)krb5_err.c: $(AC) $(ET)krb5_err.et
479         $(AWK) -f $(AC) outfile=$@ $(ET)krb5_err.et
480 $(ET)kv5m_err.c: $(AC) $(ET)kv5m_err.et
481         $(AWK) -f $(AC) outfile=$@ $(ET)kv5m_err.et
482 $(ET)adm_err.c: $(AC) $(ET)adm_err.et
483         $(AWK) -f $(AC) outfile=$@ $(ET)adm_err.et
484 lib/krb4/krb_err.c: $(AC) lib/krb4/krb_err.et
485         $(AWK) -f $(AC) outfile=$@ lib/krb4/krb_err.et
486 $(PR)prof_err.c: $(AC) $(PR)prof_err.et
487         $(AWK) -f $(AC) outfile=$@ $(PR)prof_err.et
488 $(GG)gssapi_err_generic.c: $(AC) $(GG)gssapi_err_generic.et
489         $(AWK) -f $(AC) outfile=$@ $(GG)gssapi_err_generic.et
490 $(GK)gssapi_err_krb5.c: $(AC) $(GK)gssapi_err_krb5.et
491         $(AWK) -f $(AC) outfile=$@ $(GK)gssapi_err_krb5.et
492
493 KRBHDEP = $(INC)krb5.hin $(INC)krb5_err.h $(INC)kdb5_err.h \
494         $(INC)kv5m_err.h $(INC)asn1_err.h
495
496 $(INC)krb5.h: $(KRBHDEP)
497         rm -f $@
498         cat $(KRBHDEP) > $@
499 $(PR)profile.h: $(PR)profile.hin $(PR)prof_err.h
500         rm -f $@
501         cat $(PR)profile.hin $(PR)prof_err.h > $@
502 $(GG)gssapi.h: $(GG)gssapi.hin
503         rm -f $@
504         cat $(GG)gssapi.hin > $@
505
506 awk-windows-mac: $(ETOUT) $(HOUT)
507
508 #
509 # The maybe-awk target needs to happen after AWK is defined.
510 #
511
512 ##DOS##maybe-awk::
513 ##DOS##!ifdef WHICH_CMD
514 ##DOS##!if ![ $(WHICH_CMD) $(AWK) ]
515 ##DOS##maybe-awk:: awk-windows-mac
516 ##DOS##!endif
517 ##DOS##!endif
518
519 clean-windows-mac:
520         rm -f $(CLEANUP)
521
522 distclean-windows:
523         config\rm.bat $(CLEANUP:^/=^\)
524         config\rm.bat $(WINMAKEFILES)
525         config\rm.bat $(KBINDIR)\*.dll $(KBINDIR)\*.exe
526         @if exist $(KBINDIR)\nul rmdir $(KBINDIR)
527
528 install-windows::
529         @if "$(KRB_INSTALL_DIR)"=="" @echo KRB_INSTALL_DIR is not defined!  Please define it.
530         @if "$(KRB_INSTALL_DIR)"=="" @dir /b \nul\nul
531         @if not exist "$(KRB_INSTALL_DIR)\$(NULL)" @echo The directory $(KRB_INSTALL_DIR) does not exist.  Please create it.
532         @if not exist "$(KRB_INSTALL_DIR)\$(NULL)" @dir /b $(KRB_INSTALL_DIR)\nul
533         @if not exist "$(KRB_INSTALL_DIR)\include\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include"
534         @if not exist "$(KRB_INSTALL_DIR)\include\gssapi\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\include\gssapi"
535         @if not exist "$(KRB_INSTALL_DIR)\lib\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\lib"
536         @if not exist "$(KRB_INSTALL_DIR)\bin\$(NULL)" @mkdir "$(KRB_INSTALL_DIR)\bin"
537         $(CP) include\krb5.h "$(KRB_INSTALL_DIR)\include\."
538         $(CP) include\win-mac.h "$(KRB_INSTALL_DIR)\include\."
539         $(CP) include\profile.h "$(KRB_INSTALL_DIR)\include\."
540         $(CP) include\com_err.h "$(KRB_INSTALL_DIR)\include\."
541         $(CP) include\gssapi\gssapi.h "$(KRB_INSTALL_DIR)\include\gssapi\."
542         $(CP) include\gssapi\gssapi_krb5.h "$(KRB_INSTALL_DIR)\include\gssapi\."
543         $(CP) lib\$(OUTPRE)*.lib "$(KRB_INSTALL_DIR)\lib\."
544         $(CP) lib\$(OUTPRE)*.dll "$(KRB_INSTALL_DIR)\bin\."
545         $(CP) windows\cns\$(OUTPRE)krb5.exe "$(KRB_INSTALL_DIR)\bin\."
546         $(CP) windows\wintel\$(OUTPRE)telnet.exe "$(KRB_INSTALL_DIR)\bin\."
547         $(CP) windows\gss\$(OUTPRE)gss.exe "$(KRB_INSTALL_DIR)\bin\."
548         $(CP) clients\klist\$(OUTPRE)klist.exe "$(KRB_INSTALL_DIR)\bin\."
549         $(CP) clients\kinit\$(OUTPRE)kinit.exe "$(KRB_INSTALL_DIR)\bin\."
550         $(CP) clients\kdestroy\$(OUTPRE)kdestroy.exe "$(KRB_INSTALL_DIR)\bin\."
551         $(CP) clients\kpasswd\$(OUTPRE)kpasswd.exe "$(KRB_INSTALL_DIR)\bin\."
552         @if exist "$(KRB_INSTALL_DIR)\bin\krb4_32.dll" del "$(KRB_INSTALL_DIR)\bin\krb4_32.dll"
553         @if exist "$(KRB_INSTALL_DIR)\lib\krb4_32.lib" del "$(KRB_INSTALL_DIR)\lib\krb4_32.lib"