Short:        makedepend bugfixed + modified for smake
Author:       Todd Brunhoff, Tektronix, Inc. and MIT Project Athena
Uploader:     hagbardcelin gmail com (Hagbard Celine)
Type:         dev/c
Version:      1.0.8
Architecture: m68k-amigaos

Re-upload as I forgot the note about stack-usage in readme of original
upload.

This is a port of makedepend 1.0.8 from Xorg with bugfixes and some small
modifications for use with smake. And a little extra.

Not-Amiga-specific fixes:

Applied ifparser.c: divide-by-zero fix by Petre Rodan.
Fixed broken link detection in include.c.
Fixed broken same-file detection in include.c.


Amiga specific changes:

Modified to understand Amiga paths, and not to escape the ":" character.

The default filename for output is changed to smakefile.

And the little extra, a hack to make it support ".o" files as input
parameters. Which works like this:

If the file myprogram.c includes only myprogram.h, the standard output when
you specify "myprogram.c" on command-line is:
myprogram.o: myprogram.h

If you on the other hand specify "myprogram.o" on command-line, it will
output:
myprogram.o: myprogram.c myprogram.h

To make this really useful. Three new command line options are added,
"-Ssrcprefix", "-Pincprefix" and "-Qobjdir".

"-Ssrcprefix" and "-Pincprefix" is for ".c" and ".h" as the original
"-pobjprefix" is for ".o" files. And "-Qobjdir" is needed for makedepend to
find ".c" files, if ".o" files are are used on commandline that reside in a
different directory than the corresponding ".c" files.

Utilizing these lets makedepend work even if the smakefile, source-,
include- and object-files are all in separate directories. And also supports
generating output like this:
$(OBJ)myprogram.o: $(SRC)myprogram.c $(INC)myprogram.h

The "incprefix" will not be applied to files included with a absolute path.
Files included with angle brackets (<>) use absolute paths unless you specify
a relative path with "-I" or "-Y".

This hack only works for ".c" files. And if a ".c" file doesn't have any
#include statements; it will be silently ignored.

DO NOT mix ".c" and ".o" files on the commandline, this is not supported.

This ".o" hack was my reason for doing this. And to get there with minimal
changes to the original source, I used a unholy mix of UNIX-, SAS/C- and
DOS-functions. Plus a little creative misuse of defines, and short-circuiting
of configure/automake and friends. NOT TO BE USED as an example of how to port
any code to AmigaOS.

I also added "-q" for quiet, as the standard "no-verbose" is very chatty in
some combinations of settings. This will disable all messages but faltal
errors.

Special thanks goes to Rainer Koppler who's earlier port made me able to get
this to compile in the first place.
And also to all the nice people at eab.abime.net for answering all my stupid
programming questions.


Known bugs:

This code comes from Linux and has no provision for handling filenames that
are illegal there, but legal on AmigaOS. Also, as far as I understand the
code, this CAN NOT work if you supply filenames that begin with a "-"
character on the commandline. Basically, if you use any special characters in
your filenames:
You are on your own!
Also see known bugs in makedepend.doc.


Not really bugs, but worth noting:

The stack usage is dependent on organization of the files it is parsing. The
binary is compiled without stackcheck/stackextend, and will crash hard if it
runs out of stack.

There is no support for using smake local input files (<< commands <). To get
around issues with line length, you must split the work on multiple lines, and
use the "-a" switch on all but the first line.

The formatting in makedepend.doc is horrible, I blame the lack of updated
tools to convert .man files to Amiga formats.