removed hardcoded version number from the top Makefile.fpc with help from Mazen

git-svn-id: trunk@16813 -
This commit is contained in:
vincents 2008-09-30 14:00:51 +00:00
parent d5806801ca
commit af8229264b
3 changed files with 180 additions and 18 deletions

185
Makefile
View File

@ -2,7 +2,7 @@
# Don't edit, this file is generated by FPCMake Version 2.0.0 [2008/08/20]
#
default: all
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded
MAKEFILETARGETS=i386-linux i386-go32v2 i386-win32 i386-os2 i386-freebsd i386-beos i386-haiku i386-netbsd i386-solaris i386-qnx i386-netware i386-openbsd i386-wdosx i386-darwin i386-emx i386-watcom i386-netwlibc i386-wince i386-embedded i386-symbian m68k-linux m68k-freebsd m68k-netbsd m68k-amiga m68k-atari m68k-openbsd m68k-palmos m68k-embedded powerpc-linux powerpc-netbsd powerpc-amiga powerpc-macos powerpc-darwin powerpc-morphos powerpc-embedded sparc-linux sparc-netbsd sparc-solaris sparc-embedded x86_64-linux x86_64-freebsd x86_64-darwin x86_64-win64 x86_64-embedded arm-linux arm-palmos arm-darwin arm-wince arm-gba arm-nds arm-embedded arm-symbian powerpc64-linux powerpc64-darwin powerpc64-embedded avr-embedded armeb-linux armeb-embedded
BSDs = freebsd netbsd openbsd darwin
UNIXs = linux $(BSDs) solaris qnx
LIMIT83fs = go32v2 os2 emx watcom
@ -166,6 +166,17 @@ OS_TARGET:=$(word 5,$(FPC_COMPILERINFO))
endif
FULL_TARGET=$(CPU_TARGET)-$(OS_TARGET)
FULL_SOURCE=$(CPU_SOURCE)-$(OS_SOURCE)
ifeq ($(CPU_TARGET),armeb)
ARCH=arm
override FPCOPT+=-Cb
else
ifeq ($(CPU_TARGET),armel)
ARCH=arm
override FPCOPT+=-CaEABI
else
ARCH=$(CPU_TARGET)
endif
endif
ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),)
TARGETSUFFIX=$(OS_TARGET)
SOURCESUFFIX=$(OS_SOURCE)
@ -173,15 +184,9 @@ else
TARGETSUFFIX=$(FULL_TARGET)
SOURCESUFFIX=$(FULL_SOURCE)
endif
ifeq ($(OS_TARGET),darwin)
ifneq ($(OS_SOURCE),darwin)
CROSSCOMPILE=1
endif
else
ifneq ($(FULL_TARGET),$(FULL_SOURCE))
CROSSCOMPILE=1
endif
endif
ifeq ($(findstring makefile,$(MAKECMDGOALS)),)
ifeq ($(findstring $(FULL_TARGET),$(MAKEFILETARGETS)),)
$(error The Makefile doesn't support target $(FULL_TARGET), please run fpcmake first)
@ -193,7 +198,7 @@ endif
ifeq ($(OS_TARGET),linux)
linuxHier=1
endif
export OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
export OS_TARGET OS_SOURCE ARCH CPU_TARGET CPU_SOURCE FULL_TARGET FULL_SOURCE TARGETSUFFIX SOURCESUFFIX CROSSCOMPILE
ifdef FPCDIR
override FPCDIR:=$(subst \,/,$(FPCDIR))
ifeq ($(wildcard $(addprefix $(FPCDIR)/,rtl units)),)
@ -233,20 +238,27 @@ endif
ifndef CROSSBINDIR
CROSSBINDIR:=$(wildcard $(FPCDIR)/bin/$(TARGETSUFFIX))
endif
ifeq ($(OS_TARGET),darwin)
ifeq ($(OS_SOURCE),darwin)
DARWIN2DARWIN=1
endif
endif
ifndef BINUTILSPREFIX
ifndef CROSSBINDIR
ifdef CROSSCOMPILE
ifndef DARWIN2DARWIN
BINUTILSPREFIX=$(CPU_TARGET)-$(OS_TARGET)-
endif
endif
endif
endif
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(TARGETSUFFIX))
ifeq ($(UNITSDIR),)
UNITSDIR:=$(wildcard $(FPCDIR)/units/$(OS_TARGET))
endif
PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
override PACKAGE_NAME=lazarus
override PACKAGE_VERSION=0.9.25
override PACKAGE_VERSION=$(IDEVERSION)
RCPP?=$(strip $(firstword cpp$(SRCEXEEXT)))
LAZARUS_INSTALL_DIR=$(INSTALL_PREFIX)/share/lazarus
INSTALL_MAN_DIR=$(INSTALL_PREFIX)/share/man
@ -256,6 +268,11 @@ endif
ifneq ($(findstring $(OS_TARGET),freebsd),)
LAZARUS_INSTALL_DIR=/usr/local/lazarus
endif
ifneq ($(findstring $(OS_TARGET),win32 win64),)
IDEVERSION=$(shell .\tools\install\get_lazarus_version.bat)
else
IDEVERSION=$(shell ./tools/install/get_lazarus_version.sh)
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
@ -274,6 +291,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
ifeq ($(FULL_TARGET),i386-haiku)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
@ -391,6 +411,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
ifeq ($(FULL_TARGET),arm-darwin)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
@ -415,6 +438,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
ifeq ($(FULL_TARGET),avr-embedded)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
ifeq ($(FULL_TARGET),armeb-linux)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_DIRS+=lcl components packager/registration ideintf designer packager
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
@ -433,6 +465,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
ifeq ($(FULL_TARGET),i386-haiku)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
@ -550,6 +585,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
ifeq ($(FULL_TARGET),arm-darwin)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
@ -574,6 +612,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
ifeq ($(FULL_TARGET),avr-embedded)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
ifeq ($(FULL_TARGET),armeb-linux)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_PROGRAMS+=lazarus startlazarus
endif
ifeq ($(FULL_TARGET),i386-linux)
override TARGET_EXAMPLEDIRS+=examples
endif
@ -592,6 +639,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override TARGET_EXAMPLEDIRS+=examples
endif
ifeq ($(FULL_TARGET),i386-haiku)
override TARGET_EXAMPLEDIRS+=examples
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override TARGET_EXAMPLEDIRS+=examples
endif
@ -709,6 +759,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override TARGET_EXAMPLEDIRS+=examples
endif
ifeq ($(FULL_TARGET),arm-darwin)
override TARGET_EXAMPLEDIRS+=examples
endif
ifeq ($(FULL_TARGET),arm-wince)
override TARGET_EXAMPLEDIRS+=examples
endif
@ -733,6 +786,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override TARGET_EXAMPLEDIRS+=examples
endif
ifeq ($(FULL_TARGET),avr-embedded)
override TARGET_EXAMPLEDIRS+=examples
endif
ifeq ($(FULL_TARGET),armeb-linux)
override TARGET_EXAMPLEDIRS+=examples
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override TARGET_EXAMPLEDIRS+=examples
endif
ifeq ($(FULL_TARGET),i386-linux)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -751,6 +813,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-haiku)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),i386-netbsd)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -868,6 +933,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),arm-darwin)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),arm-wince)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
@ -892,6 +960,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),avr-embedded)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),armeb-linux)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
ifeq ($(FULL_TARGET),armeb-embedded)
override CLEAN_FILES+=$(wildcard *$(OEXT)) $(wildcard *$(PPUEXT)) $(wildcard *$(RSTEXT))
endif
override INSTALL_BASEDIR=share/lazarus
override INSTALL_FPCPACKAGE=n
override DIST_DESTDIR=$(BASEDIR)/dist
@ -1184,6 +1261,11 @@ BATCHEXT=.sh
EXEEXT=
SHORTSUFFIX=be
endif
ifeq ($(OS_TARGET),haiku)
BATCHEXT=.sh
EXEEXT=
SHORTSUFFIX=hai
endif
ifeq ($(OS_TARGET),solaris)
BATCHEXT=.sh
EXEEXT=
@ -1667,6 +1749,10 @@ ifeq ($(FULL_TARGET),i386-beos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),i386-haiku)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),i386-netbsd)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
@ -1823,6 +1909,10 @@ ifeq ($(FULL_TARGET),arm-palmos)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),arm-darwin)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),arm-wince)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
@ -1855,6 +1945,18 @@ ifeq ($(FULL_TARGET),powerpc64-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),avr-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),armeb-linux)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifeq ($(FULL_TARGET),armeb-embedded)
REQUIRE_PACKAGES_RTL=1
REQUIRE_PACKAGES_REGEXPR=1
endif
ifdef REQUIRE_PACKAGES_RTL
PACKAGEDIR_RTL:=$(firstword $(subst /Makefile.fpc,,$(strip $(wildcard $(addsuffix /rtl/Makefile.fpc,$(PACKAGESDIR))))))
ifneq ($(PACKAGEDIR_RTL),)
@ -1908,13 +2010,13 @@ override COMPILER_UNITDIR+=$(UNITDIR_REGEXPR)
endif
endif
ifndef NOCPUDEF
override FPCOPTDEF=$(CPU_TARGET)
override FPCOPTDEF=$(ARCH)
endif
ifneq ($(OS_TARGET),$(OS_SOURCE))
override FPCOPT+=-T$(OS_TARGET)
endif
ifneq ($(CPU_TARGET),$(CPU_SOURCE))
override FPCOPT+=-P$(CPU_TARGET)
override FPCOPT+=-P$(ARCH)
endif
ifeq ($(OS_SOURCE),openbsd)
override FPCOPT+=-FD$(NEW_BINUTILS_PATH)
@ -2311,7 +2413,7 @@ ifdef inUnix
/bin/sh $(ZIPWRAPPER)
else
ifdef RUNBATCH
$(RUNBATCH) (ZIPWRAPPER)
$(RUNBATCH) $(ZIPWRAPPER)
else
$(ZIPWRAPPER)
endif
@ -2550,6 +2652,14 @@ TARGET_DIRS_IDEINTF=1
TARGET_DIRS_DESIGNER=1
TARGET_DIRS_PACKAGER=1
endif
ifeq ($(FULL_TARGET),i386-haiku)
TARGET_DIRS_LCL=1
TARGET_DIRS_COMPONENTS=1
TARGET_DIRS_PACKAGER/REGISTRATION=1
TARGET_DIRS_IDEINTF=1
TARGET_DIRS_DESIGNER=1
TARGET_DIRS_PACKAGER=1
endif
ifeq ($(FULL_TARGET),i386-netbsd)
TARGET_DIRS_LCL=1
TARGET_DIRS_COMPONENTS=1
@ -2862,6 +2972,14 @@ TARGET_DIRS_IDEINTF=1
TARGET_DIRS_DESIGNER=1
TARGET_DIRS_PACKAGER=1
endif
ifeq ($(FULL_TARGET),arm-darwin)
TARGET_DIRS_LCL=1
TARGET_DIRS_COMPONENTS=1
TARGET_DIRS_PACKAGER/REGISTRATION=1
TARGET_DIRS_IDEINTF=1
TARGET_DIRS_DESIGNER=1
TARGET_DIRS_PACKAGER=1
endif
ifeq ($(FULL_TARGET),arm-wince)
TARGET_DIRS_LCL=1
TARGET_DIRS_COMPONENTS=1
@ -2926,6 +3044,30 @@ TARGET_DIRS_IDEINTF=1
TARGET_DIRS_DESIGNER=1
TARGET_DIRS_PACKAGER=1
endif
ifeq ($(FULL_TARGET),avr-embedded)
TARGET_DIRS_LCL=1
TARGET_DIRS_COMPONENTS=1
TARGET_DIRS_PACKAGER/REGISTRATION=1
TARGET_DIRS_IDEINTF=1
TARGET_DIRS_DESIGNER=1
TARGET_DIRS_PACKAGER=1
endif
ifeq ($(FULL_TARGET),armeb-linux)
TARGET_DIRS_LCL=1
TARGET_DIRS_COMPONENTS=1
TARGET_DIRS_PACKAGER/REGISTRATION=1
TARGET_DIRS_IDEINTF=1
TARGET_DIRS_DESIGNER=1
TARGET_DIRS_PACKAGER=1
endif
ifeq ($(FULL_TARGET),armeb-embedded)
TARGET_DIRS_LCL=1
TARGET_DIRS_COMPONENTS=1
TARGET_DIRS_PACKAGER/REGISTRATION=1
TARGET_DIRS_IDEINTF=1
TARGET_DIRS_DESIGNER=1
TARGET_DIRS_PACKAGER=1
endif
ifdef TARGET_DIRS_LCL
lcl_all:
$(MAKE) -C lcl all
@ -3214,6 +3356,9 @@ endif
ifeq ($(FULL_TARGET),i386-beos)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
ifeq ($(FULL_TARGET),i386-haiku)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
ifeq ($(FULL_TARGET),i386-netbsd)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
@ -3331,6 +3476,9 @@ endif
ifeq ($(FULL_TARGET),arm-palmos)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
ifeq ($(FULL_TARGET),arm-darwin)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
ifeq ($(FULL_TARGET),arm-wince)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
@ -3355,6 +3503,15 @@ endif
ifeq ($(FULL_TARGET),powerpc64-embedded)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
ifeq ($(FULL_TARGET),avr-embedded)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
ifeq ($(FULL_TARGET),armeb-linux)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
ifeq ($(FULL_TARGET),armeb-embedded)
TARGET_EXAMPLEDIRS_EXAMPLES=1
endif
ifdef TARGET_EXAMPLEDIRS_EXAMPLES
examples_all:
$(MAKE) -C examples all
@ -3455,7 +3612,7 @@ purge: cleanlaz
clean: cleanlaz
cleanall: purge
installbase:
ifeq ($(OS_TARGET),win32)
ifneq ($(findstring $(OS_TARGET),win32 win64),)
else
$(MKDIR) $(INSTALL_PREFIX)/share
$(MKDIR) $(INSTALL_PREFIX)/share/lazarus
@ -3466,7 +3623,7 @@ endif
install:
$(MAKE) installbase
$(COPYTREE) . $(LAZARUS_INSTALL_DIR)
ifeq ($(OS_TARGET),win32)
ifneq ($(findstring $(OS_TARGET),win32 win64),)
else
ln -sf $(LAZARUS_INSTALL_DIR)/lazarus $(INSTALL_PREFIX)/bin/lazarus-ide
ln -sf $(LAZARUS_INSTALL_DIR)/startlazarus $(INSTALL_PREFIX)/bin/startlazarus

