* install more like debian with build/install rules

This commit is contained in:
peter 2000-01-10 22:57:56 +00:00
parent c199244dc1
commit b3cc108b8e

View File

@ -5,9 +5,6 @@
[defaults]
defaultrule=help
[dirs]
fpcdir=..
[sections]
info=0
@ -18,6 +15,14 @@ tooldate=1
[presettings]
OLDFPCDIR:=$(FPCDIR)
checkfpcdir:
ifdef OLDFPCDIR
@echo You must unset FPCDIR to use this Makefile
@exit 1
endif
# Test dir if none specified
ifndef PREFIXINSTALLDIR
PREFIXINSTALLDIR=/pptest
@ -25,26 +30,25 @@ endif
# Directory to the base of the CVS tree
CVSBASE=..
CFG=$(CVSBASE)/rtl/cfg
# Always compile for release
override RELEASE=1
# Temporary path to pack a file
PACKDIR=$(subst \,/,$(TMP))/pp_tmp
BASEPACKDIR=$(BASEDIR)/basepack
# Use new ppc386
PPNEW=$(BASEDIR)/$(CVSBASE)/compiler/ppc386.exe
PPUFILESNEW=$(BASEDIR)/$(CVSBASE)/utils/ppufiles.exe
# Test dir if none specified
ifndef PACKAGEDIR
PACKAGEDIR=$(BASEDIR)
endif
# Build/install options
BUILDOPTS=FPC=$(PPNEW) RELEASE=1
INSTALLOPTS=FPC=$(PPNEW) PPUFILES=$(PPUFILESNEW) ZIPDESTDIR=$(BASEDIR)
BUILDOPTSGO32V2=OS_TARGET=go32v2 FPC=$(PPNEW) RELEASE=1
INSTALLOPTSGO32V2=OS_TARGET=go32v2 FPC=$(PPNEW) PPUFILES=$(PPUFILESNEW)
BUILDOPTSWIN32=OS_TARGET=win32 FPC=$(PPNEW) RELEASE=1
INSTALLOPTSWIN32=OS_TARGET=win32 FPC=$(PPNEW) PPUFILES=$(PPUFILESNEW)
[rules]
.PHONY: help checkfpcdir
help:
@echo
@echo Possible targets are:
@ -52,128 +56,92 @@ help:
@echo basego32, basego32.zip
@echo basew32, basew32.zip
@echo
@exit
@exit 1
##########################################################################
# Install
##########################################################################
.PHONY: installer
installer:
$(MAKE) -C fpinst all RELEASE=1
##########################################################################
# Basego32.zip
##########################################################################
p:
$(MAKE) -C $(CVSBASE) compiler_install $(INSTALLOPTSGO32V2)
.PHONY: build installbase zipinstall zipinstallbase zipinstallfcl \
zipinstallpackages
basego32:
export RELEASE DESTZIPDIR
build: checkfpcdir
# create new compiler
$(MAKE) -C $(CVSBASE) compiler_cycle OS_TARGET=go32v2 RELEASE=1
-$(MAKE) -C $(CVSBASE) compiler_cycle
# clean
$(MAKE) -C $(CVSBASE) rtl_clean OS_TARGET=go32v2
$(MAKE) -C $(CVSBASE) fcl_clean OS_TARGET=go32v2
$(MAKE) -C $(CVSBASE) packages_clean OS_TARGET=go32v2
$(MAKE) -C $(CVSBASE) utils_clean OS_TARGET=go32v2
$(MAKE) -C $(CVSBASE) rtl_clean
$(MAKE) -C $(CVSBASE) fcl_clean
$(MAKE) -C $(CVSBASE) packages_clean
$(MAKE) -C $(CVSBASE) utils_clean
# build everything
$(MAKE) -C $(CVSBASE) rtl_smart $(BUILDOPTSGO32V2)
$(MAKE) -C $(CVSBASE) fcl_smart $(BUILDOPTSGO32V2)
$(MAKE) -C $(CVSBASE) packages_smart $(BUILDOPTSGO32V2)
$(MAKE) -C $(CVSBASE) utils_all $(BUILDOPTSGO32V2)
# install
# create dirs
$(MAKE) -C $(CVSBASE) rtl_smart $(BUILDOPTS)
$(MAKE) -C $(CVSBASE) fcl_smart $(BUILDOPTS)
$(MAKE) -C $(CVSBASE) packages_smart $(BUILDOPTS)
$(MAKE) -C $(CVSBASE) utils_all $(BUILDOPTS)
installbase:
# create dirs
$(MKDIR) $(BASEINSTALLDIR)
$(MKDIR) $(DOCINSTALLDIR)
$(MKDIR) $(BININSTALLDIR)
$(MKDIR) $(SOURCEINSTALLDIR)
# readme & whatsnew and docs
# readme & whatsnew and docs
$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
# bingo32 (cwsdpmi,wmemu387.dxe)
# bingo32 (cwsdpmi,wmemu387.dxe)
ifeq ($(OS_TARGET),go32v2)
$(COPY) bingo32/* $(BININSTALLDIR)
# source (base)
endif
# source (base)
$(COPY) $(CVSBASE)/Makefile $(CVSBASE)/Makefile.fpc $(SOURCEINSTALLDIR)
# install generated things
$(MAKE) -C $(CVSBASE) compiler_install $(INSTALLOPTSGO32V2)
$(MAKE) -C $(CVSBASE) rtl_install $(INSTALLOPTSGO32V2)
$(MAKE) -C $(CVSBASE) fcl_install $(INSTALLOPTSGO32V2)
$(MAKE) -C $(CVSBASE) packages_install $(INSTALLOPTSGO32V2)
$(MAKE) -C $(CVSBASE) utils_install $(INSTALLOPTSGO32V2)
# install generated things
$(MAKE) -C $(CVSBASE) compiler_install $(INSTALLOPTS)
$(MAKE) -C $(CVSBASE) rtl_install $(INSTALLOPTS)
$(MAKE) -C $(CVSBASE) utils_install $(INSTALLOPTS)
basego32.zip:
$(MAKE) basego32 BASEINSTALLDIR=$(PACKDIR)
cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/basego32.zip * ; cd $(BASEDIR)
$(DELTREE) $(PACKDIR)
zipinstallbase:
$(MKDIR) $(BASEPACKDIR)
$(MAKE) installbase PREFIXINSTALLDIR=$(BASEPACKDIR)
cd $(BASEPACKDIR) ; $(ZIPPROG) $(DESTZIPDIR)/basego32.zip * ; cd $(BASEDIR)
$(DELTREE) $(BASEPACKDIR)
zipinstallapi:
$(MAKE) -C $(CVSBASE) api_zipinstall $(INSTALLOPTS)
zipinstallfcl:
$(MAKE) -C $(CVSBASE) fcl_zipinstall $(INSTALLOPTS)
zipinstallpackages:
$(MAKE) -C $(CVSBASE) packages_install $(INSTALLOPTS)
zipinstall: build \
zipinstallbase zipinstallapi zipinstallfcl \
zipinstallpackages
##########################################################################
# basew32.zip
# go32v2,win32 specific targets
##########################################################################
basew32:
# create dirs
$(MKDIR) $(BASEINSTALLDIR)
$(MKDIR) $(DOCINSTALLDIR)
$(MKDIR) $(BININSTALLDIR)
$(MKDIR) $(SOURCEINSTALLDIR)
# readme & whatsnew and docs
$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
# source (base)
$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
# readme.txt & whatsnew.txt
$(MKDIR) $(BASEINSTALLDIR)
$(COPY) readme.txt whatsnew.txt $(BASEINSTALLDIR)
# compiler, the - is necessary because the files sometimes differ
-$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=win32 RELEASE=1
$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=win32
# rtl
$(MAKE) -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
$(MAKE) -C $(CVSBASE)/rtl/win32 install OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
# rtl libs
# $(MAKE) -C $(CVSBASE)/rtl/win32 clean OS_TARGET=win32
# $(MAKE) -C $(CVSBASE)/rtl/win32 libinstall OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
# utils
$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=win32
$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=win32 RELEASE=1 FPC=$(PPNEW)
.PHONY: go32v2 win32
basew32.zip:
$(MAKE) basew32 BASEINSTALLDIR=$(PACKDIR)
$(MKDIR) $(PACKAGEDIR)
# Maybe you need 4dos for it, becuase unix paths with / are used
cd $(PACKDIR)
$(ZIPPROG) $(PACKAGEDIR)/basew32.zip *
cd $(BASEDIR)
$(DELTREE) $(PACKDIR)
go32v2:
$(MAKE) zipinstall OS_TARGET=go32v2
win32:
$(MAKE) zipinstall OS_TARGET=win32
##########################################################################
# Baseemx.zip
##########################################################################
baseemx:
# create dirs
$(MKDIR) $(BASEINSTALLDIR)
$(MKDIR) $(DOCINSTALLDIR)
$(MKDIR) $(BININSTALLDIR)
$(MKDIR) $(SOURCEINSTALLDIR)
# readme & whatsnew and docs
$(COPY) doc/*.txt doc/copying* $(DOCINSTALLDIR)
# source (base)
$(COPY) $(CVSBASE)/base/Makefile $(CVSBASE)/base/makefile.fpc $(SOURCEINSTALLDIR)
# compiler
$(MAKE) -C $(CVSBASE)/compiler cycle OS_TARGET=os2 RELEASE=1
$(MAKE) -C $(CVSBASE)/compiler install OS_TARGET=os2
# rtl os2
$(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=os2
$(MAKE) -C $(CVSBASE)/rtl/go32v2 install OS_TARGET=os2 RELEASE=1 FPC=$(PPNEW)
# rtl go32v2 libs
# $(MAKE) -C $(CVSBASE)/rtl/go32v2 clean OS_TARGET=go32v2
# $(MAKE) -C $(CVSBASE)/rtl/go32v2 libinstall OS_TARGET=go32v2 RELEASE=1 FPC=$(PPNEW)
# utils
$(MAKE) -C $(CVSBASE)/utils clean OS_TARGET=os2
$(MAKE) -C $(CVSBASE)/utils install OS_TARGET=os2 RELEASE=1 FPC=$(PPNEW)
baseemx.zip:
$(MAKE) baseemx BASEINSTALLDIR=$(PACKDIR)
cd $(PACKDIR) ; $(ZIPPROG) $(PACKAGEDIR)/baseemx.zip * ; cd $(BASEDIR)
$(DELTREE) $(PACKDIR)