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

View File

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

View File

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

View File

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

View File

@ -165,6 +165,21 @@ endif
endif 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 # User Settings
##################################################################### #####################################################################
@ -175,8 +190,7 @@ endif
# Clean # Clean
override EXTRACLEANUNITS+=$(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))) override EXTRACLEANUNITS+=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))))
override EXTRACLEANFILES+=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
# Install # Install
@ -194,7 +208,7 @@ endif
# Packages # Packages
override PACKAGES+=fcl gtk override PACKAGES+=rtl fcl gtk
# Libraries # Libraries
@ -473,12 +487,56 @@ endif
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 # PACKAGESDIR packages
PACKAGERTL=1
PACKAGEFCL=1 PACKAGEFCL=1
PACKAGEGTK=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 ifdef PACKAGEFCL
ifneq ($(wildcard $(FPCDIR)/fcl),) ifneq ($(wildcard $(FPCDIR)/fcl),)
ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),) ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
@ -932,11 +990,12 @@ endif
ifdef INSTALLPPUFILES ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES)) override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)) INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))) INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)) # MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif endif
ifdef INSTALLEXEFILES ifdef INSTALLEXEFILES
@ -1049,7 +1108,7 @@ ifndef PACKDIR
ifndef inUnix ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp PACKDIR=$(BASEDIR)/pack_tmp
else else
PACKDIR=/tmp/fpc-pack PACKDIR=/tmp/lazarus-pack
endif endif
endif endif
@ -1141,11 +1200,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units # Get the .o and .a files created for the units
ifdef PPUFILES ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES)) CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))) CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)) # MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif endif
fpc_clean: $(CLEANTARGET) fpc_clean: $(CLEANTARGET)

View File

