summaryrefslogtreecommitdiffstats
path: root/src/include/krb5/Makefile.in
blob: fe0aabea111041dbae445c19e8645e75ca4dbb3c (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
KDB5DIR = $(KRB5ROOT)
KRB5SRVTABDIR = /etc

##DOSBUILDTOP = ..\..
##DOS!include $(BUILDTOP)\config\windows.in

KRB5_HEADERS = asn1.h base-defs.h ccache.h config.h encryption.h \
		error_def.h errors.h ext-proto.h fieldbits.h \
		free.h func-proto.h hostaddr.h kdb.h kdb_dbm.h \
		keytab.h krb5.h libos.h los-proto.h macros.h mit-des.h \
		proto.h rcache.h safepriv.h sysincl.h wordsize.h
# these are installed here for the build from lib/krb5/error_tables but 
# also need to be in the installed tree
ET_HEADERS = adm_err.h asn1_err.h kdb5_err.h krb5_err.h
BUILT_HEADERS = autoconf.h osconf.h

all:: all-$(WHAT)

all-unix:: $(BUILT_HEADERS)

all-windows:
	echo /* not used in windows */ > osconf.h
	echo /* not used in windows */ > autoconf.h
 
includes:: autoconf.h

# Run a header through a preprocessor to generate an architecture/environment
# specific header file.  note that unifdef's exit status will normally be 1,
# indicating some adjustment of the file took place.

autoconf.h: $(srcdir)/autoconf.h.in config.status
	$(SHELL) config.status

clean::
	$(RM) autoconf.h

depend::

KRB5ROOT = @KRB5ROOT@

KRB5_INCDIR = $(KRB5ROOT)/include

install::
	@set -x; for f in $(KRB5_HEADERS); \
	do $(INSTALL_DATA) $(srcdir)/$$f $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f ; \
	done; \
	for f in $(BUILT_HEADERS) $(ET_HEADERS); \
	do $(INSTALL_DATA) $$f $(DESTDIR)$(KRB5_INCDIR)/krb5/$$f ; \
	done

PROCESS_REPLACE = -e "s+@KRB5ROOT+$(KRB5ROOT)+" \
		  -e "s+@KDB5DIR+$(KDB5DIR)+" \
		  -e "s+@KRB5SRVTABDIR+$(KRB5SRVTABDIR)+" 

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

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

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

clean-unix::
	$(RM) $(ET_HEADERS)

clean-windows::