# # Makefile.fpc for Free Pascal Source Tree # [package] name=fpc version=1.9.8 [target] dirs=compiler rtl utils fcl fv packages ide installer [require] nortl=y [install] fpcpackage=y [default] fpcdir=. rule=help [prerules] # make versions < 3.77 (OS2 version) are buggy ifndef inOS2 override FPCDIR:=$(BASEDIR) export FPCDIR endif # Build dir ifndef BUILDDIR BUILDDIR=$(BASEDIR)/build endif # New ppc386 (or ppc68k if on m68k machine !) ifndef PPNEW ifeq ($(CPU_TARGET),m68k) PPSUF=68k endif ifeq ($(CPU_TARGET),i386) PPSUF=386 endif ifeq ($(CPU_TARGET),x86_64) PPSUF=x64 endif ifeq ($(CPU_TARGET),sparc) PPSUF=sparc endif ifeq ($(CPU_TARGET),powerpc) PPSUF=ppc endif ifeq ($(CPU_TARGET),alpha) PPSUF=axp endif ifeq ($(CPU_TARGET),arm) PPSUF=arm endif # cross compilers uses full cpu_target, not just ppc-suffix. ifdef CROSSCOMPILE PPPRE=ppcross else PPPRE=ppc endif PPNEW=$(BASEDIR)/compiler/$(PPPRE)$(PPSUF)$(SRCEXEEXT) endif # Check if install/ subdir is available ifneq ($(wildcard install),) CVSINSTALL=install else CVSINSTALL=. endif # Install target, for snapshots we don't install examples. # Cross installation only needs the .ppu files ifdef SNAPSHOT INSTALLTARGET=install else ifdef CROSSINSTALL INSTALLTARGET=install else INSTALLTARGET=distinstall endif endif # All target ifdef SNAPSHOT ALLTARGET=all else ifndef ALLTARGET SMARTTARGETS=win32 go32v2 linux freebsd netbsd openbsd netware netwlibc ifneq ($(findstring $(OS_TARGET),$(SMARTTARGETS)),) ALLTARGET=smart else ALLTARGET=all endif endif endif # Prefix for units ifneq ($(findstring $(OS_SOURCE),$(LIMIT83fs)),) PKGUNITSPRE=u else PKGUNITSPRE=units- endif # Cross compile needs a prefix to not conflict with original packages ifdef CROSSINSTALL PKGPRE=$(FULL_TARGET)- else PKGPRE= endif # Always compile for release override RELEASE=1 export RELEASE # We want to have the resulting .zips in the current dir ifndef DIST_DESTDIR export DIST_DESTDIR:=$(BASEDIR) endif # Temporary path to pack a file BASEPACKDIR=$(BASEDIR)/basepack # Newly created fpcmake ifeq ($(FULL_SOURCE),$(FULL_TARGET)) FPCMAKENEW=$(BASEDIR)/utils/fpcm/fpcmake$(EXEEXT) else FPCMAKENEW=fpcmake endif # Build/install options CLEANOPTS=FPC=$(PPNEW) BUILDOPTS=FPC=$(PPNEW) RELEASE=1 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW) # Compile also IDE (check for ide and fv dir) # Skipped by default for cross compiles, because it depends on libc ifndef CROSSCOMPILE ifneq ($(wildcard ide),) ifneq ($(wildcard fv),) IDETARGETS=go32v2 win32 linux freebsd os2 emx ifneq ($(findstring $(OS_TARGET),$(IDETARGETS)),) IDE=1 endif endif endif endif [rules] # These values can change unexport FPC_VERSION FPC_COMPILERINFO OS_SOURCE # Only process directories that really exists override TARGET_DIRS:=$(wildcard $(TARGET_DIRS)) ##################################################################### # Main targets ##################################################################### .PHONY: help checkfpcdir 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) @exit ##################################################################### # Dependencies ##################################################################### ####################################### # Compiler ####################################### .PHONY: compiler_cycle compiler_cycle: $(MAKE) -C compiler cycle ####################################### # Packages ####################################### .PHONY: packages_base_all packages_extra_all \ packages_base_smart packages_extra_smart packages_base_all: $(MAKE) -C packages base_all packages_base_smart: $(MAKE) -C packages base_smart packages_extra_all: $(MAKE) -C packages extra_all 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 all: build clean: $(addsuffix _distclean,$(TARGET_DIRS)) $(DEL) build-stamp.* distclean: clean build: $(BUILDSTAMP) $(BUILDSTAMP): # create new compiler $(MAKE) compiler_cycle RELEASE=1 # clean $(MAKE) rtl_clean $(CLEANOPTS) $(MAKE) packages_clean $(CLEANOPTS) $(MAKE) fcl_clean $(CLEANOPTS) $(MAKE) fv_clean $(CLEANOPTS) $(MAKE) utils_clean $(CLEANOPTS) ifdef IDE $(MAKE) ide_clean $(CLEANOPTS) endif # build everything $(MAKE) rtl_$(ALLTARGET) $(BUILDOPTS) $(MAKE) packages_base_$(ALLTARGET) $(BUILDOPTS) $(MAKE) fcl_$(ALLTARGET) $(BUILDOPTS) $(MAKE) fv_$(ALLTARGET) $(BUILDOPTS) $(MAKE) packages_extra_$(ALLTARGET) $(BUILDOPTS) $(MAKE) utils_all $(BUILDOPTS) ifdef IDE $(MAKE) ide_all $(BUILDOPTS) $(MAKE) installer_all $(BUILDOPTS) endif $(ECHOREDIR) Build > $(BUILDSTAMP) 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) ifeq ($(OS_TARGET),win32) $(COPY) $(addprefix $(CVSINSTALL)/binw32/,*.ico *.exe *.dll *.h) $(INSTALL_BINDIR) endif # binos2 (emx.dll,emxwrap.dll,unzip32.dll,fp2.ico) ifeq ($(OS_TARGET),os2) $(COPY) $(addprefix $(CVSINSTALL)/binos2/,*.ico *.exe *.dll *.h) $(INSTALL_BINDIR) endif # binos2 (emx.dll,emxwrap.dll,unzip32.dll,fp2.ico) ifeq ($(OS_TARGET),emx) $(COPY) $(addprefix $(CVSINSTALL)/binos2/,*.ico *.exe *.dll *.h) $(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 $(MAKE) compiler_$(INSTALLTARGET) $(INSTALLOPTS) $(MAKE) rtl_$(INSTALLTARGET) $(INSTALLOPTS) install: $(BUILDSTAMP) $(MAKE) installbase $(INSTALLOPTS) $(MAKE) packages_$(INSTALLTARGET) $(INSTALLOPTS) $(MAKE) fcl_$(INSTALLTARGET) $(INSTALLOPTS) $(MAKE) fv_$(INSTALLTARGET) $(INSTALLOPTS) $(MAKE) utils_$(INSTALLTARGET) $(INSTALLOPTS) ifdef IDE $(MAKE) ide_$(INSTALLTARGET) $(BUILDOPTS) endif zipinstall: $(BUILDSTAMP) $(MAKE) fpc_zipinstall ZIPTARGET=installbase ZIPNAME=base $(INSTALLOPTS) $(MAKE) packages_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGUNITSPRE) $(MAKE) fcl_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGUNITSPRE) $(MAKE) fv_zip$(INSTALLTARGET) $(INSTALLOPTS) ZIPPREFIX=$(PKGUNITSPRE) $(MAKE) utils_zip$(INSTALLTARGET) $(INSTALLOPTS) ifdef IDE $(MAKE) ide_zip$(INSTALLTARGET) $(INSTALLOPTS) endif singlezipinstall: $(BUILDSTAMP) $(MAKE) fpc_zipinstall ZIPTARGET=install ZIPNAME=fpc $(INSTALLOPTS) ########################################################################## # Cross installation (installation of cross compiler and units) ########################################################################## .PHONY: crossall crossinstall crosszipinstall crosssinglezipinstall crossall: $(MAKE) all CROSSINSTALL=1 crossinstall: $(MAKE) install CROSSINSTALL=1 crosszipinstall: $(MAKE) zipinstall CROSSINSTALL=1 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 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) # Create fpc.spec, include our own builddir echo "%define _topdir $(RPMDIR)" > $(RPMSPECFILE) echo "%define _sourcedir $(RPMDIR)/SOURCES" >> $(RPMSPECFILE) echo "%define _builddir $(RPMDIR)/BUILD" >> $(RPMSPECFILE) echo "%define _rpmdir $(RPMDIR)/RPMS" >> $(RPMSPECFILE) echo "%define _srcrpmdir $(RPMDIR)/SRPMS" >> $(RPMSPECFILE) 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) --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-.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