Prechádzať zdrojové kódy

* detect if libgdb.a exists else switch to fake gdb

peter 25 rokov pred
rodič
commit
50e29f4d77
2 zmenil súbory, kde vykonal 86 pridanie a 75 odobranie
  1. 71 64
      ide/text/Makefile
  2. 15 11
      ide/text/Makefile.fpc

+ 71 - 64
ide/text/Makefile

@@ -1,5 +1,5 @@
 #
-# Makefile generated by fpcmake v0.99.15 [2000/05/26]
+# Makefile generated by fpcmake v0.99.15 [2000/06/01]
 #
 
 defaultrule: all
@@ -113,34 +113,6 @@ endif
 
 export FPC OS_TARGET OS_SOURCE CPU_TARGET CPU_SOURCE FPC_VERSION
 
-#####################################################################
-# Pre Settings
-#####################################################################
-
-# when making a full version include the compiler
-ifeq ($(FULL),1)
-override COMPUNITDIR+=../../compiler
-else
-override COMPUNITDIR+=../fake/compiler
-endif
-
-# when including debugger include the gdbinterface
-ifndef GDBINT
-GDBINT=gdbint
-endif
-
-ifeq ($(GDB),1)
-GDBUNITDIR+=$(PACKAGESDIR)/$(GDBINT)
-GDBLIBDIR+=$(PACKAGESDIR)/$(GDBINT)/libgdb/$(OS_TARGET)
-GDBOBJDIR+=$(PACKAGESDIR)/$(GDBINT)/libgdb/$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-ifneq ($(DJDIR),)
-GDBLIBDIR+=$(DJDIR)/lib
-endif
-endif
-else
-override GDBUNITDIR+=../fake/gdb
-endif
 #####################################################################
 # FPCDIR Setting
 #####################################################################
@@ -213,6 +185,7 @@ endif
 # Targets
 
 override EXEOBJECTS+=fp
+override RSTOBJECTS+=fpstrings
 
 # Clean
 
@@ -227,9 +200,6 @@ override NEEDOPT=-Sg
 
 # Directories
 
-override NEEDUNITDIR=$(COMPUNITDIR) $(GDBUNITDIR)
-override NEEDLIBDIR=$(GDBLIBDIR)
-override NEEDOBJDIR=$(GDBOBJDIR)
 
 # Packages
 
@@ -247,8 +217,41 @@ INFOTARGET=fpc_infocfg fpc_infoobjects fpc_infoinstall
 # Post Settings
 #####################################################################
 
+# when making a full version include the compiler
+ifeq ($(FULL),1)
+override UNITDIR+=../../compiler
+else
+override UNITDIR+=../fake/compiler
+endif
+
+# when including debugger include the gdbinterface
+ifndef GDBINT
+GDBINT=gdbint
+endif
+
+ifeq ($(GDB),1)
+GDBLIBDIR+=$(PACKAGESDIR)/$(GDBINT)/libgdb/$(OS_TARGET)
+GDBOBJDIR+=$(PACKAGESDIR)/$(GDBINT)/libgdb/$(OS_TARGET)
+ifeq ($(OS_TARGET),go32v2)
+ifneq ($(DJDIR),)
+GDBLIBDIR+=$(DJDIR)/lib
+endif
+endif
+ifeq ($(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))),)
+override GDB=0
+endif
+endif
+
+ifeq ($(GDB),1)
+# The gdbint is already included due the gdbint package dependency
+override LIBDIR+=$(GDBLIBDIR)
+override OBJDIR+=$(GDBOBJDIR)
+else
+override UNITDIR+=../fake/gdb
+endif
+
 ifeq ($(FULL),1)
-override NEEDOPT+=-dBrowserCol -dGDB -Sg
+override OPT+=-dBrowserCol -dGDB
 endif
 
 #####################################################################
@@ -782,29 +785,18 @@ ifneq ($(OS_TARGET),$(OS_SOURCE))
 override FPCOPT+=-T$(OS_TARGET)
 endif
 
-ifdef NEEDOPT
-override FPCOPT+=$(NEEDOPT)
-endif
-
-ifdef NEEDUNITDIR
-override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
-endif
-
-ifdef UNITSDIR
-override FPCOPT+=-Fu$(UNITSDIR)
+# User dirs should be first, so they are looked at first
+ifdef UNITDIR
+override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
 endif
-
-ifdef NEEDLIBDIR
-override FPCOPT+=$(addprefix -Fl,$(NEEDLIBDIR))
+ifdef LIBDIR
+override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
 endif