@ -7,11 +7,13 @@
# units=allunits # units=allunits
[require] [require]
rtl=1
packages=fcl gtk packages=fcl gtk
[clean] [clean]
units=$(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))) units=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))))
files=$(wildcard $(UNITTARGETDIR)/*$(OEXT)) # not with the lazarusmake.ini
# files=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
[dirs] [dirs]
# target dir needs to be . or a full path otherwise the # 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 # Clean
override EXTRACLEANUNITS+=$(basename $(wildcard *$(PPUEXT))) override EXTRACLEANUNITS+=$(notdir $(basename $(wildcard *$(PPUEXT))))
# Install # Install
@ -205,9 +205,6 @@ ZIPTARGET=install
# Directories # Directories
override NEEDUNITDIR=. ../lcl/units ../components/units ../designer override NEEDUNITDIR=. ../lcl/units ../components/units ../designer
ifndef TARGETDIR
TARGETDIR=.
endif
# Packages # Packages
@ -1011,11 +1008,12 @@ endif
ifdef INSTALLPPUFILES ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES)) override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)) INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))) INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)) # MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif endif
ifdef INSTALLEXEFILES ifdef INSTALLEXEFILES
@ -1128,7 +1126,7 @@ ifndef PACKDIR
ifndef inUnix ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp PACKDIR=$(BASEDIR)/pack_tmp
else else
PACKDIR=/tmp/fpc-pack PACKDIR=/tmp/lazarus-pack
endif endif
endif endif
@ -1220,11 +1218,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units # Get the .o and .a files created for the units
ifdef PPUFILES ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES)) CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))) CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)) # MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif endif
fpc_clean: $(CLEANTARGET) fpc_clean: $(CLEANTARGET)

View File

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

View File

@ -172,6 +172,21 @@ endif
endif 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 # User Settings
##################################################################### #####################################################################
@ -183,7 +198,6 @@ endif
# Clean # Clean
override EXTRACLEANUNITS+=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT)))) override EXTRACLEANUNITS+=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))))
override EXTRACLEANFILES+=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
# Install # Install
@ -205,7 +219,7 @@ endif
# Packages # Packages
override PACKAGES+=fcl gtk override PACKAGES+=rtl fcl gtk
# Libraries # Libraries
@ -484,12 +498,56 @@ endif
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 # PACKAGESDIR packages
PACKAGERTL=1
PACKAGEFCL=1 PACKAGEFCL=1
PACKAGEGTK=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 ifdef PACKAGEFCL
ifneq ($(wildcard $(FPCDIR)/fcl),) ifneq ($(wildcard $(FPCDIR)/fcl),)
ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),) ifneq ($(wildcard $(FPCDIR)/fcl/$(OS_TARGET)),)
@ -952,11 +1010,12 @@ endif
ifdef INSTALLPPUFILES ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES)) override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)) INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))) INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)) # MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif endif
ifdef INSTALLEXEFILES ifdef INSTALLEXEFILES
@ -1069,7 +1128,7 @@ ifndef PACKDIR
ifndef inUnix ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp PACKDIR=$(BASEDIR)/pack_tmp
else else
PACKDIR=/tmp/fpc-pack PACKDIR=/tmp/lazarus-pack
endif endif
endif endif
@ -1161,11 +1220,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units # Get the .o and .a files created for the units
ifdef PPUFILES ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES)) CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))) CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)) # MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif endif
fpc_clean: $(CLEANTARGET) fpc_clean: $(CLEANTARGET)

View File

@ -8,12 +8,14 @@
# loaders=allunits # loaders=allunits
[require] [require]
rtl=1
options=-Ca options=-Ca
packages=fcl gtk packages=fcl gtk
[clean] [clean]
units=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT)))) units=$(notdir $(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT))))
files=$(wildcard $(UNITTARGETDIR)/*$(OEXT)) # not with the lazarusmake.ini
# files=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
[dirs] [dirs]
# target dir needs to be . or a full path otherwise the # 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 defaultrule: all
@ -50,6 +50,25 @@ else
SRCEXEEXT=.exe SRCEXEEXT=.exe
endif 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 # The path which is searched separated by spaces
ifdef inUnix ifdef inUnix
SEARCHPATH=$(subst :, ,$(PATH)) SEARCHPATH=$(subst :, ,$(PATH))
@ -187,6 +206,7 @@ override EXEOBJECTS+=apiwizz
# Clean # Clean
override EXTRACLEANUNITS+=apiwizard
# Install # Install
@ -197,8 +217,7 @@ ZIPTARGET=install
# Directories # Directories
override NEEDUNITDIR=. $(LAZDIR)/lcl/units $(LAZDIR)/lcl $(LAZDIR)/lcl/interfaces/units $(LAZDIR)/lcl/interfaces/gtk override NEEDUNITDIR=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units
override NEEDINCDIR=. $(LAZDIR)/lcl/include
ifndef TARGETDIR ifndef TARGETDIR
TARGETDIR=. TARGETDIR=.
endif endif
@ -305,15 +324,7 @@ LD=ld
endif endif
# ppas.bat / ppas.sh # ppas.bat / ppas.sh
ifdef inUnix PPAS=ppas$(BATCHEXT)
PPAS=ppas.sh
else
ifdef inOS2
PPAS=ppas.cmd
else
PPAS=ppas.bat
endif
endif
# ldconfig to rebuild .so cache # ldconfig to rebuild .so cache
ifdef inUnix ifdef inUnix
@ -650,7 +661,7 @@ export DESTZIPDIR
# set the base directory where to install everything # set the base directory where to install everything
ifndef BASEINSTALLDIR ifndef BASEINSTALLDIR
ifdef UNIXINSTALLDIR ifdef UNIXINSTALLDIR
BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/fpc/$(FPC_VERSION) BASEINSTALLDIR=$(PREFIXINSTALLDIR)/lib/lazarus/$(FPC_VERSION)
else else
BASEINSTALLDIR=$(PREFIXINSTALLDIR) BASEINSTALLDIR=$(PREFIXINSTALLDIR)
endif endif
@ -685,7 +696,7 @@ endif
# Where the source files will be stored # Where the source files will be stored
ifndef SOURCEINSTALLDIR ifndef SOURCEINSTALLDIR
ifdef UNIXINSTALLDIR ifdef UNIXINSTALLDIR
SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/fpc-$(FPC_VERSION) SOURCEINSTALLDIR=$(PREFIXINSTALLDIR)/src/lazarus-$(FPC_VERSION)
else else
SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source SOURCEINSTALLDIR=$(BASEINSTALLDIR)/source
endif endif
@ -697,7 +708,7 @@ endif
# Where the doc files will be stored # Where the doc files will be stored
ifndef DOCINSTALLDIR ifndef DOCINSTALLDIR
ifdef UNIXINSTALLDIR ifdef UNIXINSTALLDIR
DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/fpc-$(FPC_VERSION) DOCINSTALLDIR=$(PREFIXINSTALLDIR)/doc/lazarus-$(FPC_VERSION)
else else
DOCINSTALLDIR=$(BASEINSTALLDIR)/doc DOCINSTALLDIR=$(BASEINSTALLDIR)/doc
endif endif
@ -813,11 +824,6 @@ ifdef UNITSDIR
override FPCOPT+=-Fu$(UNITSDIR) override FPCOPT+=-Fu$(UNITSDIR)
endif endif
ifdef NEEDINCDIR
override FPCOPT+=$(addprefix -Fi,$(NEEDINCDIR))
endif
# Target dirs and the prefix to use for clean/install # Target dirs and the prefix to use for clean/install
ifdef TARGETDIR ifdef TARGETDIR
override FPCOPT+=-FE$(TARGETDIR) override FPCOPT+=-FE$(TARGETDIR)
@ -832,7 +838,7 @@ override FPCOPT+=-FU$(UNITTARGETDIR)
ifeq ($(UNITTARGETDIR),.) ifeq ($(UNITTARGETDIR),.)
override UNITTARGETDIRPREFIX= override UNITTARGETDIRPREFIX=
else else
override UNITTARGETDIRPREFIX=$(TARGETDIR)/ override UNITTARGETDIRPREFIX=$(UNITTARGETDIR)/
endif endif
else else
ifdef TARGETDIR ifdef TARGETDIR
@ -1018,11 +1024,12 @@ endif
ifdef INSTALLPPUFILES ifdef INSTALLPPUFILES
override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES)) override INSTALLPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPUFILES))
ifdef PPUFILES ifdef PPUFILES
INSTALLPPULINKFILES:=$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)) INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) -S -O $(INSTALLPPUFILES)))
else else
INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES)))) INSTALLPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(INSTALLPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(INSTALLPPUFILES))))
endif endif
override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES)) # MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override INSTALLPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(INSTALLPPULINKFILES))
endif endif
ifdef INSTALLEXEFILES ifdef INSTALLEXEFILES
@ -1135,7 +1142,7 @@ ifndef PACKDIR
ifndef inUnix ifndef inUnix
PACKDIR=$(BASEDIR)/pack_tmp PACKDIR=$(BASEDIR)/pack_tmp
else else
PACKDIR=/tmp/fpc-pack PACKDIR=/tmp/lazarus-pack
endif endif
endif endif
@ -1153,18 +1160,48 @@ USETAR=1
endif endif
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: fpc_zipinstall:
ifndef ZIPNAME ifndef ZIPNAME
@$(ECHO) "Please specify ZIPNAME!" @$(ECHO) "Please specify ZIPNAME!"
@exit 1 @exit 1
else else
$(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR) $(MAKE) $(ZIPTARGET) PREFIXINSTALLDIR=$(PACKDIR)
ifdef USETAR $(DEL) $(ZIPDESTFILE)
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) ifdef USEZIPWRAPPER
cd $(PACKDIR) ; $(TARPROG) cf$(TAROPT) $(DESTZIPDIR)/$(ZIPNAME)$(TAREXT) * ; cd $(BASEDIR) ifneq ($(ECHO),echo)
$(ECHO) "$(ZIPCMD_CDPACK)" > $(ZIPWRAPPER)
$(ECHO) "$(ZIPCMD_ZIP)" >> $(ZIPWRAPPER)
$(ECHO) "$(ZIPCMD_CDBASE)" >> $(ZIPWRAPPER)
else else
$(DEL) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) $(ECHO) $(ZIPCMD_CDPACK) > $(ZIPWRAPPER)
cd $(PACKDIR) ; $(ZIPPROG) -Dr $(ZIPOPT) $(DESTZIPDIR)/$(ZIPNAME)$(ZIPEXT) * ; cd $(BASEDIR) $(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 endif
$(DELTREE) $(PACKDIR) $(DELTREE) $(PACKDIR)
endif endif
@ -1197,11 +1234,12 @@ ifdef CLEANPPUFILES
override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES)) override CLEANPPUFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPUFILES))
# Get the .o and .a files created for the units # Get the .o and .a files created for the units
ifdef PPUFILES ifdef PPUFILES
CLEANPPULINKFILES:=$(shell $(PPUFILES) $(CLEANPPUFILES)) CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(shell $(PPUFILES) $(CLEANPPUFILES)))
else else
CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES)))) CLEANPPULINKFILES:=$(wildcard $(subst $(PPUEXT),$(OEXT),$(CLEANPPUFILES)) $(addprefix $(LIBPREFIX),$(subst $(PPUEXT),$(STATICLIBEXT),$(CLEANPPUFILES))))
endif endif
override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES)) # MWE: not here UNITTARGETDIRPREFIX is already added when no PPUFILES
# override CLEANPPULINKFILES:=$(addprefix $(UNITTARGETDIRPREFIX),$(CLEANPPULINKFILES))
endif endif
fpc_clean: $(CLEANTARGET) fpc_clean: $(CLEANTARGET)

View File

@ -6,8 +6,10 @@
programs=apiwizz programs=apiwizz
[clean] [clean]
units=apiwizard
[require] [require]
rtl=1
packages=fcl gtk packages=fcl gtk
[presettings] [presettings]
@ -16,15 +18,7 @@ LAZDIR=../..
[dirs] [dirs]
fpcdir=$(LAZDIR)/.. fpcdir=$(LAZDIR)/..
targetdir=. targetdir=.
############################## unitdir=. $(LAZDIR)/lcl/units $(LAZDIR)/components/units
# 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
##############################
[libs] [libs]

View File

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