Re: [fpc-pascal]make files

2003-09-08 Thread James Mills
On Sun, Sep 07, 2003 at 04:30:39PM -0400, Frank W McCormick wrote:
 Hi all
 
 Can someone give me a simple example of  a makefile suitable for just
 simple compiling of one file ? I am so used to running FPC
 from the command line that make is foreign to me. 

Catch!

cheers
James

-- 
-
-Zero Defect Software Engineers Group - ZDSEG
-
-You need only two tools. WD-40 and duct tape.
-If it doesn't move and it should, use WD-40.
-If it moves and shouldn't, use the tape.
psb=psb.pas

all: psb

psb: $(psb)
fpc $(psb)

debug: $(psb)
fpc -bl -gg $(psb)

clean:
rm -f *ppu* *.o psb *~


[fpc-pascal]RE: Read from command line

2003-09-08 Thread Jeff Pohlmeyer
There is a subtle difference between ParamStr(0) and argv[0]:

  argv[0] is the verbatim command passed to the shell.
  ParamStr(0) is the full path to the executable.

Neither of these will dereference a symlink, to do that you
can call ReadLink recursively, or ReadLink(/proc/PID/exe)


Also note that the argv's are zero-based pchar's,
the paramstr's are one-based pascal strings.


The argv's are also writeable:

 This works:
   argv[0][1]:='x';

 But this doesn't:
   ParamStr(0)[1]:='x';



__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal]RE: make files

2003-09-08 Thread Jeff Pohlmeyer
 Can someone give me a simple example of  a makefile suitable for
 just simple compiling of one file ? I am so used to running FPC
 from the command line that make is foreign to me. 


[EXAMPLE]

#!/bin/bash

all:
ppc386 somefile.pas


debug:
ppc386 -vewh -gl -Crtoi somefile.pp


clean:
rm -f *.o *.ppu


install: all
cp somefile /usr/local/bin


uninstall:
rm -f /usr/local/bin/somefile


[/EXAMPLE]


Notes:
  The #!/bin/bash line isn't really necessary unless you 
  have some shell-specific commands in your makefile.
  ( It is best to avoid this if possible )

  The indentation of the commands below each section MUST
  be done with tabs, not spaces. This always catches me 
  because I have have tab emulation turned on in my editor.

 Identifiers after the colon on a section line insure that
 the other section is up to date.

  The word all isn't magic, it is just conventional.
  If you invoke make without any arguments, it will default
  to the first section, regardless of what it is named.

  Lots more info here:
  http://www.gnu.org/manual/make/index.html


HTH, 
  - Jeff


__
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]How to unsubscribe???

2003-09-08 Thread Carlo Kok
L D Blake wrote:
Hello,

Could someone please provide unsubscribe information for this list?

OR... could the list admin, please boot me off G.
See the link added to the bottom of every message.

Carlo Kok



___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal]No source file named ...

2003-09-08 Thread John Coppens
On Mon, 8 Sep 2003 21:05:39 -0300
John Coppens [EMAIL PROTECTED] wrote:

 Hi again
 
 Yet another problem - this one seems more or less erratic, though I
 haven't found a cause yet. Sometimes it works, sometimes not. When in
 gdb, I get:
 
 (gdb) br wav_fmt.pas:330
 No source file named wav_fmt.pas.
 

Solved - It seems that if there is another gdb open, the second session
doesn't work right. I had another gdb open on the same file to be debugged
and forgot about it. On another desktop I called gdb again and got the
described problems.

John

___
fpc-pascal maillist  -  [EMAIL PROTECTED]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal