mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-18 05:39:26 +02:00
* Echo -> cp
git-svn-id: trunk@6161 -
This commit is contained in:
parent
c70cd739cb
commit
42a21245ee
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1306,6 +1306,7 @@ packages/base/gdbint/gdbcon.pp svneol=native#text/plain
|
||||
packages/base/gdbint/gdbint.pp svneol=native#text/plain
|
||||
packages/base/gdbint/gdbobjs.inc svneol=native#text/plain
|
||||
packages/base/gdbint/gdbver.pp svneol=native#text/plain
|
||||
packages/base/gdbint/gdbver_nogdb.inc svneol=native#text/x-pascal
|
||||
packages/base/gdbint/symify.pp svneol=native#text/plain
|
||||
packages/base/gdbint/testgdb.pp svneol=native#text/plain
|
||||
packages/base/graph/Makefile -text
|
||||
|
@ -2261,11 +2261,10 @@ zipinstall: fpc_zipinstall
|
||||
zipsourceinstall: fpc_zipsourceinstall
|
||||
zipexampleinstall: fpc_zipexampleinstall
|
||||
zipdistinstall: fpc_zipdistinstall
|
||||
distclean: fpc_distclean
|
||||
cleanall: fpc_cleanall
|
||||
info: fpc_info
|
||||
makefiles: fpc_makefiles
|
||||
.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall distclean cleanall info makefiles
|
||||
.PHONY: all debug smart release units examples shared install sourceinstall exampleinstall distinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall cleanall info makefiles
|
||||
ifneq ($(wildcard fpcmake.loc),)
|
||||
include fpcmake.loc
|
||||
endif
|
||||
@ -2286,8 +2285,8 @@ gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT) gdbint.pp
|
||||
$(MAKE) gdbint$(PPUEXT) GOTGDBVER=1
|
||||
else
|
||||
GDBVER:=GDB_V$(strip $(shell $(CURRDIR)gdbver$(EXEEXT) -n))
|
||||
gdbver.inc:
|
||||
$(ECHO) "{\$$define $(GDBVER)}" > gdbver.inc
|
||||
gdbver.inc: gdbver$(EXEEXT)
|
||||
gdbver$(EXEEXT) -o gdbver.inc
|
||||
gdbint$(PPUEXT): gdbint.pp gdbver.inc
|
||||
@$(ECHO) Using GDB $(GDBVER)
|
||||
$(COMPILER) -d$(GDBVER) gdbint.pp
|
||||
@ -2296,15 +2295,15 @@ endif
|
||||
else
|
||||
GDBVER=GDB_V606
|
||||
gdbver.inc:
|
||||
$(ECHO) "{\$$define $(GDBVER)}" > gdbver.inc
|
||||
$(CPPROG) gdbver_nogdb.inc gdbver.inc
|
||||
gdbint$(PPUEXT): gdbint.pp gdbver.inc
|
||||
@$(ECHO) libgdb.a not found, using default GDB $(GDBVER)
|
||||
$(COMPILER) -d$(GDBVER) gdbint.pp
|
||||
endif
|
||||
else
|
||||
GDBVER=GDB_V5
|
||||
GDBVER=GDB_V606
|
||||
gdbver.inc:
|
||||
$(ECHO) "{\$$define $(GDBVER)}" > gdbver.inc
|
||||
$(CPPROG) gdbver_nogdb.inc gdbver.inc
|
||||
gdbint$(PPUEXT): gdbint.pp gdbver.inc
|
||||
@$(ECHO) Different target os or cpu, using default GDB $(GDBVER)
|
||||
$(COMPILER) -d$(GDBVER) gdbint.pp
|
||||
@ -2330,3 +2329,5 @@ testgdb$(EXEEXT): testgdb.pp gdbint$(PPUEXT) gdbcon$(PPUEXT) $(DBGCOM)
|
||||
test: examples
|
||||
clean: fpc_clean
|
||||
$(DEL) gdbver$(EXEEXT) gdbver$(OEXT)
|
||||
distclean: fpc_distclean
|
||||
$(DEL) gdbver.inc
|
||||
|
@ -83,8 +83,8 @@ gdbint$(PPUEXT): $(CURRDIR)gdbver$(EXEEXT) gdbint.pp
|
||||
else
|
||||
# gdbver exists
|
||||
GDBVER:=GDB_V$(strip $(shell $(CURRDIR)gdbver$(EXEEXT) -n))
|
||||
gdbver.inc:
|
||||
$(ECHO) "{\$$define $(GDBVER)}" > gdbver.inc
|
||||
gdbver.inc: gdbver$(EXEEXT)
|
||||
gdbver$(EXEEXT) -o gdbver.inc
|
||||
gdbint$(PPUEXT): gdbint.pp gdbver.inc
|
||||
@$(ECHO) Using GDB $(GDBVER)
|
||||
$(COMPILER) -d$(GDBVER) gdbint.pp
|
||||
@ -95,17 +95,17 @@ else
|
||||
# libgdb.a not found, default to libgdb v6
|
||||
GDBVER=GDB_V606
|
||||
gdbver.inc:
|
||||
$(ECHO) "{\$$define $(GDBVER)}" > gdbver.inc
|
||||
$(CPPROG) gdbver_nogdb.inc gdbver.inc
|
||||
gdbint$(PPUEXT): gdbint.pp gdbver.inc
|
||||
@$(ECHO) libgdb.a not found, using default GDB $(GDBVER)
|
||||
$(COMPILER) -d$(GDBVER) gdbint.pp
|
||||
endif
|
||||
|
||||
else
|
||||
# Different OS_TARGET, default to libgdb v5
|
||||
GDBVER=GDB_V5
|
||||
# Different OS_TARGET, default to libgdb v6
|
||||
GDBVER=GDB_V606
|
||||
gdbver.inc:
|
||||
$(ECHO) "{\$$define $(GDBVER)}" > gdbver.inc
|
||||
$(CPPROG) gdbver_nogdb.inc gdbver.inc
|
||||
gdbint$(PPUEXT): gdbint.pp gdbver.inc
|
||||
@$(ECHO) Different target os or cpu, using default GDB $(GDBVER)
|
||||
$(COMPILER) -d$(GDBVER) gdbint.pp
|
||||
@ -145,3 +145,5 @@ test: examples
|
||||
clean: fpc_clean
|
||||
$(DEL) gdbver$(EXEEXT) gdbver$(OEXT)
|
||||
|
||||
distclean: fpc_distclean
|
||||
$(DEL) gdbver.inc
|
||||
|
@ -21,6 +21,9 @@ const
|
||||
Current_cvs_version : longint = 503;
|
||||
Max_version_length = 255;
|
||||
|
||||
const
|
||||
output_file:string='';
|
||||
|
||||
var
|
||||
version : array[0..0] of char;cvar;external;
|
||||
gdbversion : pchar;
|
||||
@ -30,9 +33,15 @@ var
|
||||
subsubversion_number : longint;
|
||||
error : word;
|
||||
only_ver : boolean;
|
||||
o : text;
|
||||
|
||||
begin
|
||||
only_ver:=(Paramcount>0) and (ParamStr(1)='-n');
|
||||
if (paramcount>=2) and (paramstr(1)='-o') then
|
||||
begin
|
||||
only_ver:=true;
|
||||
output_file:=paramstr(2);
|
||||
end;
|
||||
getmem(gdbversion,Max_version_length+1);
|
||||
strlcopy(gdbversion,@version,Max_version_length);
|
||||
gdbversion[Max_version_length]:=#0;
|
||||
@ -79,7 +88,17 @@ begin
|
||||
version_number:=0;
|
||||
end;
|
||||
freemem(gdbversion);
|
||||
if only_ver then
|
||||
Write(version_number);
|
||||
Halt(version_number);
|
||||
if output_file<>'' then
|
||||
begin
|
||||
assign(o,output_file);
|
||||
rewrite(o);
|
||||
writeln(o,'{$define GDB_V',version_number,'}');
|
||||
close(o);
|
||||
end
|
||||
else
|
||||
begin
|
||||
if only_ver then
|
||||
Write(version_number);
|
||||
Halt(version_number);
|
||||
end;
|
||||
end.
|
||||
|
1
packages/base/gdbint/gdbver_nogdb.inc
Normal file
1
packages/base/gdbint/gdbver_nogdb.inc
Normal file
@ -0,0 +1 @@
|
||||
{$define GDB_V606}
|
Loading…
Reference in New Issue
Block a user