summaryrefslogtreecommitdiffstats
path: root/src/include/krb5/Makefile.in
blob: b3500dd4b74eb2c389d0c820e7d2adb866ac73c2 (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
KRB5RCTMPDIR= @KRB5_RCTMPDIR@

##DOSBUILDTOP = ..\..

KRB5_HEADERS = adm.h adm_proto.h kdb.h kdb_dbm.h winsock.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 = osconf.h

all-unix:: autoconf.h $(BUILT_HEADERS)
all-mac:: $(BUILT_HEADERS)
all-windows::
	$(RM) osconf.h autoconf.h autoconf.stamp
	copy stock\osconf.h osconf.h
	echo #include "win-mac.h" > autoconf.h

# Should only rebuild autoconf.h here (use CONFIG_FILES=), but the weird krb5
# makefile post-processing is unconditional and would trash the makefile.
autoconf.h: autoconf.stamp
autoconf.stamp: $(srcdir)/autoconf.h.in config.status
	$(SHELL) config.status
	touch autoconf.stamp

depend::

install::
SYSCONFDIR = @sysconfdir@
LOCALSTATEDIR = @localstatedir@
PROCESS_REPLACE = -e "s+@KRB5RCTMPDIR+$(KRB5RCTMPDIR)+" \
		  -e "s+@PREFIX+$(INSTALL_PREFIX)+" \
		  -e "s+@EXEC_PREFIX+$(INSTALL_EXEC_PREFIX)+" \
	-e 's+@LOCALSTATEDIR+$(LOCALSTATEDIR)+' \
	-e 's+@SYSCONFDIR+$(SYSCONFDIR)+' 

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::
	$(RM) osconf.new $(BUILT_HEADERS)

clean-unix::
	$(RM) $(ET_HEADERS) autoconf.h autoconf.stamp
clean-mac::
	$(RM) osconf.h autoconf.h autoconf.stamp
clean-windows::
	$(RM) osconf.h autoconf.h autoconf.stamp