Debian Codegraph @

builds/install/arch-specific/linux/Makefile.in

raw
1 #
2 # The contents of this file are subject to the Initial
3 # Developer's Public License Version 1.0 (the "License");
4 # you may not use this file except in compliance with the
5 # License. You may obtain a copy of the License at
6 # http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
7 #
8 # Software distributed under the License is distributed AS IS,
9 # WITHOUT WARRANTY OF ANY KIND, either express or implied.
10 # See the License for the specific language governing rights
11 # and limitations under the License.
12 #
13 # The Original Code was created by Mark O'Donohue
14 # for the Firebird Open Source RDBMS project.
15 #
16 # Copyright (c) Mark O'Donohue <[email protected]>
17 # and all contributors signed below.
18 #
19 # All Rights Reserved.
20 # Contributor(s): ______________________________________.
21 #
22 #
23 #
24 ROOT=..
25
26
27
28 include $(ROOT)/gen/make.defaults
29 include $(ROOT)/gen/make.platform
30 include $(ROOT)/gen/make.rules
31 include $(ROOT)/gen/make.shared.variables
32
33
34 @SET_MAKE@
35
36 .PHONY: install dist packages tarfile
37 .PHONY: buildTarDir buildImageDir buildRoot buildDebugInfo
38
39 # Some of these targets are run from the root tree of the build.
40 # those need to know where the install subdirectory is kept.
41 # Others are run locally these need to know the path back to the
42 # root of the build tree.
43
44 BuildRoot=$(GEN_ROOT)
45
46 InstallRoot=.
47
48 BuildVersion=$(FirebirdVersion).$(BuildNum)
49
50 Version=$(BuildVersion)-$(PackageVersion)
51
52
53
54 # This means something like: FirebirdCS-*.0.0-*.i386.tar.gz
55
56 TarDir= Firebird-$(Version).$(CpuType)
57 TarFile=Firebird-$(Version).$(CpuType).tar.gz
58 DebugDir=Firebird-debuginfo-$(Version).$(CpuType)
59 DebugFile=Firebird-debuginfo-$(Version).$(CpuType).tar.gz
60
61
62 PkgSrcDir=$(InstallRoot)/$(ArchType)
63 fb_install_prefix=@prefix@
64 MiscDir=$(shell echo @FB_MISCDIR@)
65 DebugManifest=manifest_debug.txt
66
67
68 TarInstallDir=$(GEN_ROOT)/install
69
70 #Curses library
71 TermLib=@[email protected]
72
73
74 dist : packages
75
76 packages: tarfile debugfile
77
78 tarfile: $(TarFile)
79
80 $(TarFile) : buildTarDir
81 (cd $(GEN_ROOT); tar -czf $(TarFile) $(TarDir))
82
83 debugfile: $(DebugFile)
84
85 $(DebugFile) : buildImageDir
86 (cd $(GEN_ROOT)/$(DebugDir); tar -czf ../$(DebugFile) .)
87
88 buildRoot:
89 (cd $(GEN_ROOT); ./install/makeInstallImage.sh)
90
91 buildDebugInfo: buildRoot
92 mkdir -p $(GEN_ROOT)/$(DebugDir)
93 for x in `(cd $(GEN_ROOT)/buildroot; find)`; do \
94 FIL=$(GEN_ROOT)/buildroot/$$x; \
95 D_FIL=$(GEN_ROOT)/$(DebugDir)/`dirname $${x}`/.debug/`basename $${x}`.debug; \
96 if [ ! -h $$FIL ] && readelf -h $$FIL > /dev/null 2> /dev/null; then \
97 mkdir -p $(GEN_ROOT)/$(DebugDir)/`dirname $$x`/.debug; \
98 echo Generating external debug info for $$x; \
99 cp $${FIL} $${D_FIL}; \
100 objcopy --add-gnu-debuglink=$${D_FIL} $${FIL}; \
101 echo Stripping unneeded symbols from $${x}; \
102 objcopy --strip-debug --strip-unneeded $${FIL}; \
103 fi; \
104 done
105 (cd $(GEN_ROOT)/$(DebugDir); mkdir -p ./$(MiscDir); \
106 find . -type f -name '*.debug' -print >./$(MiscDir)/$(DebugManifest))
107
108 # Use this line if you don't want to use separate debug info
109 #buildImageDir: buildRoot
110 buildImageDir: buildDebugInfo
111
112
113 buildTarDir: buildImageDir
114 mkdir -p $(GEN_ROOT)/$(TarDir)
115 cp -r $(GEN_ROOT)/install/install.sh $(GEN_ROOT)/$(TarDir)
116 chmod a+x $(GEN_ROOT)/$(TarDir)/*.sh
117 (cd $(GEN_ROOT)/$(TarDir); tar -C ../buildroot -czf buildroot.tar.gz . )
118 (cd $(GEN_ROOT)/$(TarDir); tar -tzf buildroot.tar.gz > manifest.txt )
119
120
121 install: buildTarDir
122 (cd $(GEN_ROOT)/$(TarDir); FIREBIRD= FIREBIRD_LOCK= ./install.sh)
123 cp -r $(GEN_ROOT)/$(DebugDir)/* /
124
125 silent_install: buildTarDir
126 (cd $(GEN_ROOT)/$(TarDir); FIREBIRD= FIREBIRD_LOCK= ./install.sh -silent)
127 cp -r $(GEN_ROOT)/$(DebugDir)/* /