[fpc-pascal] Compiling just one package

2011-07-13 Thread Marcos Douglas
Hi,
I want to compile just one package, e.g., c:\freepascal\compiler\2.4.5\rtl.

1)
So, I used this:
cd c:\freepascal\compiler\2.4.5\rtl
set myroot=C:\freepascal
set myFPC=%myroot%\compiler\2.4.5
set mybinutils=%myroot%\binutils
set PATH=%mybinutils%\i386-win32;%myFPC%\bin\i386-win32
make clean all install PP=%mybinutils%\ppc386.exe

This script compiled the rtl package, but the \units directory was created.

2)
So, I tried the same script above, but I changed the last line:
make clean all install INSTALL_PREFIX=%myFPC% PP=%mybinutils%\ppc386.exe

I copied INSTALL_PREFIX=%myFPC% from my script that compile all FPC.

Didn't work.

So, how I can compile one package but set the output units to the
units directory default (in this case would be
c:\freepascal\compiler\2.4.5\units)?

Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] how to test if a file is open to write?

2011-07-13 Thread Bernd
Because I have no idea how to do this properly (It has been a hundred
years since I last used this form of file IO in Pascal) I have done
the following hack, just to get it running somehow but now I wonder
what would be the proper way to do this. How can I do something like a
hypothetical IsOpen(StdOut) the proper way? This is what I have done
but I don't like it:

implementation
var
  HasOutput: Boolean = True;

procedure log(const s: String);
begin
  if HasOutput then
writeln(s);
end;

initialization
  try
writeln();
  except
HasOutput := False;
  end;
end.
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Why \fpc\2.4.5\units has a copy from all ppu files from each package?

2011-07-13 Thread Marcos Douglas
Why \fpc\2.4.5\units has a copy from all ppu files in each package?

Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


[fpc-pascal] Re: Compiling just one package

2011-07-13 Thread Marcos Douglas
On Wed, Jul 13, 2011 at 3:47 PM, Marcos Douglas  wrote:
> Hi,
> I want to compile just one package, e.g., c:\freepascal\compiler\2.4.5\rtl.
>
> 1)
> So, I used this:
> cd c:\freepascal\compiler\2.4.5\rtl
> set myroot=C:\freepascal
> set myFPC=%myroot%\compiler\2.4.5
> set mybinutils=%myroot%\binutils
> set PATH=%mybinutils%\i386-win32;%myFPC%\bin\i386-win32
> make clean all install PP=%mybinutils%\ppc386.exe
>
> This script compiled the rtl package, but the \units directory was created.
>
> 2)
> So, I tried the same script above, but I changed the last line:
> make clean all install INSTALL_PREFIX=%myFPC% PP=%mybinutils%\ppc386.exe
>
> I copied INSTALL_PREFIX=%myFPC% from my script that compile all FPC.
>
> Didn't work.
>
> So, how I can compile one package but set the output units to the
> units directory default (in this case would be
> c:\freepascal\compiler\2.4.5\units)?

I think worked. I didn't know that exists \units directory from each
package... and the same copy in c:\freepascal\compiler\2.4.5\units.

Marcos Douglas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal