Mail Archives: djgpp/1993/03/09/12:28:44
> Secondly is there a FTP'able utility somewhere that can create
> makefiles by looking at the dependencies amongst a set of (C and .H)
> files and (C++/objc and .H) files. This would be most useful when
> porting large apps with hundreds of C and header files.
Check out "gcc -M <filenames>" and "gcc -MM <filenames>". Instead of
compiling the files, the "-M" and "-MM" options tell gcc to simply
look for include file dependancies, and write them to stdout. The
format of the lines written to stdout is exactly what a Makefile would
need. The "-M" option means list all include file dependancies
including system include files. The "-MM" option means to list all
except the system include files.
> Lastly is there an FTP'able lint and cb (C beautifier) program
> anywhere which includes source for customisation to a user's
> preferences.
Rather than "cb", I would recommend "indent". Indent is a c-code
formatter with options for just about every variation on c coding
style known to man. Indent is available from the FSF.
I ported indent version 1.6 to go32 last year. It is ftpable from
twok.ods.com in directory ~ftp/pub/gnu-dos (non-business hours only,
please). Get file "miscfsf.zoo", which contains indent.exe and many
other programs. For documentation, install the original FSF source
code from prep.ai.mit.edu in ~ftp/pub/gnu/indent-1.6.tar.Z.
--
Eric Backus
ericb AT lsid DOT hp DOT com
(206) 335-2495
- Raw text -