Skip to content

coffeeunderrun/fpcdep

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fpcdep

Small Free Pascal utility to generate Makefile-style dependency files from Pascal source.

Caution

This utility will no longer be maintained for the foreseeable future. I created it to be used with a complex Makefile build system for my hobby OS kernel. I have since moved to using the FPMAKE build system which has rendered this utility deprecated.

Required

fpc make

Build

fpcmake && make

Install

make install

Clean

make clean

Usage

fpcdep [options] <input>

Options

-o <x> Output to file <x> (default is input filename with .d extension)

-t <x> Rule target, e.g., <x> : prerequisites (default is input filename with .o extension)

-I <x> Add <x> to include search path

-Fi <x> Add <x> to include search path

-Fu <x> Add <x> to unit search path

-FU <x> Set the prerequisite unit path to <x> (default is the directory of the target)

-Pe <x> Set the prerequisite unit extension to <x> (default is .ppu)

Note

Any options not listed above will be ignored rather than returning an error. This will allow any flag variables passed to fpc to also be passed to fpcdep.

Important

Prerequisites will not be added if fpcdep cannot find them in any of the provided search paths.

Important

For units, fpcdep will look for the source files, .pas or .pp, and not compiled, .ppu.

Example

Input

myprg.pas

program myprg;
uses myunit;
begin
end.

myunit.pas

unit myunit;
interface
{$I myinc1.inc}
implementation
end.

myinc1.inc

{$I myinc2.inc}

Output

fpcdep -Pe.o -FUunits -tmyprg myprg.pas
fpcdep -tunits/myunit.o myunit.pas

myprg.d

myprg : myprg.pas units/myunit.o

myunit.d

units/myunit.o : myunit.pas myinc1.inc myinc2.inc

License

MIT License. See LICENSE file.

About

Small Free Pascal utility to generate Makefile-style dependency files from Pascal source.

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages