* Fixed make clean
  + moved allunits from exe to unit, skipping link stage

git-svn-id: trunk@111 -
This commit is contained in:
lazarus 2001-01-10 23:54:59 +00:00
parent 69c0f67e66
commit 969406d8b7
3 changed files with 108 additions and 39 deletions

View File

@ -1,13 +1,14 @@
#
# Makefile generated by fpcmake v1.00 [2000/12/18]
# Makefile generated by fpcmake v1.00 [2001/01/09]
#
defaultrule: all
#####################################################################
# Autodetect OS (Linux or Dos or Windows NT)
# Autodetect OS (Linux or Dos or Windows NT or OS/2)
# define inUnix when running under Unix (Linux,FreeBSD)
# define inWinNT when running under WinNT
# define inOS2 when running under OS/2
#####################################################################
# We need only / in the path
@ -49,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))
@ -174,7 +194,7 @@ endif
# Targets
override EXEOBJECTS+=allunits
override UNITOBJECTS+=allunits
# Clean
@ -193,6 +213,9 @@ override NEEDOPT=-Ca
override NEEDUNITDIR=$(UNITTARGETDIR) . ./interfaces/$(LCLPLATFORM)
override NEEDINCDIR=./include ./interfaces/$(LCLPLATFORM)
ifndef TARGETDIR
TARGETDIR=.
endif
ifndef UNITTARGETDIR
UNITTARGETDIR=./units
endif
@ -299,15 +322,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
@ -914,22 +929,18 @@ info: fpc_info
.PHONY: debug smart shared showinstall install sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall clean distclean cleanall info
#####################################################################
# Exes
# Units
#####################################################################
.PHONY: fpc_exes
.PHONY: fpc_units
ifdef EXEOBJECTS
override EXEFILES=$(addsuffix $(EXEEXT),$(EXEOBJECTS))
override EXEOFILES:=$(addsuffix $(OEXT),$(EXEOBJECTS)) $(addprefix $(LIBPREFIX),$(addsuffix $(STATICLIBEXT),$(EXEOBJECTS)))
override ALLTARGET+=fpc_units
override ALLTARGET+=fpc_exes
override INSTALLEXEFILES+=$(EXEFILES)
override CLEANEXEFILES+=$(EXEFILES) $(EXEOFILES)
override UNITPPUFILES=$(addsuffix $(PPUEXT),$(UNITOBJECTS))
override INSTALLPPUFILES+=$(UNITPPUFILES)
override CLEANPPUFILES+=$(UNITPPUFILES)
endif
fpc_exes: $(EXEFILES)
fpc_units: $(UNITPPUFILES)
#####################################################################
# General compile rules
@ -1123,6 +1134,9 @@ endif
ifeq ($(OS_TARGET),win32)
PACKAGESUFFIX=w32
endif
ifeq ($(OS_TARGET),os2)
PACKAGESUFFIX=emx
endif
endif
# Temporary path to pack a file
@ -1148,18 +1162,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
@ -1311,7 +1355,7 @@ endif
#####################################################################
cleartarget:
-$(DEL) allunits$(EXEEXT)
-$(DEL) $(UNITTARGETDIR)/allunits$(PPUEXT)
all: cleartarget allunits$(EXEEXT)
-$(DEL) allunits$(EXEEXT)
all: cleartarget allunits$(PPUEXT)
-$(DEL) $(UNITTARGETDIR)/allunits$(PPUEXT)

View File

@ -1,9 +1,10 @@
# $Id$
#
# Makefile.fpc for Lazarus for Free Pascal
#
[targets]
programs=allunits
units=allunits
[require]
options=-Ca
@ -14,6 +15,9 @@ units=$(basename $(wildcard $(UNITTARGETDIR)/*$(PPUEXT)))
files=$(wildcard $(UNITTARGETDIR)/*$(OEXT))
[dirs]
# target dir needs to be . or a full path otherwise the
# unittargetdir will be corrupt
targetdir=.
unittargetdir=./units
unitdir=$(UNITTARGETDIR) . ./interfaces/$(LCLPLATFORM)
incdir=./include ./interfaces/$(LCLPLATFORM)
@ -29,9 +33,11 @@ endif
[defaults]
[rules]
cleartarget:
-$(DEL) allunits$(EXEEXT)
-$(DEL) $(UNITTARGETDIR)/allunits$(PPUEXT)
all: cleartarget allunits$(PPUEXT)
-$(DEL) $(UNITTARGETDIR)/allunits$(PPUEXT)
all: cleartarget allunits$(EXEEXT)
-$(DEL) allunits$(EXEEXT)

View File

@ -1,12 +1,31 @@
program allunits;
{ $Id$ }
{
/***************************************************************************
allunits.pp
dummy unit to compile all units
/***************************************************************************
}
unit allunits;
interface
uses
interfacebase, interfaces,
buttons, extctrls, registry, vclglobals,
clipbrd, filectrl, forms, lcllinux, spin,
comctrls, graphics, lmessages, stdctrls,
controls, imglist, menus, toolwin,
dialogs, messages, utrace;
begin
dialogs, messages, utrace;
implementation
end.
{ =============================================================================
$Log$
Revision 1.3 2001/01/10 23:54:59 lazarus
MWE:
* Fixed make clean
+ moved allunits from exe to unit, skipping link stage
}