-
-ifdef NEEDOBJDIR
-override FPCOPT+=$(addprefix -Fo,$(NEEDOBJDIR))
+ifdef OBJDIR
+override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
 endif
-
-# Add GCC lib path if asked
-ifdef GCCLIBDIR
-override FPCOPT+=-Fl$(GCCLIBDIR)
+ifdef INCDIR
+override FPCOPT+=$(addprefix -Fi,$(INCDIR))
 endif
 
 # Smartlinking
@@ -847,21 +839,26 @@ ifdef VERBOSE
 override FPCOPT+=-vwni
 endif
 
-# Add commandline options
-ifdef OPT
-override FPCOPT+=$(OPT)
+ifdef NEEDOPT
+override FPCOPT+=$(NEEDOPT)
 endif
-ifdef UNITDIR
-override FPCOPT+=$(addprefix -Fu,$(UNITDIR))
+
+ifdef NEEDUNITDIR
+override FPCOPT+=$(addprefix -Fu,$(NEEDUNITDIR))
 endif
-ifdef LIBDIR
-override FPCOPT+=$(addprefix -Fl,$(LIBDIR))
+
+ifdef UNITSDIR
+override FPCOPT+=-Fu$(UNITSDIR)
 endif
-ifdef OBJDIR
-override FPCOPT+=$(addprefix -Fo,$(OBJDIR))
+
+# Add GCC lib path if asked
+ifdef GCCLIBDIR
+override FPCOPT+=-Fl$(GCCLIBDIR)
 endif
-ifdef INCDIR
-override FPCOPT+=$(addprefix -Fi,$(INCDIR))
+
+# Add commandline options last so they can override
+ifdef OPT
+override FPCOPT+=$(OPT)
 endif
 
 # Add defines from FPCOPTDEF to FPCOPT
@@ -939,6 +936,16 @@ endif
 
 fpc_exes: $(EXEFILES)
 
+#####################################################################
+# Resource strings
+#####################################################################
+
+ifdef RSTOBJECTS
+override RSTFILES=$(addsuffix $(RSTEXT),$(RSTOBJECTS))
+
+override CLEANRSTFILES+=$(RSTFILES)
+endif
+
 #####################################################################
 # General compile rules
 #####################################################################

+ 15 - 11
ide/text/Makefile.fpc

@@ -4,12 +4,10 @@
 
 [targets]
 programs=fp
+rst=fpstrings
 
 [dirs]
 fpcdir=../..
-unitdir=$(COMPUNITDIR) $(GDBUNITDIR)
-objdir=$(GDBOBJDIR)
-libdir=$(GDBLIBDIR)
 
 [require]
 options=-Sg
@@ -19,12 +17,12 @@ packages=api fv gdbint
 libgcc=1
 
 
-[presettings]
+[postsettings]
 # when making a full version include the compiler
 ifeq ($(FULL),1)
-override COMPUNITDIR+=../../compiler
+override UNITDIR+=../../compiler
 else
-override COMPUNITDIR+=../fake/compiler
+override UNITDIR+=../fake/compiler
 endif
 
 # when including debugger include the gdbinterface
@@ -33,7 +31,6 @@ GDBINT=gdbint
 endif
 
 ifeq ($(GDB),1)
-GDBUNITDIR+=$(PACKAGESDIR)/$(GDBINT)
 GDBLIBDIR+=$(PACKAGESDIR)/$(GDBINT)/libgdb/$(OS_TARGET)
 GDBOBJDIR+=$(PACKAGESDIR)/$(GDBINT)/libgdb/$(OS_TARGET)
 ifeq ($(OS_TARGET),go32v2)
@@ -41,14 +38,21 @@ ifneq ($(DJDIR),)
 GDBLIBDIR+=$(DJDIR)/lib
 endif
 endif
-else
-override GDBUNITDIR+=../fake/gdb
+ifeq ($(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))),)
+override GDB=0
+endif
 endif
 
+ifeq ($(GDB),1)
+# The gdbint is already included due the gdbint package dependency
+override LIBDIR+=$(GDBLIBDIR)
+override OBJDIR+=$(GDBOBJDIR)
+else
+override UNITDIR+=../fake/gdb
+endif
 
-[postsettings]
 ifeq ($(FULL),1)
-override NEEDOPT+=-dBrowserCol -dGDB -Sg
+override OPT+=-dBrowserCol -dGDB
 endif