* Only cleanup fpmake executable on distclean. Mostly because 'clean' itself is

executed by higher-level Makefiles, so that fpmake had to be recompiled
   all the time
 * Always use a native compiler, even when cross-compiling
 * Always use a native executable-extension, even when cross-compiling
 * Do not pass any options to the compiler when compiling fpmake.pp
 * With no compiler options, it is not necessary anymore to create the
   unit target directory.

git-svn-id: trunk@17360 -
This commit is contained in:
joost 2011-04-21 13:55:32 +00:00
parent 66a8dd1e32
commit de8fa2330d

View File

@ -26,13 +26,11 @@ endif
ifdef CPU_TARGET
FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
endif
LOCALFPMAKE=.$(PATHSEP)fpmake$(EXEEXT)
LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
[rules]
$(COMPILER_UNITTARGETDIR):
$(MKDIRTREE) $(COMPILER_UNITTARGETDIR)
fpmake: $(COMPILER_UNITTARGETDIR) fpmake.pp
$(FPC) fpmake.pp $(FPCOPT)
fpmake: fpmake.pp
$(FPCFPMAKE) fpmake.pp
all: fpmake
$(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
smart: fpmake
@ -43,10 +41,10 @@ debug: fpmake
$(LOCALFPMAKE) build --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) -o "-dDEBUG"
clean:
$(FPMAKE_BIN_CLEAN) clean --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC)
-$(DEL) $(LOCALFPMAKE)
install: fpmake
$(LOCALFPMAKE) install --localunitdir=../.. --globalunitdir=.. $(FPC_TARGETOPT) $(addprefix -o ,$(FPCOPT)) --compiler=$(FPC) --prefix=$(INSTALL_PREFIX)
# Normally distinstall also installs the examples, but in this case there are
# none.
distinstall: install
distclean: clean
-$(DEL) $(LOCALFPMAKE)