Browse Source

* Override the for fpmake wrong value of COMPILER_TARGETDIR, so that executables are compiled into the right path

git-svn-id: trunk@19977 -
joost 13 years ago
parent
commit
6b826cf3fa
2 changed files with 12 additions and 0 deletions
  1. 5 0
      packages/chm/Makefile
  2. 7 0
      packages/chm/Makefile.fpc

+ 5 - 0
packages/chm/Makefile

@@ -302,6 +302,11 @@ ifdef CPU_TARGET
 FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
 endif
 LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+ifdef PACKAGEDIR_MAIN
+COMPILER_TARGETDIR=$(PACKAGEDIR_MAIN)/bin/$(TARGETSUFFIX)
+else
+COMPILER_TARGETDIR=bin/$(TARGETSUFFIX)
+endif
 override INSTALL_FPCPACKAGE=y
 ifdef REQUIRE_UNITSDIR
 override UNITSDIR+=$(REQUIRE_UNITSDIR)

+ 7 - 0
packages/chm/Makefile.fpc

@@ -24,6 +24,13 @@ ifdef CPU_TARGET
 FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
 endif
 LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+# By default COMPILER_TARGETDIR is set to '.'. This is passed in the -FE parameter to the compiler
+# which leads to executables being placed into the wrong directory by the compiler.
+ifdef PACKAGEDIR_MAIN
+COMPILER_TARGETDIR=$(PACKAGEDIR_MAIN)/bin/$(TARGETSUFFIX)
+else
+COMPILER_TARGETDIR=bin/$(TARGETSUFFIX)
+endif
 
 [rules]
 .NOTPARALLEL: