ソースを参照

* fix setting of -Fl and -Fo arguments, the check for LIBGDB is
moved to the prerules section so the GDBLIBDIR can be used
in the compiler.librarydir setting

peter 23 年 前
コミット
5466969467
2 ファイル変更25 行追加23 行削除
  1. 22 22
      packages/base/gdbint/Makefile
  2. 3 1
      packages/base/gdbint/Makefile.fpc

+ 22 - 22
packages/base/gdbint/Makefile

@@ -201,6 +201,28 @@ endif
 PACKAGESDIR:=$(wildcard $(FPCDIR) $(FPCDIR)/packages/base $(FPCDIR)/packages/extra)
 override PACKAGE_NAME=gdbint
 override PACKAGE_VERSION=1.0.6
+ifdef inUnix
+CURRDIR=./
+else
+CURRDIR=
+endif
+ifdef GDBLIBDIR
+override LIBGDB:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
+endif
+ifeq ($(LIBGDB),)
+override GDBLIBDIR=libgdb/$(OS_TARGET)
+ifeq ($(OS_TARGET),go32v2)
+ifneq ($(DJDIR),)
+GDBLIBDIR+=$(DJDIR)/lib
+endif
+endif
+override LIBGDB:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
+endif
+ifeq ($(LIBGDB),)
+GDBFOUND=0
+else
+GDBFOUND=1
+endif
 override TARGET_UNITS+=gdbint gdbcon
 override TARGET_EXAMPLES+=testgdb symify
 override INSTALL_FPCPACKAGE=y
@@ -1327,28 +1349,6 @@ makefiles: fpc_makefiles
 ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 endif
-ifdef inUnix
-CURRDIR=./
-else
-CURRDIR=
-endif
-ifdef GDBLIBDIR
-override LIBGDB:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
-endif
-ifeq ($(LIBGDB),)
-override GDBLIBDIR=libgdb/$(OS_TARGET)
-ifeq ($(OS_TARGET),go32v2)
-ifneq ($(DJDIR),)
-GDBLIBDIR+=$(DJDIR)/lib
-endif
-endif
-override LIBGDB:=$(firstword $(wildcard $(addsuffix /libgdb.a,$(GDBLIBDIR))))
-endif
-ifeq ($(LIBGDB),)
-GDBFOUND=0
-else
-GDBFOUND=1
-endif
 ifeq ($(GDBFOUND),1)
 $(CURRDIR)getver$(EXEEXT) : gdbver.pp
 	$(COMPILER) -o$(CURRDIR)getver$(EXEEXT) gdbver.pp

+ 3 - 1
packages/base/gdbint/Makefile.fpc

@@ -24,7 +24,7 @@ fpcpackage=y
 fpcdir=../../..
 
 
-[rules]
+[prerules]
 # For unix be sure to use the locally created gdbver
 ifdef inUnix
 CURRDIR=./
@@ -56,6 +56,8 @@ else
 GDBFOUND=1
 endif
 
+
+[rules]
 ifeq ($(GDBFOUND),1)
 # libgdb.a found