summaryrefslogtreecommitdiffstats
path: root/src/include/Makefile.in
blob: e13fca61f617e8b396f89acc2c1d4205e755c2d3 (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
thisconfigdir=..
myfulldir=include
mydir=include
LOCAL_SUBDIRS=@maybe_kerberosIV@
BUILDTOP=$(REL)..
KRB5RCTMPDIR= @KRB5_RCTMPDIR@
##DOSBUILDTOP = ..
NO_OUTPRE=1

all-unix:: krb5.h

all-unix:: maybe-make-db.h-@DB_HEADER_VERSION@

generate-files-mac: krb5.h

maybe-make-db.h-k5:
	: db.h will be installed by util/db2
maybe-make-db.h-sys:
	: fall back to system db.h 
maybe-make-db.h-redirect:
	test -r db.h || echo '#include <@DB_HEADER@>' > db.h

ET_HEADERS = adm_err.h asn1_err.h kdb5_err.h krb5_err.h
BUILT_HEADERS = osconf.h

all-unix:: autoconf.h $(BUILT_HEADERS)
all-windows:: autoconf.h $(BUILT_HEADERS)

$(srcdir)/autoconf.h.in: @MAINT@ $(srcdir)/autoconf.stmp
$(srcdir)/autoconf.stmp: $(srcdir)/$(thisconfigdir)/configure.in $(SRCTOP)/aclocal.m4
	$(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache
	cd $(srcdir)/$(thisconfigdir) && $(AUTOHEADER) --include=$(CONFIG_RELTOPDIR) $(AUTOHEADERFLAGS)
	touch $(srcdir)/autoconf.stmp
	$(RM) -r $(srcdir)/$(thisconfigdir)/autom4te.cache

##DOS##autoconf.h: win-mac.h
##DOS##	$(CP) win-mac.h $@
##DOS##osconf.h: stock\osconf.h
##DOS##	$(CP) stock\osconf.h $@

###############################################################################
##DOS##!if 0
autoconf.h: autoconf.stamp
autoconf.stamp: $(srcdir)/autoconf.h.in $(thisconfigdir)/config.status
	(cd $(thisconfigdir) && $(SHELL) config.status $(mydir)/autoconf.h)
	touch autoconf.stamp

SYSCONFDIR = @sysconfdir@
LOCALSTATEDIR = @localstatedir@
BINDIR = @bindir@
SBINDIR = @sbindir@
LIBDIR  = @libdir@

PROCESS_REPLACE = -e "s+@KRB5RCTMPDIR+$(KRB5RCTMPDIR)+" \
		  -e "s+@PREFIX+$(INSTALL_PREFIX)+" \
		  -e "s+@EXEC_PREFIX+$(INSTALL_EXEC_PREFIX)+" \
		  -e "s+@BINDIR+$(BINDIR)+" \
		  -e "s+@LIBDIR+$(LIBDIR)+" \
		  -e "s+@SBINDIR+$(SBINDIR)+" \
		  -e "s+@MODULEDIR+$(MODULE_DIR)+" \
	-e 's+@LOCALSTATEDIR+$(LOCALSTATEDIR)+' \
	-e 's+@SYSCONFDIR+$(SYSCONFDIR)+' 

OSCONFSRC = $(srcdir)/stock/osconf.h

osconf.h: $(OSCONFSRC) Makefile
	cat $(OSCONFSRC) | sed $(PROCESS_REPLACE) > osconf.new
	@set -x ; if cmp -s osconf.new osconf.h ; then : osconf.h is current ; \
	else ($(RM) osconf.h ; $(CP) osconf.new osconf.h) fi
	$(RM) osconf.new
##DOS##!endif
###############################################################################

krb5.h: $(srcdir)/krb5.hin krb5_err.h kdb5_err.h kv5m_err.h krb524_err.h asn1_err.h
	echo "/* This file is generated, please don't edit it directly.  */" > krb5.h
	cat $(srcdir)/krb5.hin krb5_err.h kdb5_err.h kv5m_err.h krb524_err.h \
		asn1_err.h >> krb5.h

#
# Build the error table include files:
# asn1_err.h kdb5_err.h krb5_err.h kv5m_err.h krb524_err.h

asn1_err.h kdb5_err.h krb5_err.h kv5m_err.h krb524_err.h: rebuild-error-tables
	: $@
rebuild-error-tables:
	(cd ../lib/krb5/error_tables && $(MAKE) includes)

.PHONY: force rebuild-error-tables
force:

asn1_err.h: $(SRCTOP)/lib/krb5/error_tables/asn1_err.et
kdb5_err.h: $(SRCTOP)/lib/krb5/error_tables/kdb5_err.et
krb5_err.h: $(SRCTOP)/lib/krb5/error_tables/krb5_err.et	
kv5m_err.h: $(SRCTOP)/lib/krb5/error_tables/kv5m_err.et
krb524_err.h: $(SRCTOP)/lib/krb5/error_tables/krb524_err.et

clean-unix::
	$(RM) krb5.h krb5_err.h kdb5_err.h kv5m_err.h krb524_err.h \
		asn1_err.h
	$(RM) $(ET_HEADERS) autoconf.stamp

clean-windows::
	$(RM) com_err.h profile.h
	$(RM) gssapi\gssapi.h gssapi\gssapi_generic.h gssapi\gssapi_krb5.h gssapi\timestamp
	if exist gssapi\nul rmdir gssapi
	$(RM) osconf.h autoconf.h autoconf.stamp
	@echo Making clean in include

clean::
	$(RM) osconf.new $(BUILT_HEADERS)

install-headers-unix install:: krb5.h profile.h
	$(INSTALL_DATA) krb5.h $(DESTDIR)$(KRB5_INCDIR)$(S)krb5.h
	$(INSTALL_DATA) profile.h $(DESTDIR)$(KRB5_INCDIR)$(S)profile.h