Windows global stuff:
[krb5.git] / src / lib / krb5 / error_tables / Makefile.in
1 CFLAGS = $(CCOPTS) $(DEFS)
2
3 ##DOSBUILDTOP = ..\..\..
4 ##DOSLIBNAME=..\krb5.lib
5 ##DOS!include $(BUILDTOP)\config\windows.in
6
7 EHDRDIR=$(BUILDTOP)$(S)include$(S)krb5
8
9 # The "unixmac" and "includes" rules need to run in Makefile.in,
10 # without all the support glop like $(S) and $(BUILDTOP)...so, fake it.
11 #
12 # Faking things breaks VPATH support, which is a requirement for me -- TYT.
13 # You need to do this right!  Whatever config tools that you're using under
14 # the macintosh, is going to need to handle BUILDTOP and SRCTOP explicitly.
15 # Setting BUILDTOP and SRCTOP to be the same is Right Out.
16 #
17 #BUILDTOP2 = ../../..
18 #SRCTOP2 = $(BUILDTOP2)
19 #EHDRDIR2=$(BUILDTOP2)/include/krb5
20
21 HDRS= asn1_err.h kdb5_err.h krb5_err.h kv5m_err.h adm_err.h
22 OBJS= asn1_err.$(OBJEXT) kdb5_err.$(OBJEXT) krb5_err.$(OBJEXT) \
23       kv5m_err.$(OBJEXT) adm_err.$(OBJEXT) init_ets.$(OBJEXT)
24 ETSRCS= asn1_err.c kdb5_err.c krb5_err.c kv5m_err.c adm_err.c
25 SRCS=$(ETSRCS) init_ets.c
26
27 all:: all-$(WHAT)
28
29 all-unix:: $(HDRS) includes $(OBJS)
30 all-mac:: $(OBJS)
31
32 all-windows:: $(OBJS)
33
34 unixmac: $(HDRS) includes $(SRCS)
35
36 awk-windows:
37         $(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=asn1_err.h asn1_err.et
38         $(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=kdb5_err.h kdb5_err.et
39         $(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=krb5_err.h krb5_err.et
40         $(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=adm_err.h adm_err.et
41         $(AWK) -f $(SRCTOP)/util/et/et_h.awk outfile=kv5m_err.h kv5m_err.et
42         $(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=asn1_err.c asn1_err.et
43         $(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=kdb5_err.c kdb5_err.et
44         $(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=krb5_err.c krb5_err.et
45         $(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=adm_err.c adm_err.et
46         $(AWK) -f $(SRCTOP)/util/et/et_c.awk outfile=kv5m_err.c kv5m_err.et
47         if exist asn1_err.h copy asn1_err.h $(EHDRDIR)
48         if exist kdb5_err.h copy kdb5_err.h $(EHDRDIR)
49         if exist krb5_err.h copy krb5_err.h $(EHDRDIR)
50         if exist adm_err.h copy adm_err.h $(EHDRDIR)
51         if exist kv5m_err.h copy kv5m_err.h $(EHDRDIR)
52
53 install:: $(HDRS)
54         @set -x; for f in $(HDRS) ; \
55         do if cmp -s $$f $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f; \
56         then true; else \
57                 $(RM) $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f; \
58                 cp $$f $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f ; \
59         fi; done
60
61 #
62 # dependencies for traditional makes
63 #
64 asn1_err.$(OBJEXT): asn1_err.c
65 isode_err.$(OBJEXT): isode_err.c
66 kdb5_err.$(OBJEXT): kdb5_err.c
67 krb5_err.$(OBJEXT): krb5_err.c
68 adm_err.$(OBJEXT): adm_err.c
69 kv5m_err.$(OBJEXT): kv5m_err.c
70
71 clean:: clean-$(WHAT)
72
73 clean-unix:: clean-hdrs
74         $(RM) $(HDRS) $(ETSRCS)
75 clean-mac:: clean-hdrs
76         $(RM) $(HDRS) $(ETSRCS)
77 clean-windows::
78
79
80 includes:: $(HDRS)
81         for x in $(HDRS); do \
82         if cmp $$x $(EHDRDIR)/$$x >/dev/null 2>&1; then :; \
83         else \
84                 (set -x; rm -f $(EHDRDIR)/$$x;  cp $$x $(EHDRDIR)/$$x) \
85         fi; done
86
87 clean-hdrs::
88         for x in $(HDRS); do \
89                 rm -f $(EHDRDIR)/$$x; \
90         done
91
92
93 # This stuff is already dropped in by the autoconf generated configure scripts.
94 # (Blame Mark, not me for that; this was before we had pre.in and post.in, 
95 # we should probably move the error table rules from aclocal.m4 to pre.in)
96 #
97 #.SUFFIXES:  .h .c .et .ct
98 #
99 #.et.h:
100 #       awk -f $(SRCTOP2)/util/et/et_h.awk outfile=$*.h $<
101 #
102 #.et.c:
103 #       awk -f $(SRCTOP2)/util/et/et_c.awk outfile=$*.c $<
104 #