summaryrefslogtreecommitdiffstats
path: root/src/mac/MacOSX/Scripts/Kerberos5ServerBuild.jam
blob: b2957b39b6eb9f28479736b1e1eb9e90fc50d7b8 (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
Intermediates = "$(BUILT_PRODUCTS_DIR)/Kerberos5.intermediates" ;
IntermediateBuild = "$(Intermediates)/build" ;
Sources = "$(SRCROOT)/../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" ; 
} else {
    KerberosCFLAGS = "CFLAGS=-fno-common -include /usr/include/TargetConditionals.h" ;
}

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> <build dir> : <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 ###"
}

Make "$(IntermediateBuild)/make.stamp" : "$(Makefile)" ;

DEPENDS all : "$(IntermediateBuild)/make.stamp" ;
DEPENDS install : all ;
DEPENDS installhdrs : all ;