212 lines
4.5 KiB
HTML
212 lines
4.5 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of gccmakedep</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>gccmakedep</H1>
|
|
Section: User Commands (1)<BR>Updated: gccmakedep 1.0.3<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
gccmakedep - create dependencies in makefiles using 'gcc -M'
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>gccmakedep</B>
|
|
|
|
[
|
|
<B>-s</B><I>separator</I>
|
|
|
|
] [
|
|
<B>-f</B><I>makefile</I>
|
|
|
|
] [
|
|
<B>-a</B>
|
|
|
|
] [
|
|
--
|
|
<I>options</I>
|
|
|
|
--
|
|
]
|
|
<I>sourcefile</I>
|
|
|
|
...
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
The
|
|
<B>gccmakedep</B>
|
|
|
|
program calls 'gcc -M' to output
|
|
<I>makefile</I>
|
|
|
|
rules describing the dependencies of each
|
|
<I>sourcefile</I>,
|
|
|
|
so that
|
|
<B><A HREF="/cgi-bin/man/man2html?1+make">make</A></B>(1)
|
|
|
|
knows which object files must be recompiled when a dependency has changed.
|
|
<P>
|
|
|
|
By default,
|
|
<B>gccmakedep</B>
|
|
|
|
places its output in the file named
|
|
<I>makefile</I>
|
|
|
|
if it exists, otherwise
|
|
<I>Makefile.</I>
|
|
|
|
An alternate makefile may be specified with the
|
|
<B>-f</B>
|
|
|
|
option.
|
|
It first searches the makefile for a line beginning with
|
|
<P>
|
|
# DO NOT DELETE
|
|
<P>
|
|
or one provided with the
|
|
<B>-s</B>
|
|
|
|
option, as a delimiter for the dependency output.
|
|
If it finds it, it will delete everything following this up to the end of
|
|
the makefile and put the output after this line.
|
|
If it doesn't find it, the program will append the string to the makefile
|
|
and place the output after that.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>EXAMPLE</H2>
|
|
|
|
Normally,
|
|
<B>gccmakedep</B>
|
|
|
|
will be used in a makefile target so that typing 'make depend' will bring
|
|
the dependencies up to date for the makefile.
|
|
For example,
|
|
<PRE>
|
|
SRCS = file1.c file2.c ...
|
|
CFLAGS = -O -DHACK -I../foobar -xyz
|
|
depend:
|
|
gccmakedep -- $(CFLAGS) -- $(SRCS)
|
|
</PRE>
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
The program will ignore any option that it does not understand, so you may
|
|
use the same arguments that you would for
|
|
<B><A HREF="/cgi-bin/man/man2html?1+gcc">gcc</A></B>(1),
|
|
|
|
including
|
|
<B>-D</B>
|
|
|
|
and
|
|
<B>-U</B>
|
|
|
|
options to define and undefine symbols and
|
|
<B>-I</B>
|
|
|
|
to set the include path.
|
|
<DL COMPACT>
|
|
<DT id="1"><B>-a</B>
|
|
|
|
<DD>
|
|
Append the dependencies to the file instead of replacing existing
|
|
dependencies.
|
|
<DT id="2"><B>-f</B><I>makefile</I>
|
|
|
|
<DD>
|
|
Filename.
|
|
This allows you to specify an alternate makefile in which
|
|
<B>gccmakedep</B>
|
|
|
|
can place its output.
|
|
Specifying "-" as the file name (that is,
|
|
<B>-f-</B>)
|
|
|
|
sends the output to standard output instead of modifying an existing file.
|
|
<DT id="3"><B>-s</B><I>string</I>
|
|
|
|
<DD>
|
|
Starting string delimiter.
|
|
This option permits you to specify a different string for
|
|
<B>gccmakedep</B>
|
|
|
|
to look for in the makefile.
|
|
The default is "# DO NOT DELETE".
|
|
<DT id="4"><B>--</B><I> options </I><B>--</B>
|
|
|
|
<DD>
|
|
If
|
|
<B>gccmakedep</B>
|
|
|
|
encounters a double hyphen (--) in the argument list, then any
|
|
unrecognized arguments following it will be silently ignored.
|
|
A second double hyphen terminates this special treatment.
|
|
In this way,
|
|
<B>gccmakedep</B>
|
|
|
|
can be made to safely ignore esoteric compiler arguments that might
|
|
normally be found in a CFLAGS
|
|
<B>make</B>
|
|
|
|
macro (see the
|
|
<B>EXAMPLE</B>
|
|
|
|
section above).
|
|
<B>-D</B>,
|
|
|
|
<B>-I</B>,
|
|
|
|
and
|
|
<B>-U</B>
|
|
|
|
options appearing between the pair of double hyphens are still processed
|
|
normally.
|
|
</DL>
|
|
<A NAME="lbAG"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+gcc">gcc</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+make">make</A></B>(1),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?1+makedepend">makedepend</A></B>(1).
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
The version of the
|
|
<B>gccmakedep</B>
|
|
|
|
included in this X.Org Foundation release was originally
|
|
written by the XFree86 Project based on code supplied by Hongjiu Lu.
|
|
<P>
|
|
|
|
Colin Watson wrote this manual page, originally for the Debian Project,
|
|
based partly on the manual page for
|
|
<B><A HREF="/cgi-bin/man/man2html?1+makedepend">makedepend</A></B>(1).
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="5"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="6"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="7"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="8"><A HREF="#lbAE">EXAMPLE</A><DD>
|
|
<DT id="9"><A HREF="#lbAF">OPTIONS</A><DD>
|
|
<DT id="10"><A HREF="#lbAG">SEE ALSO</A><DD>
|
|
<DT id="11"><A HREF="#lbAH">AUTHOR</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:05:12 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|