* Fixed zipinstall
  * fixed clean
  * fixed build with compiler from CVS

git-svn-id: trunk@188 -
This commit is contained in:
lazarus 2001-02-20 23:12:25 +00:00
parent 376564528b
commit 9b472a0458
15 changed files with 1540 additions and 93 deletions

View File

@ -193,7 +193,8 @@ override EXAMPLEDIROBJECTS+=examples
# Clean
override EXTRACLEANUNITS+=$(basename $(wildcard *$(PPUEXT)))
override EXTRACLEANUNITS+=$(basename $(wildcard *$(PPUEXT))) $(basename $(wildcard ./designer/*$(PPUEXT)))
override EXTRACLEANFILES+=$(wildcard ./designer/*$(OEXT))
# Install
@ -207,9 +208,6 @@ ZIPTARGET=install
override NEEDUNITDIR=. ./lcl/units ./components/units ./designer
override NEEDINCDIR=. ./include ./include/$(OS_TARGET)
ifndef TARGETDIR
TARGETDIR=.
endif
# Packages
@ -1040,11 +1038,12 @@ endif
ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif
ifdef INSTALLEXEFILES
@ -1157,7 +1156,7 @@ ifndef PACKDIR
ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp
else
PACKDIR=/tmp/fpc-pack
PACKDIR=/tmp/lazarus-pack
endif
endif
@ -1249,11 +1248,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units
ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif
fpc_clean: $(CLEANTARGET)
@ -1555,7 +1555,7 @@ endif
# Users rules
#####################################################################
.PHONY: examples lcl components ide
.PHONY: examples lcl components ide tools
lcl: lcl_all
@ -1567,4 +1567,7 @@ components: lcl components_all
ide:
$(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT)
tools: lcl components
$(MAKE) -C tools
all: lcl components ide

View File

@ -4,18 +4,20 @@
[targets]
programs=lazarus
#dirs=lcl components designer
dirs=lcl components
exampledirs=examples
[clean]
units=$(basename $(wildcard *$(PPUEXT)))
units=$(basename $(wildcard *$(PPUEXT))) $(basename $(wildcard ./designer/*$(PPUEXT)))
files=$(wildcard ./designer/*$(OEXT))
[require]
rtl=1
packages=fcl gtk
[dirs]
targetdir=.
# not with the lazarusmake.ini
# targetdir=.
unitdir=. ./lcl/units ./components/units ./designer
incdir=. ./include ./include/$(OS_TARGET)
@ -25,7 +27,7 @@ packagename=lazarus
[presettings]
[rules]
.PHONY: examples lcl components ide
.PHONY: examples lcl components ide tools
lcl: lcl_all
@ -37,4 +39,7 @@ components: lcl components_all
ide:
$(MAKE) --assume-new=lazarus.pp lazarus$(EXEEXT)
tools: lcl components
$(MAKE) -C tools
all: lcl components ide

View File

@ -866,11 +866,12 @@ endif
ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif
ifdef INSTALLEXEFILES
@ -983,7 +984,7 @@ ifndef PACKDIR
ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp
else
PACKDIR=/tmp/fpc-pack
PACKDIR=/tmp/lazarus-pack
endif
endif
@ -1075,11 +1076,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units
ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif
fpc_clean: $(CLEANTARGET)

View File

@ -1,3 +1,4 @@
# $Id$
#
# Makefile.fpc for Lazarus for Free Pascal
#

View File

@ -165,6 +165,21 @@ endif
endif
endif
ifndef PACKAGESDIR
PACKAGESDIR=$(FPCDIR)/packages
endif
ifndef TOOLKITSDIR
TOOLKITSDIR=
endif
ifndef COMPONENTSDIR
COMPONENTSDIR=
endif
# Create units dir
ifneq ($(FPCDIR),.)
UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
endif
#####################################################################
# User Settings
#####################################################################
@ -175,8 +190,7 @@ endif
# Clean
override EXTRACLEANUNITS+=$(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT)))
override EXTRACLEANFILES+=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
override EXTRACLEANUNITS+=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))))
# Install
@ -194,7 +208,7 @@ endif
# Packages
override PACKAGES+=fcl gtk
override PACKAGES+=rtl fcl gtk
# Libraries
@ -473,12 +487,56 @@ endif
endif
# Check if the dirs really exists, else turn it off
ifeq ($(wildcard $(UNITSDIR)),)
UNITSDIR=
endif
ifeq ($(wildcard $(TOOLKITSDIR)),)
TOOLKITSDIR=
endif
ifeq ($(wildcard $(PACKAGESDIR)),)
PACKAGESDIR=
endif
ifeq ($(wildcard $(COMPONENTSDIR)),)
COMPONENTSDIR=
endif
# PACKAGESDIR packages
PACKAGERTL=1
PACKAGEFCL=1
PACKAGEGTK=1
ifdef PACKAGERTL
ifneq ($(wildcard $(FPCDIR)/rtl),)
ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
else
PACKAGEDIR_RTL=$(FPCDIR)/rtl
endif
ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_rtl
package_rtl:
$(MAKE) -C $(PACKAGEDIR_RTL) all
endif
UNITDIR_RTL=$(PACKAGEDIR_RTL)
else
PACKAGEDIR_RTL=
ifneq ($(wildcard $(UNITSDIR)/rtl),)
ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
else
UNITDIR_RTL=$(UNITSDIR)/rtl
endif
else
UNITDIR_RTL=
endif
endif
ifdef UNITDIR_RTL
override NEEDUNITDIR+=$(UNITDIR_RTL)
endif
endif
ifdef PACKAGEFCL
ifneq ($(wildcard $(FPCDIR)/fcl),)
ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
@ -932,11 +990,12 @@ endif
ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif
ifdef INSTALLEXEFILES
@ -1049,7 +1108,7 @@ ifndef PACKDIR
ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp
else
PACKDIR=/tmp/fpc-pack
PACKDIR=/tmp/lazarus-pack
endif
endif
@ -1141,11 +1200,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units
ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif
fpc_clean: $(CLEANTARGET)

View File

@ -7,11 +7,13 @@
# units=allunits
[require]
rtl=1
packages=fcl gtk
[clean]
units=$(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT)))
files=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
units=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))))
# not with the lazarusmake.ini
# files=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
[dirs]
# target dir needs to be . or a full path otherwise the

View File

@ -191,7 +191,7 @@ override EXEOBJECTS+=hello notebk comdialogs progressbar trackbar listboxtest bi
# Clean
override EXTRACLEANUNITS+=$(basename $(wildcard *$(PPUEXT)))
override EXTRACLEANUNITS+=$(notdir $(basename $(wildcard *$(PPUEXT))))
# Install
@ -205,9 +205,6 @@ ZIPTARGET=install
# Directories
override NEEDUNITDIR=. ../lcl/units ../components/units ../designer
ifndef TARGETDIR
TARGETDIR=.
endif
# Packages
@ -1011,11 +1008,12 @@ endif
ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif
ifdef INSTALLEXEFILES
@ -1128,7 +1126,7 @@ ifndef PACKDIR
ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp
else
PACKDIR=/tmp/fpc-pack
PACKDIR=/tmp/lazarus-pack
endif
endif
@ -1220,11 +1218,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units
ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif
fpc_clean: $(CLEANTARGET)

View File

@ -7,13 +7,15 @@ programs=hello notebk comdialogs progressbar trackbar listboxtest \
bitbutton combobox checkbox selection scrollbar
[clean]
units=$(basename $(wildcard *$(PPUEXT)))
units=$(notdir $(basename $(wildcard *$(PPUEXT))))
[require]
rtl=1
packages=fcl gtk
[dirs]
targetdir=.
# not with the lazarusmake.ini
# targetdir=.
unitdir=. ../lcl/units ../components/units ../designer
[install]

View File

@ -172,6 +172,21 @@ endif
endif
endif
ifndef PACKAGESDIR
PACKAGESDIR=$(FPCDIR)/packages
endif
ifndef TOOLKITSDIR
TOOLKITSDIR=
endif
ifndef COMPONENTSDIR
COMPONENTSDIR=
endif
# Create units dir
ifneq ($(FPCDIR),.)
UNITSDIR=$(FPCDIR)/units/$(OS_TARGET)
endif
#####################################################################
# User Settings
#####################################################################
@ -183,7 +198,6 @@ endif
# Clean
override EXTRACLEANUNITS+=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))))
override EXTRACLEANFILES+=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
# Install
@ -205,7 +219,7 @@ endif
# Packages
override PACKAGES+=fcl gtk
override PACKAGES+=rtl fcl gtk
# Libraries
@ -484,12 +498,56 @@ endif
endif
# Check if the dirs really exists, else turn it off
ifeq ($(wildcard $(UNITSDIR)),)
UNITSDIR=
endif
ifeq ($(wildcard $(TOOLKITSDIR)),)
TOOLKITSDIR=
endif
ifeq ($(wildcard $(PACKAGESDIR)),)
PACKAGESDIR=
endif
ifeq ($(wildcard $(COMPONENTSDIR)),)
COMPONENTSDIR=
endif
# PACKAGESDIR packages
PACKAGERTL=1
PACKAGEFCL=1
PACKAGEGTK=1
ifdef PACKAGERTL
ifneq ($(wildcard $(FPCDIR)/rtl),)
ifneq ($(wildcard $(FPCDIR)/rtl/$(OS_TARGET)),)
PACKAGEDIR_RTL=$(FPCDIR)/rtl/$(OS_TARGET)
else
PACKAGEDIR_RTL=$(FPCDIR)/rtl
endif
ifeq ($(wildcard $(PACKAGEDIR_RTL)/$(FPCMADE)),)
override COMPILEPACKAGES+=package_rtl
package_rtl:
$(MAKE) -C $(PACKAGEDIR_RTL) all
endif
UNITDIR_RTL=$(PACKAGEDIR_RTL)
else
PACKAGEDIR_RTL=
ifneq ($(wildcard $(UNITSDIR)/rtl),)
ifneq ($(wildcard $(UNITSDIR)/rtl/$(OS_TARGET)),)
UNITDIR_RTL=$(UNITSDIR)/rtl/$(OS_TARGET)
else
UNITDIR_RTL=$(UNITSDIR)/rtl
endif
else
UNITDIR_RTL=
endif
endif
ifdef UNITDIR_RTL
override NEEDUNITDIR+=$(UNITDIR_RTL)
endif
endif
ifdef PACKAGEFCL
ifneq ($(wildcard $(FPCDIR)/fcl),)
ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
@ -952,11 +1010,12 @@ endif
ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif
ifdef INSTALLEXEFILES
@ -1069,7 +1128,7 @@ ifndef PACKDIR
ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp
else
PACKDIR=/tmp/fpc-pack
PACKDIR=/tmp/lazarus-pack
endif
endif
@ -1161,11 +1220,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units
ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif
fpc_clean: $(CLEANTARGET)

View File

@ -8,12 +8,14 @@
# loaders=allunits
[require]
rtl=1
options=-Ca
packages=fcl gtk
[clean]
units=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))))
files=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
# not with the lazarusmake.ini
# files=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
[dirs]
# target dir needs to be . or a full path otherwise the

1255
tools/Makefile Normal file

File diff suppressed because it is too large Load Diff

22
tools/Makefile.fpc Normal file
View File

@ -0,0 +1,22 @@
# $Id$
#
# Makefile.fpc for Lazarus for Free Pascal
#
[targets]
dirs=apiwizz
[dirs]
# target dir needs to be . or a full path otherwise the
# unittargetdir will be corrupt
# not with the lazarusmake.ini
# targetdir=.
[install]
packagename=tools
[presettings]
[postsettings]
[rules]

View File

@ -1,5 +1,5 @@
#
# Makefile generated by fpcmake v1.00 [2000/12/19]
# Makefile generated by fpcmake v1.00 [2001/01/09]
#
defaultrule: all
@ -50,6 +50,25 @@ else
SRCEXEEXT=.exe
endif
# The extension of batch files / scripts
ifdef inUnix
BATCHEXT=.sh
else
ifdef inOS2
BATCHEXT=.cmd
else
BATCHEXT=.bat
endif
endif
# Path Separator, the subst trick is necessary for the \ that can't exists
# at the end of a line
ifdef inUnix
PATHSEP=/
else
PATHSEP=$(subst /,\,/)
endif
# The path which is searched separated by spaces
ifdef inUnix
SEARCHPATH=$(subst :, ,$(PATH))
@ -187,6 +206,7 @@ override EXEOBJECTS+=apiwizz
# Clean
override EXTRACLEANUNITS+=apiwizard
# Install
@ -197,8 +217,7 @@ ZIPTARGET=install
# Directories
override NEEDUNITDIR=. $(LAZDIR)/lcl/units $(LAZDIR)/lcl $(LAZDIR)/lcl/interfaces/units $(LAZDIR)/lcl/interfaces/gtk
override NEEDINCDIR=. $(LAZDIR)/lcl/include
override NEEDUNITDIR=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units
ifndef TARGETDIR
TARGETDIR=.
endif
@ -305,15 +324,7 @@ LD=ld
endif
# ppas.bat / ppas.sh
ifdef inUnix
PPAS=ppas.sh
else
ifdef inOS2
PPAS=ppas.cmd
else
PPAS=ppas.bat
endif
endif
PPAS=ppas$(BATCHEXT)
# ldconfig to rebuild .so cache
ifdef inUnix
@ -650,7 +661,7 @@ export DESTZIPDIR
# set the base directory where to install everything
ifndef BASEINSTALLDIR
ifdef UNIXINSTALLDIR
BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION)
BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/lazarus/$(FPC_VERSION)
else
BASEINSTALLDIR=$(PREFIXINSTALLDIR)
endif
@ -685,7 +696,7 @@ endif
# Where the source files will be stored
ifndef SOURCEINSTALLDIR
ifdef UNIXINSTALLDIR
SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION)
SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/lazarus-$(FPC_VERSION)
else
SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
endif
@ -697,7 +708,7 @@ endif
# Where the doc files will be stored
ifndef DOCINSTALLDIR
ifdef UNIXINSTALLDIR
DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION)
DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/lazarus-$(FPC_VERSION)
else
DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
endif
@ -813,11 +824,6 @@ ifdef UNITSDIR
override FPCOPT+=-Fu$(UNITSDIR)
endif
ifdef NEEDINCDIR
override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
endif
# Target dirs and the prefix to use for clean/install
ifdef TARGETDIR
override FPCOPT+=-FE$(TARGETDIR)
@ -832,7 +838,7 @@ override FPCOPT+=-FU$(UNITTARGETDIR)
ifeq ($(UNITTARGETDIR),.)
override UNITTARGETDIRPREFIX=
else
override UNITTARGETDIRPREFIX=$(TARGETDIR)/
override UNITTARGETDIRPREFIX=$(UNITTARGETDIR)/
endif
else
ifdef TARGETDIR
@ -1018,11 +1024,12 @@ endif
ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif
ifdef INSTALLEXEFILES
@ -1135,7 +1142,7 @@ ifndef PACKDIR
ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp
else
PACKDIR=/tmp/fpc-pack
PACKDIR=/tmp/lazarus-pack
endif
endif
@ -1153,18 +1160,48 @@ USETAR=1
endif
endif
# Use a wrapper script by default for OS/2
ifdef inOS2
USEZIPWRAPPER=1
endif
# Create commands to create the zip/tar file
ZIPWRAPPER=$(DESTZIPDIR)/fpczip$(BATCHEXT)
ZIPCMD_CDPACK:=cd $(subst /,$(PATHSEP),$(PACKDIR))
ZIPCMD_CDBASE:=cd $(subst /,$(PATHSEP),$(BASEDIR))
ifdef USETAR
ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
ZIPCMD_ZIP:=$(TARPROG) cf$(TAROPT) $(ZIPDESTFILE) *
else
ZIPDESTFILE:=$(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
ZIPCMD_ZIP:=$(subst /,$(PATHSEP),$(ZIPPROG)) -Dr $(ZIPOPT) $(ZIPDESTFILE) *
endif
fpc_zipinstall:
ifndef ZIPNAME
@$(ECHO) "Please specify ZIPNAME!"
@exit 1
else
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
ifdef USETAR
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT)
cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR)
$(DEL) $(ZIPDESTFILE)
ifdef USEZIPWRAPPER
ifneq ($(ECHO),echo)
$(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
$(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
$(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
else
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT)
cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR)
$(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
$(ECHO) $(ZIPCMD_ZIP) >> $(ZIPWRAPPER)
$(ECHO) $(ZIPCMD_CDBASE) >> $(ZIPWRAPPER)
endif
ifdef inUnix
/bin/sh $(ZIPWRAPPER)
else
$(ZIPWRAPPER)
endif
$(DEL) $(ZIPWRAPPER)
else
$(ZIPCMD_CDPACK) ; $(ZIPCMD_ZIP) ; $(ZIPCMD_CDBASE)
endif
$(DELTREE) $(PACKDIR)
endif
@ -1197,11 +1234,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units
ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif
fpc_clean: $(CLEANTARGET)

View File

@ -6,8 +6,10 @@
programs=apiwizz
[clean]
units=apiwizard
[require]
rtl=1
packages=fcl gtk
[presettings]
@ -16,15 +18,7 @@ LAZDIR=../..
[dirs]
fpcdir=$(LAZDIR)/..
targetdir=.
##############################
# replace following lines by the next line as soon
# as the compiler dependency bug is fixed
##############################
#unitdir=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units
##############################
unitdir=. $(LAZDIR)/lcl/units $(LAZDIR)/lcl $(LAZDIR)/lcl/interfaces/units $(LAZDIR)/lcl/interfaces/gtk
incdir=. $(LAZDIR)/lcl/include
##############################
unitdir=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units
[libs]

View File

@ -1133,11 +1133,12 @@ endif
ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES))
INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif
ifdef INSTALLEXEFILES
@ -1255,7 +1256,7 @@ ifndef PACKDIR
ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp
else
PACKDIR=/tmp/fpc-pack
PACKDIR=/tmp/lazarus-pack
endif
endif
@ -1353,11 +1354,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units
ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES))
CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
# MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif
fpc_clean: $(CLEANTARGET)