浏览代码

Set GDBMI Makefile environment variable for targets that support
building IDE with GDBMI.

GDBMI is set to 1 if target OS is in the list GDBMI_DEFAULT_OS_LIST

* Add comment about GDBMI_DEFAULT_OS_LIST, stating that this
makefile variable appaers at three levels:
fpcbuild, fpcsrc and fpcsrc/ide
but that the content should be kept equal.

fpsrc/ide/Makefile.fpc:
* Do not use GDBMI if NOGDB is used.

git-svn-id: trunk@34437 -

pierre 9 年之前
父节点
当前提交
c3957a0f79
共有 2 个文件被更改,包括 20 次插入2 次删除
  1. 17 1
      Makefile.fpc
  2. 3 1
      ide/Makefile.fpc

+ 17 - 1
Makefile.fpc

@@ -191,7 +191,22 @@ CLEANOPTS=FPC=$(PPNEW)
 BUILDOPTS=FPC=$(PPNEW) FPCFPMAKE=$(FPCFPMAKENEW) RELEASE=1 'OPT=$(OPTNEW)'
 INSTALLOPTS=FPC=$(PPNEW) ZIPDESTDIR=$(BASEDIR) FPCMAKE=$(FPCMAKENEW)
 
-# Compile also IDE (check for ide and fv dir)
+# This list should be the same as in fpcbuild/Makefile.fpc and in ide/Makefile.fpc
+GDBMI_DEFAULT_OS_LIST=aix darwin freebsd haiku linux netbsd openbsd solaris win32 win64
+#  Determine if we should use GDBMI for Text Mode IDE compilation
+ifndef NOGDBMI
+ifneq ($(findstring $(OS_TARGET),$(GDBMI_DEFAULT_OS_LIST)),)
+export GDBMI=1
+endif
+endif
+
+# Compile also IDE now enabled even for cross-compilation
+# if GDBMI is set
+ifdef GDBMI
+ifneq ($(GDBMI),0)
+IDE=1
+endif
+else # not GDBMI
 # Skipped by default for cross compiles, because it depends on libc
 ifndef CROSSCOMPILE
 ifneq ($(wildcard ide),)
@@ -201,6 +216,7 @@ IDE=1
 endif
 endif
 endif
+endif # not GDBMI
 
 # CPU targets for which we only build the compiler/rtl
 BuildOnlyBaseCPUs=jvm

+ 3 - 1
ide/Makefile.fpc

@@ -31,6 +31,7 @@ FPMAKE_BIN_CLEAN=$(wildcard ./fpmake$(SRCEXEEXT))
 LOCALFPMAKE=./fpmake$(SRCEXEEXT)
 # do not add -d$(CPU_TARGET)
 override NOCPUDEF=1
+# This list should be the same as in fpcbuild/Makefile.fpc and in fpcsrc/Makefile.fpc
 GDBMI_DEFAULT_OS_LIST=aix darwin freebsd haiku linux netbsd openbsd solaris win32 win64
 
 [rules]
@@ -54,7 +55,7 @@ FPMAKE_OPT+=-sp
 endif
 ifdef NOGDB
 FPMAKE_OPT+=--NoGDB=1
-endif
+else
 ifndef NOGDBMI
 ifneq ($(findstring $(OS_TARGET),$(GDBMI_DEFAULT_OS_LIST)),)
 FPMAKE_OPT+=--GDBMI=1
@@ -64,6 +65,7 @@ ifdef GDBMI
 FPMAKE_OPT+=--GDBMI=1
 endif
 endif
+endif
 
 ifdef PPC_TARGET
 FPMAKE_OPT+=--CompilerTarget=$(PPC_TARGET)