-
Notifications
You must be signed in to change notification settings - Fork 4
/
Jamrules
100 lines (83 loc) · 2.43 KB
/
Jamrules
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
# The directories used by the build.
BUILD_DIR = [ FDirName $(TOP) build ] ;
GENERATED_DIR = [ FDirName $(TOP) generated ] ;
DISTRO_DIR = [ FDirName $(TOP) generated distro ] ;
# First find out which gcc version the platform uses.
IS_GCC_4_PLATFORM = 1 ;
if $(OS) = HAIKU {
# Only Haiku might use gcc 4. We use the existence of a libstdc++.r4.so in
# /boot/develop/lib/x86 to judge whether this is a BeOS compatible and thus
# gcc 2 platform. This is not entirely correct, but should be good enough
# for the time being.
local isGCC2Primary = [ Glob /boot/system/develop/lib/x86 : libstdc++.r4.so ] ;
local path ;
for path in $(PATH) {
if $(path) = /boot/system/bin {
if ! $(isGCC2Primary) {
IS_GCC_4_PLATFORM = 1 ;
}
break ;
}
if $(path:D) = /boot/system/bin {
if $(path:B) != x86_gcc2 {
IS_GCC_4_PLATFORM = 1 ;
}
break ;
}
}
} else {
IS_GCC_4_PLATFORM = 1 ;
}
include [ FDirName $(BUILD_DIR) HelperRules ] ;
include [ FDirName $(BUILD_DIR) ConfigRules ] ;
include [ FDirName $(BUILD_DIR) OverriddenJamRules ] ;
include [ FDirName $(BUILD_DIR) MainBuildRules ] ;
include [ FDirName $(BUILD_DIR) BuildSettings ] ;
FULL_DISTRO_DIR = [ FDirName $(TOP) generated distro-$(PLATFORM)-with-libs ] ;
# Include UserBuildConfig.
{
local userBuildConfig = [ GLOB $(BUILD_DIR) : UserBuildConfig ] ;
if $(userBuildConfig)
{
LOCATE on UserBuildConfig = $(BUILD_DIR) ;
include UserBuildConfig ;
}
}
# default to strip generated apps if not specified otherwise:
STRIP_APPS ?= 0 ;
# Cache files for header scanning and jamfile caching.
HCACHEFILE = header_cache ;
JCACHEFILE = jamfile_cache ;
LOCATE on $(HCACHEFILE) $(JCACHEFILE) = $(GENERATED_DIR) ;
rule Distro
{
local target = $(1) ;
NotFile $(target) ;
Always $(target) ;
}
actions Distro
{
echo "making distro $(DISTRO_DIR)" ;
# cp -a $(TOP)/Changes.txt $(DISTRO_DIR)/ ;
# cp -a $(TOP)/Readme.txt $(DISTRO_DIR)/ ;
cp -a $(TOP)/LICENSE $(DISTRO_DIR)/ ;
mimeset $(DISTRO_DIR) ;
}
Depends fulldistro : distro ;
rule FullDistro
{
local target = $(1) ;
NotFile $(target) ;
Always $(target) ;
}
actions FullDistro
{
echo "making full distro $(FULL_DISTRO_DIR)" ;
rm -rf $(FULL_DISTRO_DIR) ;
cp -a $(DISTRO_DIR) $(FULL_DISTRO_DIR) ;
# mkdir -p $(FULL_DISTRO_DIR)/lib ;
# cp $(TOP)/lib/$(LIBCRYPTLIB) $(FULL_DISTRO_DIR)/lib/ ;
# cp $(TOP)/lib/$(LIBFREETYPE) $(FULL_DISTRO_DIR)/lib/ ;
# cp $(TOP)/lib/$(LIBXERCES) $(FULL_DISTRO_DIR)/lib/ ;
mimeset $(FULL_DISTRO_DIR) ;
}