mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-06 02:08:18 +02:00
* moved package building parts to fpcbuild repository
git-svn-id: trunk@331 -
This commit is contained in:
parent
21ae782854
commit
881848933f
450
Makefile.fpc
450
Makefile.fpc
@ -161,19 +161,16 @@ override TARGET_DIRS:=$(wildcard $(TARGET_DIRS))
|
||||
# Main targets
|
||||
#####################################################################
|
||||
|
||||
.PHONY: help checkfpcdir
|
||||
.PHONY: help
|
||||
|
||||
help:
|
||||
@$(ECHO)
|
||||
@$(ECHO) Directory targets:
|
||||
@$(ECHO)
|
||||
@$(ECHO) $(TARGET_DIRS)
|
||||
@$(ECHO)
|
||||
@$(ECHO) Packing targets are:
|
||||
@$(ECHO)
|
||||
@$(ECHO) go32v2zip,win32zip,linuxzip,freebsdzip,sourcezip,os2zip,emxzip,beoszip,sunoszip,qnxzip,amigazip
|
||||
@$(ECHO)
|
||||
@$(ECHO) Or type 'make all' to build everything
|
||||
@$(ECHO) Targets
|
||||
@$(ECHO) all Alias for build
|
||||
@$(ECHO) build Build a new compiler and all packages
|
||||
@$(ECHO) install Install newly build files
|
||||
@$(ECHO) zipinstall Create zip/tar of installed files
|
||||
@$(ECHO) singlezipinstall Alias for zipinstall
|
||||
@$(ECHO)
|
||||
@exit
|
||||
|
||||
@ -212,42 +209,13 @@ packages_extra_smart:
|
||||
$(MAKE) -C packages extra_smart
|
||||
|
||||
|
||||
#######################################
|
||||
# Install targets
|
||||
#######################################
|
||||
|
||||
demo_install:
|
||||
$(MAKE) -C $(CVSINSTALL)/demo sourceinstall
|
||||
|
||||
man_install:
|
||||
$(MAKE) -C $(CVSINSTALL)/man installman
|
||||
|
||||
doc_install:
|
||||
$(MAKE) -C $(CVSINSTALL)/doc installdoc
|
||||
|
||||
|
||||
#######################################
|
||||
# Packaging targets
|
||||
#######################################
|
||||
|
||||
optzips: optcompinstall optcompzip
|
||||
|
||||
optcompinstall:
|
||||
$(MAKE) compiler_cycle OPT=-dNEWOPTIMIZATIONS
|
||||
$(MAKE) compiler_install
|
||||
$(MAKE) rtl_install
|
||||
|
||||
optcompzip:
|
||||
$(MAKE) fpc_zipinstall PACKAGENAME=optcomp ZIPTARGET=optcompinstall
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Packaging
|
||||
##########################################################################
|
||||
|
||||
BUILDSTAMP=build-stamp.$(FULL_TARGET)
|
||||
|
||||
.PHONY: all clean distclean build install installbase zipinstall singlezipinstall
|
||||
.PHONY: all clean distclean build install installbase installother zipinstallbase zipinstallotherzipinstall singlezipinstall
|
||||
|
||||
all: build
|
||||
|
||||
@ -286,42 +254,11 @@ installbase:
|
||||
# create dirs
|
||||
$(MKDIR) $(INSTALL_BASEDIR)
|
||||
$(MKDIR) $(INSTALL_BINDIR)
|
||||
ifndef SNAPSHOT
|
||||
ifndef CROSSINSTALL
|
||||
# readme & whatsnew and docs
|
||||
$(MKDIR) $(INSTALL_DOCDIR)
|
||||
-$(COPY) $(addprefix $(CVSINSTALL)/doc/,*.txt copying* faq.*) $(INSTALL_DOCDIR)
|
||||
# bingo32 (cwsdpmi,wmemu387.dxe)
|
||||
ifeq ($(OS_TARGET),go32v2)
|
||||
$(COPY) $(CVSINSTALL)/bingo32/*.dxe $(INSTALL_BINDIR)
|
||||
$(COPY) $(CVSINSTALL)/bingo32/*.exe $(INSTALL_BINDIR)
|
||||
endif
|
||||
# binw32 (*.dll,*.exe,*.ico)
|
||||
ifneq ($(patsubst %/,%,$(subst \,/,$(dir $(CPPROG)))),$(patsubst %/,%,$(subst \,/,$(INSTALL_BINDIR))))
|
||||
ifeq ($(OS_TARGET),win32)
|
||||
$(COPY) $(addprefix $(CVSINSTALL)/binw32/,*.ico *.exe *.dll *.h) $(INSTALL_BINDIR)
|
||||
endif
|
||||
endif
|
||||
# binos2 (emx.dll,emxwrap.dll,unzip32.dll,fp2.ico)
|
||||
ifeq ($(OS_TARGET),os2)
|
||||
$(COPY) $(addprefix $(CVSINSTALL)/binos2/,*.ico *.dll) $(INSTALL_BINDIR)
|
||||
endif
|
||||
# binos2 (emx.dll,emxwrap.dll,unzip32.dll,fp2.ico)
|
||||
ifeq ($(OS_TARGET),emx)
|
||||
$(COPY) $(addprefix $(CVSINSTALL)/binos2/,*.ico *.dll) $(INSTALL_BINDIR)
|
||||
endif
|
||||
# manpages for UNIX systems
|
||||
ifneq ($(findstring $(OS_TARGET),linux freebsd sunos qnx),)
|
||||
$(MAKE) -C $(CVSINSTALL)/man installman
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
# install generated things
|
||||
# install compiler+rtl
|
||||
$(MAKE) compiler_$(INSTALLTARGET) $(INSTALLOPTS)
|
||||
$(MAKE) rtl_$(INSTALLTARGET) $(INSTALLOPTS)
|
||||
|
||||
install: $(BUILDSTAMP)
|
||||
$(MAKE) installbase $(INSTALLOPTS)
|
||||
installother:
|
||||
$(MAKE) packages_$(INSTALLTARGET) $(INSTALLOPTS)
|
||||
$(MAKE) fcl_$(INSTALLTARGET) $(INSTALLOPTS)
|
||||
$(MAKE) fv_$(INSTALLTARGET) $(INSTALLOPTS)
|
||||
@ -330,8 +267,10 @@ ifdef IDE
|
||||
$(MAKE) ide_$(INSTALLTARGET) $(BUILDOPTS)
|
||||
endif
|
||||
|
||||
zipinstall: $(BUILDSTAMP)
|
||||
zipinstallbase:
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=installbase ZIPNAME=base $(INSTALLOPTS)
|
||||
|
||||
zipinstallother:
|
||||
$(MAKE) packages_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGUNITSPRE)
|
||||
$(MAKE) fcl_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGUNITSPRE)
|
||||
$(MAKE) fv_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGUNITSPRE)
|
||||
@ -340,8 +279,14 @@ ifdef IDE
|
||||
$(MAKE) ide_zip$(INSTALLTARGET) $(INSTALLOPTS)
|
||||
endif
|
||||
|
||||
singlezipinstall: $(BUILDSTAMP)
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=install ZIPNAME=fpc $(INSTALLOPTS)
|
||||
|
||||
install: $(BUILDSTAMP)
|
||||
$(MAKE) installbase $(INSTALLOPTS)
|
||||
$(MAKE) installother $(INSTALLOPTS)
|
||||
|
||||
singlezipinstall: zipinstall
|
||||
zipinstall: $(BUILDSTAMP)
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=install ZIPNAME=fpc-$(PACKAGE_VERSION) $(INSTALLOPTS)
|
||||
|
||||
|
||||
##########################################################################
|
||||
@ -361,356 +306,3 @@ crosszipinstall:
|
||||
|
||||
crosssinglezipinstall:
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=crossinstall ZIPNAME=fpc $(INSTALLOPTS)
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Docs
|
||||
##########################################################################
|
||||
|
||||
.PHONY: docspdf makepackdocs docsrcinstall docsrc
|
||||
|
||||
# We don't want the package name fpc in the path
|
||||
DOCSOURCEDIR=$(INSTALL_SOURCEDIR)/../docs
|
||||
|
||||
docspdf:
|
||||
$(MAKE) -C docs pdfinstall DOCINSTALLDIR=$(PACKDIR)
|
||||
|
||||
# Used by makepack to generate unix installation .tar
|
||||
makepackdocs:
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=docspdf FULLZIPNAME=docs
|
||||
|
||||
docsrcinstall:
|
||||
$(MAKE) -C docs clean
|
||||
$(MKDIR) $(DOCSOURCEDIR)
|
||||
$(COPYTREE) docs/* $(DOCSOURCEDIR)
|
||||
|
||||
docsrc:
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=docsrcinstall FULLZIPNAME=docsrc
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Demos
|
||||
##########################################################################
|
||||
|
||||
.PHONY: demozip
|
||||
|
||||
# We don't want the package name fpc in the path
|
||||
ifdef UNIXHier
|
||||
DEMOSOURCEDIR=$(INSTALL_DOCDIR)/../demo
|
||||
else
|
||||
DEMOSOURCEDIR=$(INSTALL_PREFIX)/demo
|
||||
endif
|
||||
|
||||
demosrcinstall:
|
||||
$(MAKE) -C demo clean
|
||||
$(MKDIR) $(DEMOSOURCEDIR)
|
||||
$(COPYTREE) demo/* $(DEMOSOURCEDIR)
|
||||
|
||||
demozip:
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=demosrcinstall FULLZIPNAME=demo
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Source targets
|
||||
##########################################################################
|
||||
|
||||
.PHONY: sourcebase sourcezip
|
||||
|
||||
# We don't want the fpc/ package prefix
|
||||
INSTALL_BASESOURCEDIR=$(INSTALL_SOURCEDIR)/..
|
||||
|
||||
sourcebase:
|
||||
# base Makefiles needed for sources
|
||||
$(MKDIR) $(INSTALL_BASESOURCEDIR)
|
||||
$(MKDIR) $(INSTALL_BASESOURCEDIR)/rtl
|
||||
$(MKDIR) $(INSTALL_BASESOURCEDIR)/packages
|
||||
$(MKDIR) $(INSTALL_BASESOURCEDIR)/packages/base
|
||||
$(MKDIR) $(INSTALL_BASESOURCEDIR)/packages/extra
|
||||
$(COPY) Makefile* $(INSTALL_BASESOURCEDIR)
|
||||
$(COPY) rtl/Makefile* $(INSTALL_BASESOURCEDIR)/rtl
|
||||
$(COPY) packages/Makefile* $(INSTALL_BASESOURCEDIR)/packages
|
||||
$(COPY) packages/base/Makefile* $(INSTALL_BASESOURCEDIR)/packages/base
|
||||
$(COPY) packages/extra/Makefile* $(INSTALL_BASESOURCEDIR)/packages/extra
|
||||
|
||||
sourcezip:
|
||||
$(MAKE) fpc_zipinstall ZIPTARGET=sourcebase ZIPNAME=base ZIPSUFFIX=$(ZIPSOURCESUFFIX)
|
||||
$(MAKE) compiler_zipsourceinstall
|
||||
$(MAKE) rtl_zipsourceinstall
|
||||
$(MAKE) packages_zipsourceinstall ZIPPREFIX=$(PKGUNITSPRE)
|
||||
$(MAKE) fcl_zipsourceinstall
|
||||
$(MAKE) fv_zipsourceinstall
|
||||
$(MAKE) utils_zipsourceinstall
|
||||
$(MAKE) ide_zipsourceinstall
|
||||
$(MAKE) installer_zipsourceinstall
|
||||
|
||||
|
||||
##########################################################################
|
||||
# OS targets
|
||||
##########################################################################
|
||||
|
||||
BUILDTARGETS=go32v2 win32 linux freebsd netbsd openbsd os2 emx sunos qnx beos
|
||||
|
||||
.PHONY: go32v2 win32 linux freebsd os2 emx netbsd openbsd go32v2zip win32zip linuxzip freebsdzip os2zip emxzip netbsdzip openbsdzip
|
||||
|
||||
$(BUILDTARGETS): checkfpcdir
|
||||
$(MAKE) install OS_TARGET=$@
|
||||
|
||||
$(addsuffix zip,$(filter-out beos sunos,$(BUILDTARGETS))): checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=$(subst zip,,$@)
|
||||
|
||||
beoszip : checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=beos USEZIP=1
|
||||
|
||||
sunoszip: checkfpcdir
|
||||
$(MAKE) zipinstall OS_TARGET=sunos TARPROG=gtar
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Dos, OS/2 Short 8.3 Names
|
||||
##########################################################################
|
||||
|
||||
.PHONY: renametoshort shortsrc shortbin shortnames
|
||||
|
||||
renametoshort:
|
||||
# Compiler parts
|
||||
-mv base$(ZIPSUFFIX).zip base$(ZIPSUFFIXSHORT).zip
|
||||
-mv compiler$(ZIPSUFFIX).zip comp$(ZIPSUFFIXSHORT).zip
|
||||
-mv utils$(ZIPSUFFIX).zip util$(ZIPSUFFIXSHORT).zip
|
||||
-mv installer$(ZIPSUFFIX).zip inst$(ZIPSUFFIXSHORT).zip
|
||||
# Packages
|
||||
-mv $(PKGUNITSPRE)fcl$(ZIPSUFFIX).zip ufcl$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)gdbint$(ZIPSUFFIX).zip ugdb$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)regexpr$(ZIPSUFFIX).zip ureg$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)paszlib$(ZIPSUFFIX).zip upzl$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)unzip$(ZIPSUFFIX).zip uzip$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)netdb$(ZIPSUFFIX).zip undb$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)ftpapi$(ZIPSUFFIX).zip uftp$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)hwvideo$(ZIPSUFFIX).zip uhwv$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)clkdll$(ZIPSUFFIX).zip uclk$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)pasjpeg$(ZIPSUFFIX).zip upjp$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)fv$(ZIPSUFFIX).zip ufv$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)rexx$(ZIPSUFFIX).zip urexx$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)zlib$(ZIPSUFFIX).zip uzlib$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)mmtk$(ZIPSUFFIX).zip ummtk$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)lvm$(ZIPSUFFIX).zip ulvm$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)imlib$(ZIPSUFFIX).zip uimlb$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)libpng$(ZIPSUFFIX).zip ulpng$(ZIPSUFFIXSHORT).zip
|
||||
-mv $(PKGUNITSPRE)opengl$(ZIPSUFFIX).zip uogl$(ZIPSUFFIXSHORT).zip
|
||||
|
||||
shortsrc:
|
||||
$(MAKE) renametoshort ZIPSUFFIX=$(ZIPSOURCESUFFIX) ZIPSUFFIXSHORT=src
|
||||
|
||||
shortbin:
|
||||
$(MAKE) renametoshort ZIPSUFFIXSHORT=$(SHORTSUFFIX)
|
||||
|
||||
shortnames: shortsrc shortbin
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Win32, Go32v2, OS/2
|
||||
##########################################################################
|
||||
|
||||
.PHONY: dist
|
||||
|
||||
dist:
|
||||
$(MAKE) sourcezip
|
||||
$(MAKE) demozip
|
||||
$(MAKE) zipinstall
|
||||
ifneq ($(findstring $(OS_TARGET),$(LIMIT83fs)),)
|
||||
$(MAKE) shortnames
|
||||
endif
|
||||
|
||||
|
||||
##########################################################################
|
||||
# Debian
|
||||
##########################################################################
|
||||
|
||||
ifdef inUnix
|
||||
|
||||
ifneq ($(wildcard $(CVSINSTALL)/debian/changelog),)
|
||||
|
||||
.PHONY: debcopy deb
|
||||
|
||||
DEBPACKAGEVERSION:=$(shell head -n 1 $(CVSINSTALL)/debian/changelog | awk '{ print $$2 }' | tr -d '[()]')
|
||||
DEBFPCVERSION:=$(shell echo $(DEBPACKAGEVERSION) | awk -F '-' '{ print $$1 }')
|
||||
DEBSRCDIR:=$(BUILDDIR)/fpc-$(DEBFPCVERSION)
|
||||
|
||||
debcheck:
|
||||
ifneq ($(DEBFPCVERSION),$(PACKAGE_VERSION))
|
||||
@$(ECHO) "Debian version ($(DEBFPCVERSION)) is not correct, expect $(PACKAGE_VERSION)"
|
||||
@exit 1
|
||||
endif
|
||||
|
||||
debcopy: distclean
|
||||
rm -rf $(DEBSRCDIR)
|
||||
install -d $(DEBSRCDIR)
|
||||
$(COPYTREE) compiler $(DEBSRCDIR)
|
||||
$(COPYTREE) rtl $(DEBSRCDIR)
|
||||
$(COPYTREE) fcl $(DEBSRCDIR)
|
||||
$(COPYTREE) fv $(DEBSRCDIR)
|
||||
$(COPYTREE) ide $(DEBSRCDIR)
|
||||
$(COPYTREE) packages $(DEBSRCDIR)
|
||||
$(COPYTREE) utils $(DEBSRCDIR)
|
||||
$(COPYTREE) demo $(DEBSRCDIR)
|
||||
$(COPYTREE) logs $(DEBSRCDIR)
|
||||
ifndef NODOCS
|
||||
$(COPYTREE) docs $(DEBSRCDIR)
|
||||
endif
|
||||
$(COPYTREE) Makefile* $(DEBSRCDIR)
|
||||
$(COPYTREE) $(CVSINSTALL)/debian $(DEBSRCDIR)
|
||||
$(COPYTREE) $(CVSINSTALL)/man $(DEBSRCDIR)
|
||||
$(COPYTREE) $(CVSINSTALL)/doc $(DEBSRCDIR)
|
||||
find $(DEBSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
|
||||
chmod 755 $(DEBSRCDIR)/debian/rules
|
||||
|
||||
debbuild:
|
||||
ifdef NODOCS
|
||||
cd $(DEBSRCDIR) ; fakeroot debian/rules binary-arch
|
||||
else
|
||||
cd $(DEBSRCDIR) ; fakeroot debian/rules binary
|
||||
endif
|
||||
mv $(DEBSRCDIR)/../*.deb .
|
||||
|
||||
debclean:
|
||||
rm -rf $(DEBSRCDIR)
|
||||
-rmdir $(BUILDDIR)
|
||||
|
||||
debtargz: checkfpcdir
|
||||
$(MAKE) fpc_zipinstall USETAR=y ZIPTARGET=debcopy PACKDIR=$(DEBSRCDIR) FULLZIPNAME=fpc-$(DEBFPCVERSION).orig
|
||||
|
||||
deb: checkfpcdir debcheck debcopy debbuild debclean
|
||||
|
||||
endif # changelog found
|
||||
|
||||
endif
|
||||
|
||||
|
||||
##########################################################################
|
||||
# RPM
|
||||
##########################################################################
|
||||
|
||||
ifdef inUnix
|
||||
|
||||
# rpm available?
|
||||
RPM:=$(strip $(wildcard $(addsuffix /rpm$(SRCEXEEXT),$(SEARCHPATH))))
|
||||
ifneq ($(RPM),)
|
||||
|
||||
ifneq ($(wildcard $(CVSINSTALL)/fpc.spec),)
|
||||
|
||||
.PHONY: rpmcopy rpm
|
||||
|
||||
# Only the recent rpms have rpmbuild
|
||||
RPMBUILD=$(strip $(wildcard $(addsuffix /rpmbuild,$(SEARCHPATH))))
|
||||
ifeq ($(RPMBUILD),)
|
||||
RPMBUILD=$(strip $(wildcard $(addsuffix /rpm,$(SEARCHPATH))))
|
||||
endif
|
||||
RPMDIR=$(BUILDDIR)/rpm
|
||||
RPMSPECFILE:=$(RPMDIR)/SPECS/fpc-$(PACKAGE_VERSION).spec
|
||||
RPMSOURCEFILE:=$(RPMDIR)/SOURCES/fpc-$(PACKAGE_VERSION)-src.tar.gz
|
||||
RPMSRCDIR:=$(RPMDIR)/SOURCES/fpc
|
||||
RPMDEFINES=--define "_topdir $(RPMDIR)" \
|
||||
--define "_sourcedir $(RPMDIR)/SOURCES" \
|
||||
--define "_builddir $(RPMDIR)/BUILD" \
|
||||
--define "_rpmdir $(RPMDIR)/RPMS" \
|
||||
--define "_srcrpmdir $(RPMDIR)/SRPMS"
|
||||
rpmcopy: distclean
|
||||
# false || is needed to workaround fpcmake sections
|
||||
false || [ -d $(RPMDIR) ] || install -d $(RPMDIR)
|
||||
false || [ -d $(RPMDIR)/BUILD ] || install -d $(RPMDIR)/BUILD
|
||||
false || [ -d $(RPMDIR)/SOURCES ] || install -d $(RPMDIR)/SOURCES
|
||||
false || [ -d $(RPMDIR)/SPECS ] || install -d $(RPMDIR)/SPECS
|
||||
false || [ -d $(RPMDIR)/RPMS ] || install -d $(RPMDIR)/RPMS
|
||||
false || [ -d $(RPMDIR)/SRPMS ] || install -d $(RPMDIR)/SRPMS
|
||||
rm -rf $(RPMSRCDIR)
|
||||
sed "s+%FPCVERSION%+$(PACKAGE_VERSION)+" $(CVSINSTALL)/fpc.spec > $(RPMSPECFILE)
|
||||
ifndef NODOCS
|
||||
cat $(CVSINSTALL)/fpcdoc.spec >> $(RPMSPECFILE)
|
||||
endif
|
||||
# Install files
|
||||
install -d $(RPMSRCDIR)
|
||||
$(COPYTREE) compiler $(RPMSRCDIR)
|
||||
$(COPYTREE) rtl $(RPMSRCDIR)
|
||||
$(COPYTREE) fcl $(RPMSRCDIR)
|
||||
$(COPYTREE) fv $(RPMSRCDIR)
|
||||
$(COPYTREE) ide $(RPMSRCDIR)
|
||||
$(COPYTREE) packages $(RPMSRCDIR)
|
||||
$(COPYTREE) utils $(RPMSRCDIR)
|
||||
$(COPYTREE) demo $(RPMSRCDIR)
|
||||
# $(COPYTREE) logs $(RPMSRCDIR)
|
||||
$(COPYTREE) Makefile* $(RPMSRCDIR)
|
||||
$(COPYTREE) $(CVSINSTALL)/man $(RPMSRCDIR)
|
||||
$(COPYTREE) $(CVSINSTALL)/doc $(RPMSRCDIR)
|
||||
$(COPY) $(CVSINSTALL)/smart_strip.sh $(RPMSRCDIR)
|
||||
chmod +x $(RPMSRCDIR)/smart_strip.sh
|
||||
ifndef NODOCS
|
||||
$(COPYTREE) docs $(RPMSRCDIR)
|
||||
endif
|
||||
find $(RPMSRCDIR) -name 'CVS*' | xargs -n1 rm -rf
|
||||
cd $(RPMSRCDIR) ; tar cfvz $(RPMSOURCEFILE) *
|
||||
rm -rf $(RPMSRCDIR)
|
||||
|
||||
rpmbuild: checkfpcdir
|
||||
$(RPMBUILD) $(RPMDEFINES) --nodeps -ba $(RPMSPECFILE)
|
||||
mv `find $(RPMDIR)/RPMS/ -name '*.rpm'` .
|
||||
mv `find $(RPMDIR)/SRPMS/ -name '*.rpm'` .
|
||||
|
||||
rpmclean:
|
||||
rm -rf $(RPMDIR)
|
||||
-rmdir $(BUILDDIR)
|
||||
|
||||
rpm: checkfpcdir rpmcopy rpmbuild rpmclean
|
||||
|
||||
endif # spec found
|
||||
|
||||
endif # rpm available
|
||||
|
||||
endif # inUnix
|
||||
|
||||
##########################################################################
|
||||
# Inno setup
|
||||
##########################################################################
|
||||
|
||||
ISCCPROG=$(subst $(PATHSEP),/,$(ProgramFiles))/inno setup 5/iscc.exe
|
||||
|
||||
ifndef inUnix
|
||||
USEINNOWRAPPER=1
|
||||
endif
|
||||
INNODIR=$(BUILDDIR)/inno
|
||||
INNOWRAPPER=$(subst /,$(PATHSEP),$(DIST_DESTDIR)/fpcinno$(SRCBATCHEXT))
|
||||
INNOCMD_CDINNO:=cd $(subst /,$(ZIPPATHSEP),$(INNODIR))
|
||||
INNOCMD_CDBASE:=cd $(subst /,$(ZIPPATHSEP),$(BASEDIR))
|
||||
INNOCMD_ISCC:=$(ISCCPROG) $(INNODIR)/fpc.iss
|
||||
FPCISSSUBST=-d BUILDDIR=$(subst /,$(PATHSEP),$(INNODIR))
|
||||
ifdef NODOCS
|
||||
FPCISSSUBST+=-d DisableDocs=;
|
||||
endif
|
||||
|
||||
innocheck:
|
||||
ifndef NODOCS
|
||||
# Check for doc-pdf.zip
|
||||
ifeq ($(wildcard doc-pdf.zip),)
|
||||
@$(ECHO) "No documentation available. Please copy the file doc-pdf.zip to this directory."
|
||||
@exit 1
|
||||
endif
|
||||
endif
|
||||
# Check for libgdb
|
||||
ifeq ($(wildcard libgdb/win32/libgdb.a),)
|
||||
@$(ECHO) "Libgdb not available. Please get and unzip libgdb-<version>.i386-win32.zip in this directory."
|
||||
@exit 1
|
||||
endif
|
||||
|
||||
innobuild: innocheck build
|
||||
$(DELTREE) $(INNODIR)
|
||||
$(MKDIR) $(INNODIR)
|
||||
ifndef NODOCS
|
||||
unzip -d $(INNODIR) doc-pdf.zip
|
||||
endif
|
||||
$(MAKE) install INSTALL_PREFIX=$(INNODIR)
|
||||
compiler/utils/fpcsubst -i install/fpc.ist -o $(INNODIR)/fpc.iss $(FPCISSSUBST)
|
||||
$(INNOCMD_ISCC)
|
||||
$(MOVE) $(INNODIR)/Output/setup.exe fpc-$(PACKAGE_VERSION).$(FULL_TARGET).exe
|
||||
|
||||
innoclean:
|
||||
$(DELTREE) $(INNODIR)
|
||||
|
||||
inno: checkfpcdir innobuild innoclean
|
||||
|
Loading…
Reference in New Issue
Block a user