8
0
mirror of https://github.com/FirebirdSQL/firebird.git synced 2025-01-23 21:23:03 +01:00
firebird-mirror/builds/install/arch-specific/linux/Makefile.in

128 lines
3.7 KiB
Makefile
Raw Normal View History

2003-07-09 00:59:57 +02:00
#
# The contents of this file are subject to the Initial
# Developer's Public License Version 1.0 (the "License");
# you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
# http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_idpl.
#
# Software distributed under the License is distributed AS IS,
# WITHOUT WARRANTY OF ANY KIND, either express or implied.
# See the License for the specific language governing rights
# and limitations under the License.
#
# The Original Code was created by Mark O'Donohue
# for the Firebird Open Source RDBMS project.
#
# Copyright (c) Mark O'Donohue <mark.odonohue@ludwig.edu.au>
# and all contributors signed below.
#
# All Rights Reserved.
# Contributor(s): ______________________________________.
2003-07-09 00:59:57 +02:00
#
2022-08-30 13:47:47 +02:00
#
2003-07-09 00:59:57 +02:00
#
ROOT=..
include $(ROOT)/gen/make.defaults
include $(ROOT)/gen/make.platform
include $(ROOT)/gen/make.rules
include $(ROOT)/gen/make.shared.variables
@SET_MAKE@
.PHONY: install dist packages tarfile
.PHONY: buildTarDir buildImageDir buildRoot buildDebugInfo
2003-07-09 00:59:57 +02:00
# Some of these targets are run from the root tree of the build.
# those need to know where the install subdirectory is kept.
# Others are run locally these need to know the path back to the
# root of the build tree.
BuildRoot=$(GEN_ROOT)
InstallRoot=.
BuildVersion=$(FirebirdVersion).$(BuildNum)
Version=$(BuildVersion)-$(PackageVersion)
2014-02-27 16:55:14 +01:00
# This means something like: FirebirdCS-*.0.0-*.i386.tar.gz
2003-07-09 00:59:57 +02:00
2022-08-30 13:47:47 +02:00
TarDir=Firebird-$(Version)-linux-$(CpuType)
TarFile=Firebird-$(Version)-linux-$(CpuType).tar.gz
DebugDir=Firebird-$(Version)-linux-$(CpuType)-debugSymbols
DebugFile=Firebird-$(Version)-linux-$(CpuType)-debugSymbols.tar.gz
2003-07-09 00:59:57 +02:00
PkgSrcDir=$(InstallRoot)/$(ArchType)
fb_install_prefix=@prefix@
MiscDir=$(shell echo @FB_MISCDIR@)
2013-11-28 17:37:00 +01:00
DebugManifest=manifest_debug.txt
2003-07-09 00:59:57 +02:00
TarInstallDir=$(GEN_ROOT)/install
#Curses library
TermLib=@TERMLIB@.so
2003-07-09 00:59:57 +02:00
dist : packages
packages: tarfile debugfile
2003-07-09 00:59:57 +02:00
tarfile: $(TarFile)
$(TarFile) : buildTarDir
(cd $(GEN_ROOT); tar -czf $(TarFile) $(TarDir))
debugfile: $(DebugFile)
2003-07-09 00:59:57 +02:00
$(DebugFile) : buildImageDir
2013-11-28 17:37:00 +01:00
(cd $(GEN_ROOT)/$(DebugDir); tar -czf ../$(DebugFile) .)
buildRoot:
2003-07-09 00:59:57 +02:00
(cd $(GEN_ROOT); ./install/makeInstallImage.sh)
buildDebugInfo: buildRoot
mkdir -p $(GEN_ROOT)/$(DebugDir)
for x in `(cd $(GEN_ROOT)/buildroot; find)`; do \
FIL=$(GEN_ROOT)/buildroot/$$x; \
D_FIL=$(GEN_ROOT)/$(DebugDir)/`dirname $${x}`/.debug/`basename $${x}`.debug; \
if [ ! -h $$FIL ] && readelf -h $$FIL > /dev/null 2> /dev/null; then \
mkdir -p $(GEN_ROOT)/$(DebugDir)/`dirname $$x`/.debug; \
echo Generating external debug info for $$x; \
cp $${FIL} $${D_FIL}; \
objcopy --add-gnu-debuglink=$${D_FIL} $${FIL}; \
echo Stripping unneeded symbols from $${x}; \
objcopy --strip-debug --strip-unneeded $${FIL}; \
fi; \
done
2013-11-28 17:37:00 +01:00
(cd $(GEN_ROOT)/$(DebugDir); mkdir -p ./$(MiscDir); \
find . -type f -name '*.debug' -print >./$(MiscDir)/$(DebugManifest))
2003-07-09 00:59:57 +02:00
# Use this line if you don't want to use separate debug info
#buildImageDir: buildRoot
buildImageDir: buildDebugInfo
2003-07-09 00:59:57 +02:00
buildTarDir: buildImageDir
mkdir -p $(GEN_ROOT)/$(TarDir)
cp -r $(GEN_ROOT)/install/install.sh $(GEN_ROOT)/$(TarDir)
chmod a+x $(GEN_ROOT)/$(TarDir)/*.sh
2003-07-09 00:59:57 +02:00
(cd $(GEN_ROOT)/$(TarDir); tar -C ../buildroot -czf buildroot.tar.gz . )
(cd $(GEN_ROOT)/$(TarDir); tar -tzf buildroot.tar.gz > manifest.txt )
install: buildTarDir
(cd $(GEN_ROOT)/$(TarDir); FIREBIRD= FIREBIRD_LOCK= ./install.sh)
cp -r $(GEN_ROOT)/$(DebugDir)/* /
silent_install: buildTarDir
(cd $(GEN_ROOT)/$(TarDir); FIREBIRD= FIREBIRD_LOCK= ./install.sh -silent)
cp -r $(GEN_ROOT)/$(DebugDir)/* /