View File

@ -4,7 +4,7 @@
[package]
name=lazarus
version=0.9.25
version=$(IDEVERSION)
[require]
packages=regexpr
@ -37,6 +37,11 @@ endif
ifneq ($(findstring $(OS_TARGET),freebsd),)
LAZARUS_INSTALL_DIR=/usr/local/lazarus
endif
ifneq ($(findstring $(OS_TARGET),win32 win64),)
IDEVERSION=$(shell .\tools\install\get_lazarus_version.bat)
else
IDEVERSION=$(shell ./tools/install/get_lazarus_version.sh)
endif
#-----------------------------------------------------------------------------
[rules]
@ -107,7 +112,7 @@ cleanall: purge
# create dirs
installbase:
ifeq ($(OS_TARGET),win32)
ifneq ($(findstring $(OS_TARGET),win32 win64),)
else
$(MKDIR) $(INSTALL_PREFIX)/share
@ -122,7 +127,7 @@ endif
install:
$(MAKE) installbase
$(COPYTREE) . $(LAZARUS_INSTALL_DIR)
ifeq ($(OS_TARGET),win32)
ifneq ($(findstring $(OS_TARGET),win32 win64),)
else
ln -sf $(LAZARUS_INSTALL_DIR)/lazarus $(INSTALL_PREFIX)/bin/lazarus-ide

View File

@ -1,6 +1,6 @@
#!/usr/bin/env bash
cat ../../ide/version.inc \
cat $(dirname $0)/../../ide/version.inc \
| tr -d \' | tr -d ' ' | tr -d '\t'
# end.