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