summaryrefslogtreecommitdiffstats
path: root/src/mac/MacOSX/Scripts/Kerberos5ServerBuild.jam
blob: 77c8f79c127d5cd4f85e46f0ba0b69e564c42ef4 (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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Intermediates = "$(BUILT_PRODUCTS_DIR)/Kerberos5.intermediates" ;
IntermediateBuild = "$(Intermediates)/build" ;
Sources = "$(SRCROOT)/../../Kerberos5/Sources" ;

Reconf = "$(Sources)/util/reconf" ;
Configure = "$(Sources)/configure" ;
Makefile = "$(IntermediateBuild)/Makefile" ;
MakeStamp = "$(IntermediateBuild)/make.stamp" ;

if $(KerberosCFLAGS) != "" { 
    KerberosCFLAGS = "CFLAGS=$(CFLAGS) -fno-common -include /usr/include/TargetConditionals.h -DUSE_PASSWORD_SERVER" ; 
} else {
    KerberosCFLAGS = "CFLAGS=-fno-common -include /usr/include/TargetConditionals.h -DUSE_PASSWORD_SERVER" ;
}

if $(KerberosLDFLAGS) != "" { 
    KerberosLDFLAGS = "LDFLAGS=$(LDFLAGS) -Wl,-search_paths_first" ; 
} else {
    KerberosLDFLAGS = "LDFLAGS=-Wl,-search_paths_first" ;
}

#
# Note: in this jam script we have separated the dependency tree from the 
# actual scripts.  This is so that CVS checkouts trigger a rebuild but the jam
# script doesn't need to know how the reconf and configure scripts work.
#

# Reconf <configure> : <configure.in>
rule Reconf
{
    DEPENDS "$(1)" : "$(1).in" "$(Reconf)" ;
}
actions Reconf
{
    cd "$(Sources)" && /bin/sh "$(Reconf)" -f
}

# Configure <makefile> : <configure>
rule Configure
{
    DEPENDS "$(1)" : "$(2)" ;
    Reconf "$(2)" : "$(2).in" ;
    Clean.Remove clean "$(1:D)" ;
}
actions Configure
{
    mkdir -p "$(1:D)"
    cd "$(1:D)" && /bin/sh "$(2)" --prefix=/usr --localstatedir=/var/db "$(KerberosCFLAGS)" "$(KerberosLDFLAGS)" || rm -f "$(1)"
}

# Make <stamp file> : <makefile>
rule Make
{
    DEPENDS "$(1)" : "$(2)" ;
    Configure "$(2)" : "$(Configure)" ;
    Clean.Remove clean "$(1)" ;
}
actions Make
{
    mkdir -p "$(1:D)"
    cd "$(1:D)" && make && touch "$(1)" && echo "### HAPPINESS ###"
}

# InstallProgram <destination executable> : <source executable>
rule InstallProgram
{
    DEPENDS "$(1)" : "$(2)" ;
    DEPENDS "$(2)" : "$(MakeStamp)" ;
    Clean.Remove clean "$(1)" ;
}
actions InstallProgram
{
    mkdir -p "$(1:D)"
    /usr/bin/install -c -s "$(2)" "$(1)" 
}

# InstallFile <destination file> : <source file>
rule InstallFile
{
    DEPENDS "$(1)" : "$(2)" ;
    DEPENDS "$(2)" : "$(MakeStamp)" ;
    Clean.Remove clean "$(1)" ;
}
actions InstallFile
{
    mkdir -p "$(1:D)"
    /usr/bin/install -c -m 644 "$(2)" "$(1)" 
}

Make "$(MakeStamp)" : "$(Makefile)" ;

InstallProgram "$(DSTROOT)/usr/sbin/kadmin"          : "$(IntermediateBuild)/kadmin/cli/kadmin" ;
InstallProgram "$(DSTROOT)/usr/sbin/kadmin.local"    : "$(IntermediateBuild)/kadmin/cli/kadmin.local" ;
InstallProgram "$(DSTROOT)/usr/sbin/kadmind"         : "$(IntermediateBuild)/kadmin/server/kadmind" ;
InstallProgram "$(DSTROOT)/usr/sbin/ktutil"          : "$(IntermediateBuild)/kadmin/ktutil/ktutil" ;
InstallProgram "$(DSTROOT)/usr/sbin/kdb5_util"       : "$(IntermediateBuild)/kadmin/dbutil/kdb5_util" ;
InstallProgram "$(DSTROOT)/usr/sbin/kprop"           : "$(IntermediateBuild)/slave/kprop" ;
InstallProgram "$(DSTROOT)/usr/sbin/kpropd"          : "$(IntermediateBuild)/slave/kpropd" ;
InstallProgram "$(DSTROOT)/usr/sbin/krb524d"         : "$(IntermediateBuild)/krb524/krb524d" ;
InstallProgram "$(DSTROOT)/usr/sbin/krb5kdc"         : "$(IntermediateBuild)/kdc/krb5kdc" ;
InstallProgram "$(DSTROOT)/usr/bin/krb5-config"      : "$(IntermediateBuild)/krb5-config" ;
                  
InstallFile "$(DSTROOT)/usr/share/man/man1/kerberos.1"     : "$(SRCROOT)/../../Kerberos5/Sources/gen-manpages/kerberos.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man5/kdc.conf.5"     : "$(SRCROOT)/../../Kerberos5/Sources/config-files/kdc.conf.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man5/krb5.conf.5"    : "$(SRCROOT)/../../Kerberos5/Sources/config-files/krb5.conf.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man8/kadmin.8"       : "$(SRCROOT)/../../Kerberos5/Sources/kadmin/cli/kadmin.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man8/kadmin.local.8" : "$(SRCROOT)/../../Kerberos5/Sources/kadmin/cli/kadmin.local.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man8/kadmind.8"      : "$(SRCROOT)/../../Kerberos5/Sources/kadmin/server/kadmind.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man8/ktutil.8"       : "$(SRCROOT)/../../Kerberos5/Sources/kadmin/ktutil/ktutil.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man8/kdb5_util.8"    : "$(SRCROOT)/../../Kerberos5/Sources/kadmin/dbutil/kdb5_util.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man8/kprop.8"        : "$(SRCROOT)/../../Kerberos5/Sources/slave/kprop.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man8/kpropd.8"       : "$(SRCROOT)/../../Kerberos5/Sources/slave/kpropd.M" ;
InstallFile "$(DSTROOT)/usr/share/man/man8/krb5kdc.8"      : "$(SRCROOT)/../../Kerberos5/Sources/kdc/krb5kdc.M" ;


DEPENDS all     : "$(MakeStamp)" ;

DEPENDS install : all 
                  "$(DSTROOT)/usr/sbin/kadmin"
                  "$(DSTROOT)/usr/sbin/kadmin.local"
                  "$(DSTROOT)/usr/sbin/kadmind"
                  "$(DSTROOT)/usr/sbin/kdb5_util"
                  "$(DSTROOT)/usr/sbin/kprop"
                  "$(DSTROOT)/usr/sbin/kpropd"
                  "$(DSTROOT)/usr/sbin/krb524d"
                  "$(DSTROOT)/usr/sbin/krb5kdc"
                  "$(DSTROOT)/usr/sbin/ktutil"
                  "$(DSTROOT)/usr/bin/krb5-config"
                  
                  "$(DSTROOT)/usr/share/man/man1/kerberos.1"
                  "$(DSTROOT)/usr/share/man/man5/kdc.conf.5"
                  "$(DSTROOT)/usr/share/man/man5/krb5.conf.5"
                  "$(DSTROOT)/usr/share/man/man8/kadmin.8"
                  "$(DSTROOT)/usr/share/man/man8/kadmin.local.8"
                  "$(DSTROOT)/usr/share/man/man8/kadmind.8"
                  "$(DSTROOT)/usr/share/man/man8/kdb5_util.8"
                  "$(DSTROOT)/usr/share/man/man8/kprop.8"
                  "$(DSTROOT)/usr/share/man/man8/kpropd.8"
                  "$(DSTROOT)/usr/share/man/man8/krb5kdc.8"
                  "$(DSTROOT)/usr/share/man/man8/ktutil.8" ;
                  
DEPENDS installhdrs : all ;