www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/03/09/12:28:44

From: Eric Backus <ericb AT lsid DOT hp DOT com>
Subject: Re: diff gcc 2.2.2 and 2.3.3 and making MAKE files
To: LIP AT odie DOT ee DOT wits DOT ac DOT za
Date: Tue, 9 Mar 93 8:41:23 PST
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu (djgpp)
Mailer: Elm [revision: 66.25]

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019